logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 76f340ce2d00cda2c88be1f5ba708c5e4ffccf13
parent 619423eacb29f50482c8e1545a839a1eaaa31c1b
Author: Henry Jameson <me@hjkos.com>
Date:   Thu, 19 Dec 2024 14:54:40 +0200

Merge remote-tracking branch 'origin/develop' into fixes-batch

Diffstat:

Achangelog.d/backend-repo-url.skip0
Achangelog.d/checkbox.fix1+
Achangelog.d/deprecate-subscribe.change2++
Achangelog.d/misc-markup.fix1+
Achangelog.d/show-bookmarks-on-mobile.fix1+
Achangelog.d/user-link.add1+
Achangelog.d/weird-absolute-time-format.fix2++
Msrc/boot/after_store.js3++-
Msrc/components/announcement_editor/announcement_editor.vue5+++--
Msrc/components/announcements_page/announcements_page.vue4++--
Msrc/components/bookmark_folder_edit/bookmark_folder_edit.vue4++--
Msrc/components/bookmark_folders/bookmark_folders.vue4++--
Msrc/components/chat_list/chat_list.vue4++--
Msrc/components/checkbox/checkbox.vue13+++++++++----
Msrc/components/conversation/conversation.vue4+++-
Msrc/components/dialog_modal/dialog_modal.vue4++--
Msrc/components/edit_status_modal/edit_status_modal.vue4+++-
Msrc/components/features_panel/features_panel.vue4++--
Msrc/components/follow_requests/follow_requests.vue4++--
Msrc/components/interactions/interactions.vue4++--
Msrc/components/lists/lists.vue4+++-
Msrc/components/login_form/login_form.vue2+-
Msrc/components/mfa_form/recovery_form.vue4+++-
Msrc/components/mfa_form/totp_form.vue4+++-
Msrc/components/mobile_nav/mobile_nav.vue4++--
Msrc/components/notifications/notifications.vue4++--
Msrc/components/password_reset/password_reset.vue4+++-
Msrc/components/post_status_modal/post_status_modal.vue4+++-
Msrc/components/registration/registration.vue4+++-
Msrc/components/remote_user_resolver/remote_user_resolver.vue4+++-
Msrc/components/search/search.vue4++--
Msrc/components/settings_modal/settings_modal.vue4++--
Msrc/components/settings_modal/tabs/theme_tab/theme_preview.vue4++--
Msrc/components/settings_modal/tabs/version_tab.js7+------
Msrc/components/settings_modal/tabs/version_tab.vue2+-
Msrc/components/shout_panel/shout_panel.vue4++--
Msrc/components/side_drawer/side_drawer.vue15+++++++++++++++
Msrc/components/status_history_modal/status_history_modal.vue4+++-
Msrc/components/timeago/timeago.vue2+-
Msrc/components/timeline_menu/timeline_menu.vue4++--
Msrc/components/update_notification/update_notification.vue4++--
Msrc/components/user_card/user_card.vue2+-
Msrc/components/user_link/user_link.vue20++++++++++++--------
Msrc/components/user_profile/user_profile.vue4++--
Msrc/components/user_reporting_modal/user_reporting_modal.vue2+-
Msrc/components/who_to_follow/who_to_follow.vue4+++-
Msrc/components/who_to_follow_panel/who_to_follow_panel.vue4++--
Msrc/modules/config.js2+-
Msrc/modules/instance.js1+
Msrc/modules/users.js4++--
Msrc/panel.scss2++
Msrc/services/api/api.service.js13+------------
Dsrc/services/version/version.service.js6------
Dtest/unit/specs/services/version/version.service.spec.js11-----------
54 files changed, 131 insertions(+), 105 deletions(-)

diff --git a/changelog.d/backend-repo-url.skip b/changelog.d/backend-repo-url.skip diff --git a/changelog.d/checkbox.fix b/changelog.d/checkbox.fix @@ -0,0 +1 @@ +checkbox vertical alignment has been fixed diff --git a/changelog.d/deprecate-subscribe.change b/changelog.d/deprecate-subscribe.change @@ -0,0 +1 @@ +Use /api/v1/accounts/:id/follow for account subscriptions instead of the deprecated routes +\ No newline at end of file diff --git a/changelog.d/misc-markup.fix b/changelog.d/misc-markup.fix @@ -0,0 +1 @@ +Fix small markup inconsistencies diff --git a/changelog.d/show-bookmarks-on-mobile.fix b/changelog.d/show-bookmarks-on-mobile.fix @@ -0,0 +1 @@ +Bookmarks visible again on mobile diff --git a/changelog.d/user-link.add b/changelog.d/user-link.add @@ -0,0 +1 @@ +Make UserLink wrappable diff --git a/changelog.d/weird-absolute-time-format.fix b/changelog.d/weird-absolute-time-format.fix @@ -0,0 +1 @@ +Show only month and day instead of weird "day, hour" format. While at it, fixed typo "defualt" in a comment. +\ No newline at end of file diff --git a/src/boot/after_store.js b/src/boot/after_store.js @@ -243,7 +243,7 @@ const resolveStaffAccounts = ({ store, accounts }) => { const getNodeInfo = async ({ store }) => { try { - const res = await preloadFetch('/nodeinfo/2.0.json') + const res = await preloadFetch('/nodeinfo/2.1.json') if (res.ok) { const data = await res.json() const metadata = data.metadata @@ -280,6 +280,7 @@ const getNodeInfo = async ({ store }) => { const software = data.software store.dispatch('setInstanceOption', { name: 'backendVersion', value: software.version }) + store.dispatch('setInstanceOption', { name: 'backendRepository', value: software.repository }) store.dispatch('setInstanceOption', { name: 'pleromaBackend', value: software.name === 'pleroma' }) const priv = metadata.private diff --git a/src/components/announcement_editor/announcement_editor.vue b/src/components/announcement_editor/announcement_editor.vue @@ -34,8 +34,9 @@ id="announcement-all-day" v-model="announcement.allDay" :disabled="disabled" - /> - <label for="announcement-all-day">{{ $t('announcements.all_day_prompt') }}</label> + > + {{ $t('announcements.all_day_prompt') }} + </Checkbox> </span> </div> </template> diff --git a/src/components/announcements_page/announcements_page.vue b/src/components/announcements_page/announcements_page.vue @@ -1,9 +1,9 @@ <template> <div class="panel panel-default announcements-page"> <div class="panel-heading"> - <span> + <h1 class="title"> {{ $t('announcements.page_header') }} - </span> + </h1> </div> <div class="panel-body"> <section diff --git a/src/components/bookmark_folder_edit/bookmark_folder_edit.vue b/src/components/bookmark_folder_edit/bookmark_folder_edit.vue @@ -13,7 +13,7 @@ icon="chevron-left" /> </button> - <div class="title"> + <h1 class="title"> <i18n-t v-if="id" keypath="bookmark_folders.editing_folder" @@ -26,7 +26,7 @@ v-else keypath="bookmark_folders.creating_folder" /> - </div> + </h1> </div> <div class="panel-body"> <div class="input-wrap"> diff --git a/src/components/bookmark_folders/bookmark_folders.vue b/src/components/bookmark_folders/bookmark_folders.vue @@ -1,9 +1,9 @@ <template> <div class="Bookmark-folders panel panel-default"> <div class="panel-heading"> - <div class="title"> + <h1 class="title"> {{ $t('nav.bookmark_folders') }} - </div> + </h1> <router-link :to="{ name: 'bookmark-folder-new' }" class="button-default btn new-folder-button" diff --git a/src/components/chat_list/chat_list.vue b/src/components/chat_list/chat_list.vue @@ -7,9 +7,9 @@ class="chat-list panel panel-default" > <div class="panel-heading -sticky"> - <span class="title"> + <h1 class="title"> {{ $t("chats.chats") }} - </span> + </h1> <button class="button-default" @click="newChat" diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue @@ -70,21 +70,26 @@ export default { display: inline-block; min-height: 1.2em; + &-indicator, + & .label { + vertical-align: middle; + } + & > &-indicator { /* Reset .input stuff */ padding: 0; margin: 0; position: relative; line-height: inherit; - display: inline; - padding-left: 1.2em; + display: inline-block; + width: 1.2em; + height: 1.2em; box-shadow: none; } &-indicator::before { position: absolute; - right: 0; - top: 0; + inset: 0; display: block; content: "✓"; transition: color 200ms; diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue @@ -9,7 +9,9 @@ v-if="isExpanded" class="panel-heading conversation-heading -sticky" > - <span class="title"> {{ $t('timeline.conversation') }} </span> + <h1 class="title"> + {{ $t('timeline.conversation') }} + </h1> <button v-if="collapsable" class="button-unstyled -link" diff --git a/src/components/dialog_modal/dialog_modal.vue b/src/components/dialog_modal/dialog_modal.vue @@ -8,9 +8,9 @@ @click.stop="" > <div class="panel-heading dialog-modal-heading"> - <div class="title"> + <h1 class="title"> <slot name="header" /> - </div> + </h1> </div> <div class="panel-body dialog-modal-content"> <slot name="default" /> diff --git a/src/components/edit_status_modal/edit_status_modal.vue b/src/components/edit_status_modal/edit_status_modal.vue @@ -6,7 +6,9 @@ > <div class="edit-form-modal-panel panel"> <div class="panel-heading"> - {{ $t('post_status.edit_status') }} + <h1 class="title"> + {{ $t('post_status.edit_status') }} + </h1> </div> <PostStatusForm class="panel-body" diff --git a/src/components/features_panel/features_panel.vue b/src/components/features_panel/features_panel.vue @@ -2,9 +2,9 @@ <div class="features-panel"> <div class="panel panel-default base01-background"> <div class="panel-heading timeline-heading base02-background base04"> - <div class="title"> + <h1 class="title"> {{ $t('features_panel.title') }} - </div> + </h1> </div> <div class="panel-body features-panel"> <ul> diff --git a/src/components/follow_requests/follow_requests.vue b/src/components/follow_requests/follow_requests.vue @@ -1,9 +1,9 @@ <template> <div class="settings panel panel-default"> <div class="panel-heading"> - <div class="title"> + <h1 class="title"> {{ $t('nav.friend_requests') }} - </div> + </h1> </div> <div class="panel-body"> <FollowRequestCard diff --git a/src/components/interactions/interactions.vue b/src/components/interactions/interactions.vue @@ -1,9 +1,9 @@ <template> <div class="panel panel-default"> <div class="panel-heading"> - <div class="title"> + <h1 class="title"> {{ $t("nav.interactions") }} - </div> + </h1> </div> <tab-switcher ref="tabSwitcher" diff --git a/src/components/lists/lists.vue b/src/components/lists/lists.vue @@ -2,7 +2,9 @@ <div class="Lists panel panel-default"> <div class="panel-heading"> <div class="title"> - {{ $t('lists.lists') }} + <h1 class="title"> + {{ $t('lists.lists') }} + </h1> </div> <router-link :to="{ name: 'lists-new' }" diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue @@ -3,7 +3,7 @@ <!-- Default panel contents --> <div class="panel-heading"> - {{ $t('login.login') }} + <h1 class="title">{{ $t('login.login') }}</h1> </div> <div class="panel-body"> diff --git a/src/components/mfa_form/recovery_form.vue b/src/components/mfa_form/recovery_form.vue @@ -3,7 +3,9 @@ <!-- Default panel contents --> <div class="panel-heading"> - {{ $t('login.heading.recovery') }} + <h1 class="title"> + {{ $t('login.heading.recovery') }} + </h1> </div> <div class="panel-body"> diff --git a/src/components/mfa_form/totp_form.vue b/src/components/mfa_form/totp_form.vue @@ -3,7 +3,9 @@ <!-- Default panel contents --> <div class="panel-heading"> - {{ $t('login.heading.totp') }} + <h1 class="title"> + {{ $t('login.heading.totp') }} + </h1> </div> <div class="panel-body"> diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue @@ -50,13 +50,13 @@ @touchmove.stop="notificationsTouchMove" > <div class="panel-heading mobile-notifications-header"> - <span class="title"> + <h1 class="title"> {{ $t('notifications.notifications') }} <span v-if="unseenCountBadgeText" class="badge -notification unseen-count" >{{ unseenCountBadgeText }}</span> - </span> + </h1> <span class="spacer" /> <button v-if="notificationsAtTop" diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue @@ -14,13 +14,13 @@ v-if="!noHeading" class="notifications-heading panel-heading -sticky" > - <div class="title"> + <h1 class="title"> {{ $t('notifications.notifications') }} <span v-if="unseenCountBadgeText" class="badge -notification unseen-count" >{{ unseenCountBadgeText }}</span> - </div> + </h1> <div v-if="showScrollTop" class="rightside-button" diff --git a/src/components/password_reset/password_reset.vue b/src/components/password_reset/password_reset.vue @@ -1,7 +1,9 @@ <template> <div class="settings panel panel-default"> <div class="panel-heading"> - {{ $t('password_reset.password_reset') }} + <h1 class="title"> + {{ $t('password_reset.password_reset') }} + </h1> </div> <div class="panel-body"> <form diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue @@ -7,7 +7,9 @@ > <div class="post-form-modal-panel panel"> <div class="panel-heading"> - {{ $t('post_status.new_status') }} + <h1 class="title"> + {{ $t('post_status.new_status') }} + </h1> </div> <PostStatusForm class="panel-body" diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue @@ -1,7 +1,9 @@ <template> <div class="settings panel panel-default"> <div class="panel-heading"> - {{ $t('registration.registration') }} + <h1 class="title"> + {{ $t('registration.registration') }} + </h1> </div> <div v-if="!hasSignUpNotice" diff --git a/src/components/remote_user_resolver/remote_user_resolver.vue b/src/components/remote_user_resolver/remote_user_resolver.vue @@ -1,7 +1,9 @@ <template> <div class="panel panel-default"> <div class="panel-heading"> - {{ $t('remote_user_resolver.remote_user_resolver') }} + <h1 class="title"> + {{ $t('remote_user_resolver.remote_user_resolver') }} + </h1> </div> <div class="panel-body"> <p> diff --git a/src/components/search/search.vue b/src/components/search/search.vue @@ -1,9 +1,9 @@ <template> <div class="Search panel panel-default"> <div class="panel-heading"> - <div class="title"> + <h1 class="title"> {{ $t('nav.search') }} - </div> + </h1> </div> <div class="panel-body search-input-container"> <input diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue @@ -7,9 +7,9 @@ > <div class="settings-modal-panel panel"> <div class="panel-heading"> - <span class="title"> + <h1 class="title"> {{ modalMode === 'user' ? $t('settings.settings') : $t('admin_dash.window_title') }} - </span> + </h1> <transition name="fade"> <div v-if="currentSaveStateNotice" diff --git a/src/components/settings_modal/tabs/theme_tab/theme_preview.vue b/src/components/settings_modal/tabs/theme_tab/theme_preview.vue @@ -3,12 +3,12 @@ <div class="underlay underlay-preview" /> <div class="panel dummy"> <div class="panel-heading"> - <div class="title"> + <h1 class="title"> {{ $t('settings.style.preview.header') }} <span class="badge -notification"> 99 </span> - </div> + </h1> <span class="faint"> {{ $t('settings.style.preview.header_faint') }} </span> diff --git a/src/components/settings_modal/tabs/version_tab.js b/src/components/settings_modal/tabs/version_tab.js @@ -1,22 +1,17 @@ -import { extractCommit } from 'src/services/version/version.service' - const pleromaFeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma-fe/commit/' -const pleromaBeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma/commit/' const VersionTab = { data () { const instance = this.$store.state.instance return { backendVersion: instance.backendVersion, + backendRepository: instance.backendRepository, frontendVersion: instance.frontendVersion } }, computed: { frontendVersionLink () { return pleromaFeCommitUrl + this.frontendVersion - }, - backendVersionLink () { - return pleromaBeCommitUrl + extractCommit(this.backendVersion) } } } diff --git a/src/components/settings_modal/tabs/version_tab.vue b/src/components/settings_modal/tabs/version_tab.vue @@ -7,7 +7,7 @@ <ul class="option-list"> <li> <a - :href="backendVersionLink" + :href="backendRepository" target="_blank" >{{ backendVersion }}</a> </li> diff --git a/src/components/shout_panel/shout_panel.vue b/src/components/shout_panel/shout_panel.vue @@ -9,14 +9,14 @@ :class="{ 'shout-heading': floating }" @click.stop.prevent="togglePanel" > - <div class="title"> + <h1 class="title"> {{ $t('shoutbox.title') }} <FAIcon v-if="floating" icon="times" class="close-icon" /> - </div> + </h1> </div> <div class="panel-body shout-window"> <div diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue @@ -77,6 +77,21 @@ </router-link> </li> <li + v-if="currentUser" + @click="toggleDrawer" + > + <router-link + :to="{ name: 'bookmarks' }" + class="menu-item" + > + <FAIcon + fixed-width + class="fa-scale-110 fa-old-padding" + icon="bookmark" + /> {{ $t("nav.bookmarks") }} + </router-link> + </li> + <li v-if="currentUser && pleromaChatMessagesAvailable" @click="toggleDrawer" > diff --git a/src/components/status_history_modal/status_history_modal.vue b/src/components/status_history_modal/status_history_modal.vue @@ -6,7 +6,9 @@ > <div class="status-history-modal-panel panel"> <div class="panel-heading"> - {{ $t('status.status_history') }} ({{ historyCount }}) + <h1 class="title"> + {{ $t('status.status_history') }} ({{ historyCount }}) + </h1> </div> <div class="panel-body"> <div diff --git a/src/components/timeago/timeago.vue b/src/components/timeago/timeago.vue @@ -61,7 +61,7 @@ export default { }) } else if (DateUtils.isSameMonth(this.timeAsDate, now)) { return new Intl.DateTimeFormat(this.browserLocale, { - hour: 'numeric', + month: 'short', day: 'numeric' }) } else if (DateUtils.isSameYear(this.timeAsDate, now)) { diff --git a/src/components/timeline_menu/timeline_menu.vue b/src/components/timeline_menu/timeline_menu.vue @@ -29,8 +29,8 @@ </ul> </template> <template #trigger> - <span class="button-unstyled title timeline-menu-title"> - <span class="timeline-title">{{ timelineName() }}</span> + <span class="button-unstyled timeline-menu-title"> + <h1 class="title timeline-title">{{ timelineName() }}</h1> <span> <FAIcon size="sm" diff --git a/src/components/update_notification/update_notification.vue b/src/components/update_notification/update_notification.vue @@ -9,9 +9,9 @@ :class="{ '-peek': !showingMore }" > <div class="panel-heading"> - <span class="title"> + <h1 class="title"> {{ $t('update.big_update_title') }} - </span> + </h1> </div> <div class="panel-body"> <div diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue @@ -208,7 +208,7 @@ /> <template v-if="relationship.following"> <ProgressButton - v-if="!relationship.subscribing" + v-if="!relationship.notifying" class="btn button-default" :click="subscribeUser" :title="$t('user_card.subscribe')" diff --git a/src/components/user_link/user_link.vue b/src/components/user_link/user_link.vue @@ -1,12 +1,16 @@ <template> - <router-link - :title="user.screen_name_ui" - :to="userProfileLink(user)" - > - {{ at ? '@' : '' }}{{ user.screen_name_ui }}<UnicodeDomainIndicator - :user="user" - /> - </router-link> + <div class="user-profile-link"> + <router-link + :title="user.screen_name_ui" + :to="userProfileLink(user)" + > + <slot> + {{ at ? '@' : '' }}{{ user.screen_name_ui }}<UnicodeDomainIndicator + :user="user" + /> + </slot> + </router-link> + </div> </template> <script> diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue @@ -142,9 +142,9 @@ class="panel user-profile-placeholder" > <div class="panel-heading"> - <div class="title"> + <h1 class="title"> {{ $t('settings.profile_tab') }} - </div> + </h1> </div> <div> <span v-if="error">{{ error }}</span> diff --git a/src/components/user_reporting_modal/user_reporting_modal.vue b/src/components/user_reporting_modal/user_reporting_modal.vue @@ -6,7 +6,7 @@ <div class="user-reporting-panel panel"> <div class="panel-heading"> <i18n-t - tag="div" + tag="h1" keypath="user_reporting.title" class="title" > diff --git a/src/components/who_to_follow/who_to_follow.vue b/src/components/who_to_follow/who_to_follow.vue @@ -1,7 +1,9 @@ <template> <div class="panel panel-default"> <div class="panel-heading"> - {{ $t('who_to_follow.who_to_follow') }} + <h1 class="title"> + {{ $t('who_to_follow.who_to_follow') }} + </h1> </div> <div class="panel-body"> <FollowCard diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.vue b/src/components/who_to_follow_panel/who_to_follow_panel.vue @@ -2,9 +2,9 @@ <div class="who-to-follow-panel"> <div class="panel panel-default base01-background"> <div class="panel-heading timeline-heading base02-background base04"> - <div class="title"> + <h1 class="title"> {{ $t('who_to_follow.who_to_follow') }} - </div> + </h1> </div> <div class="who-to-follow"> <p diff --git a/src/modules/config.js b/src/modules/config.js @@ -185,7 +185,7 @@ export const defaultState = { closingDrawerMarksAsSeen: undefined, // instance default unseenAtTop: undefined, // instance default ignoreInactionableSeen: undefined, // instance default - useAbsoluteTimeFormat: undefined, // instance defualt + useAbsoluteTimeFormat: undefined, // instance default absoluteTimeFormatMinAge: undefined // instance default } diff --git a/src/modules/instance.js b/src/modules/instance.js @@ -159,6 +159,7 @@ const defaultState = { // Version Information backendVersion: '', + backendRepository: '', frontendVersion: '', pollsAvailable: false, diff --git a/src/modules/users.js b/src/modules/users.js @@ -452,11 +452,11 @@ const users = { commit('clearFollowers', userId) }, subscribeUser ({ rootState, commit }, id) { - return rootState.api.backendInteractor.subscribeUser({ id }) + return rootState.api.backendInteractor.followUser({ id, notify: true }) .then((relationship) => commit('updateUserRelationship', [relationship])) }, unsubscribeUser ({ rootState, commit }, id) { - return rootState.api.backendInteractor.unsubscribeUser({ id }) + return rootState.api.backendInteractor.followUser({ id, notify: false }) .then((relationship) => commit('updateUserRelationship', [relationship])) }, toggleActivationStatus ({ rootState, commit }, { user }) { diff --git a/src/panel.scss b/src/panel.scss @@ -115,6 +115,8 @@ .title { font-size: 1.3em; + margin: 0; + font-weight: normal; } .alert { diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js @@ -68,8 +68,6 @@ const MASTODON_UNBLOCK_USER_URL = id => `/api/v1/accounts/${id}/unblock` const MASTODON_MUTE_USER_URL = id => `/api/v1/accounts/${id}/mute` const MASTODON_UNMUTE_USER_URL = id => `/api/v1/accounts/${id}/unmute` const MASTODON_REMOVE_USER_FROM_FOLLOWERS = id => `/api/v1/accounts/${id}/remove_from_followers` -const MASTODON_SUBSCRIBE_USER = id => `/api/v1/pleroma/accounts/${id}/subscribe` -const MASTODON_UNSUBSCRIBE_USER = id => `/api/v1/pleroma/accounts/${id}/unsubscribe` const MASTODON_USER_NOTE_URL = id => `/api/v1/accounts/${id}/note` const MASTODON_BOOKMARK_STATUS_URL = id => `/api/v1/statuses/${id}/bookmark` const MASTODON_UNBOOKMARK_STATUS_URL = id => `/api/v1/statuses/${id}/unbookmark` @@ -275,6 +273,7 @@ const followUser = ({ id, credentials, ...options }) => { const url = MASTODON_FOLLOW_URL(id) const form = {} if (options.reblogs !== undefined) { form.reblogs = options.reblogs } + if (options.notify !== undefined) { form.notify = options.notify } return fetch(url, { body: JSON.stringify(form), headers: { @@ -1180,14 +1179,6 @@ const unmuteUser = ({ id, credentials }) => { return promisedRequest({ url: MASTODON_UNMUTE_USER_URL(id), credentials, method: 'POST' }) } -const subscribeUser = ({ id, credentials }) => { - return promisedRequest({ url: MASTODON_SUBSCRIBE_USER(id), credentials, method: 'POST' }) -} - -const unsubscribeUser = ({ id, credentials }) => { - return promisedRequest({ url: MASTODON_UNSUBSCRIBE_USER(id), credentials, method: 'POST' }) -} - const fetchBlocks = ({ maxId, credentials }) => { const query = new URLSearchParams({ with_relationships: true }) if (maxId) { @@ -1978,8 +1969,6 @@ const apiService = { fetchMutes, muteUser, unmuteUser, - subscribeUser, - unsubscribeUser, fetchBlocks, fetchOAuthTokens, revokeOAuthToken, diff --git a/src/services/version/version.service.js b/src/services/version/version.service.js @@ -1,6 +0,0 @@ - -export const extractCommit = versionString => { - const regex = /-g(\w+)/i - const matches = versionString.match(regex) - return matches ? matches[1] : '' -} diff --git a/test/unit/specs/services/version/version.service.spec.js b/test/unit/specs/services/version/version.service.spec.js @@ -1,11 +0,0 @@ -import { extractCommit } from 'src/services/version/version.service.js' - -describe('extractCommit', () => { - it('return short commit hash following "-g" characters', () => { - expect(extractCommit('1.0.0-45-g5e7aeebc')).to.eql('5e7aeebc') - }) - - it('return short commit hash without branch name', () => { - expect(extractCommit('1.0.0-45-g5e7aeebc-branch')).to.eql('5e7aeebc') - }) -})