mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-28 21:38:52 +03:00
refactor: remove redundant imports
This commit is contained in:
parent
0fe159c761
commit
5122a9706f
34 changed files with 1 additions and 70 deletions
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import { toggleFollowAccount, useRelationship } from '~~/composables/masto/relationship'
|
||||
|
||||
const { account, command, context, ...props } = defineProps<{
|
||||
account: mastodon.v1.Account
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import { fetchAccountByHandle } from '~/composables/cache'
|
||||
|
||||
type WatcherType = [acc?: mastodon.v1.Account | null, h?: string, v?: boolean]
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import { toggleBlockAccount, toggleBlockDomain, toggleMuteAccount } from '~~/composables/masto/relationship'
|
||||
|
||||
const { account } = defineProps<{
|
||||
account: mastodon.v1.Account
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { LocaleObject } from '@nuxtjs/i18n'
|
||||
import type { AriaAnnounceType, AriaLive } from '~/composables/aria'
|
||||
|
||||
const router = useRouter()
|
||||
const { t, locale, locales } = useI18n()
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import type { AriaLive } from '~/composables/aria'
|
||||
|
||||
// tsc complaining when using $defineProps
|
||||
withDefaults(defineProps<{
|
||||
title: string
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import type { AriaLive } from '~/composables/aria'
|
||||
|
||||
// tsc complaining when using $defineProps
|
||||
withDefaults(defineProps<{
|
||||
ariaLive?: AriaLive
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script lang="ts" setup>
|
||||
import type { ResolvedCommand } from '~/composables/command'
|
||||
|
||||
const {
|
||||
cmd,
|
||||
index,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { SearchResult as SearchResultType } from '~/composables/masto/search'
|
||||
import type { CommandScope, QueryResult, QueryResultItem } from '~/composables/command'
|
||||
type SearchResultType = SearchResult
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'close'): void
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import type { ConfirmDialogChoice } from '~/types'
|
||||
import {
|
||||
isCommandPanelOpen,
|
||||
isConfirmDialogOpen,
|
||||
isEditHistoryDialogOpen,
|
||||
isErrorDialogOpen,
|
||||
isFavouritedBoostedByDialogOpen,
|
||||
isKeyboardShortcutsDialogOpen,
|
||||
isMediaPreviewOpen,
|
||||
isPreviewHelpOpen,
|
||||
isPublishDialogOpen,
|
||||
isReportDialogOpen,
|
||||
isSigninDialogOpen,
|
||||
} from '~/composables/dialog'
|
||||
|
||||
const isMac = useIsMac()
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { Component } from 'vue'
|
||||
import type { NavButtonName } from '../../composables/settings'
|
||||
|
||||
import { STORAGE_KEY_BOTTOM_NAV_BUTTONS } from '~/constants'
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import { toggleBlockAccount, toggleFollowAccount, toggleMuteAccount, useRelationship } from '~~/composables/masto/relationship'
|
||||
|
||||
const { account, status } = defineProps<{
|
||||
account: mastodon.v1.Account
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import type { SearchResult } from '~/composables/masto/search'
|
||||
|
||||
defineProps<{
|
||||
result: SearchResult
|
||||
active: boolean
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import type { NavButtonName } from '~/composables/settings'
|
||||
import { STORAGE_KEY_BOTTOM_NAV_BUTTONS } from '~/constants'
|
||||
|
||||
interface NavButton {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import type { ColorMode } from '~/composables/settings'
|
||||
|
||||
const colorMode = useColorMode()
|
||||
|
||||
function setColorMode(mode: ColorMode) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { DEFAULT_FONT_SIZE } from '~/constants'
|
||||
import type { FontSize } from '~/composables/settings'
|
||||
|
||||
const userSettings = useUserSettings()
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import type { ThemeColors } from '~/composables/settings'
|
||||
|
||||
const themes = await import('~/constants/themes.json').then(r => r.default) as [string, ThemeColors][]
|
||||
const settings = useUserSettings()
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import { toggleBlockAccount, toggleMuteAccount, useRelationship } from '~~/composables/masto/relationship'
|
||||
|
||||
const props = defineProps<{
|
||||
status: mastodon.v1.Status
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import { favouritedBoostedByStatusId } from '~/composables/dialog'
|
||||
|
||||
const type = ref<'favourited-by' | 'boosted-by'>('favourited-by')
|
||||
|
||||
const { client } = useMasto()
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import { fetchAccountById } from '~/composables/cache'
|
||||
|
||||
type WatcherType = [status?: mastodon.v1.Status, v?: boolean]
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { getEmojiMatchesInText } from '@iconify/utils/lib/emoji/replace/find'
|
||||
import type { CustomEmoji, Emoji } from '~/composables/tiptap/suggestion'
|
||||
import { isCustomEmoji } from '~/composables/tiptap/suggestion'
|
||||
import { emojiFilename, emojiPrefix, emojiRegEx } from '~~/config/emojis'
|
||||
import type { CommandHandler } from '~/composables/command'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: (CustomEmoji | Emoji)[]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import type { CommandHandler } from '~/composables/command'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: mastodon.v1.Tag[]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
import type { CommandHandler } from '~/composables/command'
|
||||
|
||||
const { items, command } = defineProps<{
|
||||
items: mastodon.v1.Account[]
|
||||
|
|
|
@ -2,7 +2,6 @@ import type { ComputedRef } from 'vue'
|
|||
import { defineStore } from 'pinia'
|
||||
import Fuse from 'fuse.js'
|
||||
import type { LocaleObject } from '@nuxtjs/i18n'
|
||||
import type { SearchResult } from '~/composables/masto/search'
|
||||
|
||||
// @unocss-include
|
||||
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
import type { mastodon } from 'masto'
|
||||
import type {
|
||||
CreatePushNotification,
|
||||
PushManagerSubscriptionInfo,
|
||||
RequiredUserLogin,
|
||||
} from '~/composables/push-notifications/types'
|
||||
import { PushSubscriptionError } from '~/composables/push-notifications/types'
|
||||
|
||||
export async function createPushSubscription(
|
||||
user: RequiredUserLogin,
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
import type { mastodon } from 'masto'
|
||||
|
||||
import type {
|
||||
CreatePushNotification,
|
||||
PushNotificationPolicy,
|
||||
PushNotificationRequest,
|
||||
SubscriptionResult,
|
||||
} from '~/composables/push-notifications/types'
|
||||
import { STORAGE_KEY_NOTIFICATION, STORAGE_KEY_NOTIFICATION_POLICY } from '~/constants'
|
||||
|
||||
const supportsPushNotifications = typeof window !== 'undefined'
|
||||
|
|
|
@ -6,7 +6,6 @@ import { PluginKey } from 'prosemirror-state'
|
|||
import type { Component } from 'vue'
|
||||
import type { Emoji, EmojiMartData } from '@emoji-mart/data'
|
||||
import type { mastodon } from 'masto'
|
||||
import { currentCustomEmojis, updateCustomEmojis } from '~/composables/emojis'
|
||||
import TiptapMentionList from '~/components/tiptap/TiptapMentionList.vue'
|
||||
import TiptapHashtagList from '~/components/tiptap/TiptapHashtagList.vue'
|
||||
import TiptapEmojiList from '~/components/tiptap/TiptapEmojiList.vue'
|
||||
|
|
|
@ -14,8 +14,6 @@ import {
|
|||
STORAGE_KEY_SERVERS,
|
||||
STORAGE_KEY_USERS,
|
||||
} from '~/constants'
|
||||
import type { PushNotificationPolicy, PushNotificationRequest } from '~/composables/push-notifications/types'
|
||||
import { useAsyncIDBKeyval } from '~/composables/idb'
|
||||
|
||||
const mock = process.mock
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script lang="ts" setup>
|
||||
import { usePreferences } from '~/composables/settings'
|
||||
|
||||
const route = useRoute()
|
||||
const info = useBuildInfo()
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import type { RouteLocationRaw } from 'vue-router'
|
||||
import { useMagicSequence } from '~/composables/magickeys'
|
||||
import { currentUser, getInstanceDomain } from '~/composables/users'
|
||||
|
||||
export default defineNuxtPlugin(({ $scrollToTop }) => {
|
||||
const keys = useMagicKeys()
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import type { OldFontSize } from '~/composables/settings'
|
||||
import { oldFontSizeMap } from '~/constants/options'
|
||||
import { DEFAULT_FONT_SIZE } from '~/constants'
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Buffer } from 'node:buffer'
|
|||
import { join, resolve } from 'pathe'
|
||||
import fs from 'fs-extra'
|
||||
import { ofetch } from 'ofetch'
|
||||
import { elkTeamMembers } from '../composables/about'
|
||||
|
||||
const avatarsDir = resolve('./public/avatars/')
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import chroma from 'chroma-js'
|
||||
import type { ThemeColors } from '~/composables/settings'
|
||||
|
||||
// #cc7d24 -> hcl(67.14,62.19,59.56)
|
||||
export const themesColor = Array.from(
|
||||
|
|
|
@ -3,8 +3,6 @@ import { renderToString } from 'vue/server-renderer'
|
|||
import { format } from 'prettier'
|
||||
import type { mastodon } from 'masto'
|
||||
import { mockComponent } from '@nuxt/test-utils/runtime'
|
||||
import { contentToVNode } from '~/composables/content-render'
|
||||
import type { ContentParseOptions } from '~/composables/content-parse'
|
||||
|
||||
beforeEach(() => {
|
||||
publicServer.value = useRuntimeConfig().public.defaultServer
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
import { format } from 'prettier'
|
||||
import { render as renderTree } from 'ultrahtml'
|
||||
import type { ContentParseOptions } from '~/composables/content-parse'
|
||||
|
||||
describe('html-parse', () => {
|
||||
it('empty', async () => {
|
||||
|
|
Loading…
Reference in a new issue