cleanup unused imports
This commit is contained in:
parent
495e6143d4
commit
893ab9d73b
60 changed files with 15 additions and 101 deletions
|
|
@ -46,6 +46,7 @@
|
|||
"noUnusedLabels": "error",
|
||||
"noUnusedPrivateClassMembers": "error",
|
||||
"noUnusedVariables": "error",
|
||||
"noUnusedImports": "error",
|
||||
"useIsNan": "error",
|
||||
"useValidForDirection": "error",
|
||||
"useValidTypeof": "error",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { readFile } from 'node:fs/promises'
|
||||
import { dirname, resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { exactRegex } from '@rolldown/pluginutils'
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@ import { useInterfaceStore } from 'src/stores/interface.js'
|
|||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useShoutStore } from 'src/stores/shout.js'
|
||||
|
||||
import messages from 'src/i18n/messages'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
||||
// Helper to unwrap reactive proxies
|
||||
window.toValue = (x) => JSON.parse(JSON.stringify(x))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
import { promisedRequest } from './helpers.js'
|
||||
|
||||
import { RegistrationError, StatusCodeError } from 'src/services/errors/errors'
|
||||
|
||||
const REPORTS = '/api/v1/pleroma/admin/reports'
|
||||
const CONFIG_URL = '/api/v1/pleroma/admin/config'
|
||||
const DESCRIPTIONS_URL = '/api/v1/pleroma/admin/config/descriptions'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { snakeCase } from 'lodash'
|
||||
|
||||
import { RegistrationError, StatusCodeError } from 'src/services/errors/errors'
|
||||
import { StatusCodeError } from 'src/services/errors/errors'
|
||||
|
||||
export const paramsString = (params = {}) => {
|
||||
if (params == null || params === undefined) return ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { reduce } from 'lodash'
|
||||
|
||||
import { paramsString, promisedRequest } from './helpers.js'
|
||||
|
||||
const REDIRECT_URI = `${window.location.origin}/oauth-callback`
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import {
|
|||
parseStatus,
|
||||
parseUser,
|
||||
} from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
import { RegistrationError, StatusCodeError } from 'src/services/errors/errors'
|
||||
|
||||
const MASTODON_SUGGESTIONS_URL = '/api/v1/suggestions'
|
||||
const MASTODON_LOGIN_URL = '/api/v1/accounts/verify_credentials'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { paramsString, promisedRequest } from './helpers.js'
|
||||
import { paramsString } from './helpers.js'
|
||||
|
||||
import {
|
||||
parseChat,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import {
|
|||
} from '../services/window_utils/window_utils'
|
||||
import routes from './routes'
|
||||
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements'
|
||||
import { useAuthFlowStore } from 'src/stores/auth_flow'
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useI18nStore } from 'src/stores/i18n'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { mapState } from 'pinia'
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import VideoAttachment from 'src/components/video_attachment/video_attachment.vue'
|
||||
import nsfwImage from '../../assets/nsfw.png'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import Attachment from 'src/components/attachment/attachment.vue'
|
||||
import ChatMessageDate from 'src/components/chat_message_date/chat_message_date.vue'
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
|||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { chats } from 'src/api/chats.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faChevronLeft, faSearch } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||
import UserPopover from 'src/components/user_popover/user_popover.vue'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
|
||||
/**
|
||||
* suggest - generates a suggestor function to be used by emoji-input
|
||||
* data: object providing source information for specific types of suggestions:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import Popover from 'src/components/popover/popover.vue'
|
|||
import { ensureFinalFallback } from '../../i18n/languages.js'
|
||||
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { mapState } from 'vuex'
|
|||
import { getListEntries } from 'src/components/navigation/filter.js'
|
||||
import NavigationEntry from 'src/components/navigation/navigation_entry.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useListsStore } from 'src/stores/lists.js'
|
||||
|
||||
export const ListsMenuContent = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { mapActions, mapState as mapPiniaState, mapStores } from 'pinia'
|
||||
import { mapActions, mapState as mapPiniaState } from 'pinia'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import { useAuthFlowStore } from 'src/stores/auth_flow.js'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Modal from 'src/components/modal/modal.vue'
|
||||
import StillImage from 'src/components/still-image/still-image.vue'
|
||||
import GestureService from '../../services/gesture_service/gesture_service'
|
||||
|
||||
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import UnicodeDomainIndicator from 'src/components/unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
|||
import Popover from 'src/components/popover/popover.vue'
|
||||
|
||||
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { debounce, map, reject, uniqBy } from 'lodash'
|
||||
import { mapActions, mapState } from 'pinia'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import Attachment from 'src/components/attachment/attachment.vue'
|
||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { get } from 'lodash'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Modal from 'src/components/modal/modal.vue'
|
||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import BasicUserCard from 'src/components/basic_user_card/basic_user_card.vue'
|
||||
import ModerationTools from 'src/components/moderation_tools/moderation_tools.vue'
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import Checkbox from 'components/checkbox/checkbox.vue'
|
|||
import Popover from 'components/popover/popover.vue'
|
||||
import Select from 'components/select/select.vue'
|
||||
import StillImage from 'components/still-image/still-image.vue'
|
||||
import { assign, clone } from 'lodash'
|
||||
import { clone } from 'lodash'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { isEmpty } from 'lodash'
|
||||
|
||||
import BasicUserCard from 'src/components/basic_user_card/basic_user_card.vue'
|
||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import List from 'src/components/list/list.vue'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import LocalSettingIndicator from './local_setting_indicator.vue'
|
|||
import ModifiedIndicator from './modified_indicator.vue'
|
||||
|
||||
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
// eslint-disable-next-line no-unused
|
||||
|
||||
import { throttle } from 'lodash'
|
||||
import { mapState as mapPiniaState, mapState } from 'pinia'
|
||||
import { Fragment, h } from 'vue'
|
||||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { Fragment } from 'vue'
|
||||
|
||||
import { FontAwesomeIcon as FAIcon } from '@fortawesome/vue-fontawesome'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
||||
import AuthTab from './admin_tabs/auth_tab.vue'
|
||||
import EmojiTab from './admin_tabs/emoji_tab.vue'
|
||||
import FederationTab from './admin_tabs/federation_tab.vue'
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import FloatSetting from '../helpers/float_setting.vue'
|
|||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { get, isEmpty, map, reject } from 'lodash'
|
||||
import { get, map, reject } from 'lodash'
|
||||
|
||||
import Autosuggest from 'src/components/autosuggest/autosuggest.vue'
|
||||
import BlockCard from 'src/components/block_card/block_card.vue'
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
const PostsTab = {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import Confirm from './confirm.vue'
|
||||
import RecoveryCodes from './mfa_backup_codes.vue'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { mapState } from 'vuex'
|
||||
|
||||
import Confirm from './confirm.vue'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import Checkbox from 'src/components/checkbox/checkbox.vue'
|
|||
import ProgressButton from 'src/components/progress_button/progress_button.vue'
|
||||
import Mfa from './mfa.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { mapActions, mapState } from 'pinia'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import Attachment from 'src/components/attachment/attachment.vue'
|
||||
import Gallery from 'src/components/gallery/gallery.vue'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { find } from 'lodash'
|
||||
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import Status from 'src/components/status/status.vue'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import statusPosterService from '../../services/status_poster/status_poster.serv
|
|||
import TabSwitcher from '../tab_switcher/tab_switcher.jsx'
|
||||
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
||||
const StickerPicker = {
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
// eslint-disable-next-line no-unused
|
||||
|
||||
import { mapState } from 'pinia'
|
||||
import { Fragment, h } from 'vue'
|
||||
import { Fragment } from 'vue'
|
||||
|
||||
import { FontAwesomeIcon as FAIcon } from '@fortawesome/vue-fontawesome'
|
||||
|
||||
import './tab_switcher.scss'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
const findFirstUsable = (slots) => slots.findIndex((_) => _.props)
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.j
|
|||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useMediaViewerStore } from 'src/stores/media_viewer'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { usePostStatusStore } from 'src/stores/post_status'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import UnicodeDomainIndicator from 'src/components/unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { mapState } from 'pinia'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import UserCard from 'src/components/user_card/user_card.vue'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { get } from 'lodash'
|
||||
import { mapState } from 'pinia'
|
||||
|
||||
import FollowCard from 'src/components/follow_card/follow_card.vue'
|
||||
import List from 'src/components/list/list.vue'
|
||||
|
|
@ -7,7 +6,6 @@ import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
|||
import Timeline from 'src/components/timeline/timeline.vue'
|
||||
import UserCard from 'src/components/user_card/user_card.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
import { get } from 'lodash'
|
||||
import { mapState } from 'pinia'
|
||||
|
||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import List from 'src/components/list/list.vue'
|
||||
import Status from 'src/components/status/status.vue'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import FollowCard from 'src/components/follow_card/follow_card.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchUser, suggestions } from 'src/api/public.js'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import Cookies from 'js-cookie'
|
||||
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useI18nStore } from 'src/stores/i18n.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { Socket } from 'phoenix'
|
|||
|
||||
import { maybeShowChatNotification } from '../services/chat_utils/chat_utils.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { get, set } from 'lodash'
|
||||
import { get } from 'lodash'
|
||||
|
||||
const browserLocale = (navigator.language || 'en').split('-')[0]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { camelCase } from 'lodash'
|
|||
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { get, set } from 'lodash'
|
||||
import { set } from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
import { cloneDeep, set } from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
import { toRaw } from 'vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance'
|
||||
|
||||
import {
|
||||
LOCAL_DEFAULT_CONFIG,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import { toRaw } from 'vue'
|
|||
|
||||
import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
import {
|
||||
merge as _merge,
|
||||
clamp,
|
||||
clone,
|
||||
cloneDeep,
|
||||
findLastIndex,
|
||||
flatten,
|
||||
get,
|
||||
groupBy,
|
||||
isEqual,
|
||||
takeRight,
|
||||
uniqWith,
|
||||
} from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
import { toRaw } from 'vue'
|
||||
|
|
@ -33,17 +29,6 @@ export const defaultState = {
|
|||
cache: null,
|
||||
}
|
||||
|
||||
export const _moveItemInArray = (array, value, movement) => {
|
||||
const oldIndex = array.indexOf(value)
|
||||
const newIndex = oldIndex + movement
|
||||
const newArray = [...array]
|
||||
// remove old
|
||||
newArray.splice(oldIndex, 1)
|
||||
// add new
|
||||
newArray.splice(clamp(newIndex, 0, newArray.length + 1), 0, value)
|
||||
return newArray
|
||||
}
|
||||
|
||||
const _wrapData = (data, userName) => {
|
||||
return {
|
||||
...data,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import mastoapidata from '../../../../fixtures/mastoapi.json'
|
|||
|
||||
import {
|
||||
parseLinkHeaderPagination,
|
||||
parseNotification,
|
||||
parseStatus,
|
||||
parseUser,
|
||||
} from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ describe('The lists store', () => {
|
|||
let store
|
||||
|
||||
beforeEach(() => {
|
||||
createTestingPinia({ stubActions: false })
|
||||
setActivePinia(createTestingPinia({ stubActions: false }))
|
||||
store = useListsStore()
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import { useOAuthStore } from 'src/stores/oauth.js'
|
|||
import {
|
||||
MASTODON_APP_URL,
|
||||
MASTODON_APP_VERIFY_URL,
|
||||
OAUTH_MFA_CHALLENGE_URL,
|
||||
OAUTH_REVOKE_URL,
|
||||
OAUTH_TOKEN_URL,
|
||||
} from 'src/api/oauth.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import { cloneDeep } from 'lodash'
|
||||
import { createPinia, setActivePinia } from 'pinia'
|
||||
|
||||
import {
|
||||
_getRecentData,
|
||||
_mergeHighlights,
|
||||
_moveItemInArray,
|
||||
useUserHighlightStore,
|
||||
} from 'src/stores/user_highlight.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { dirname, resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { DevTools } from '@vitejs/devtools'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import { playwright } from '@vitest/browser-playwright'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue