mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
chore: run lint (#993)
This commit is contained in:
parent
0594af387f
commit
8b4a342cb8
49 changed files with 80 additions and 78 deletions
|
@ -20,11 +20,8 @@ export default {
|
|||
components: { Navbar },
|
||||
mixins: [General],
|
||||
computed: {
|
||||
...mapState(['rid', 'mainData', 'preferences', 'modals', 'webuiSettings']),
|
||||
...mapGetters(['getAuthenticated']),
|
||||
isAuthenticated() {
|
||||
return this.getAuthenticated()
|
||||
},
|
||||
...mapState(['modals', 'webuiSettings']),
|
||||
...mapGetters(['isAuthenticated']),
|
||||
onLoginPage() {
|
||||
return this.$router.currentRoute.name?.includes('login')
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import store from '@/store'
|
||||
import {formatSpeed} from '@/filters'
|
||||
import {formatProgress} from '@/filters'
|
||||
import {Torrent} from '@/models'
|
||||
import { formatSpeed } from '@/filters'
|
||||
import { formatProgress } from '@/filters'
|
||||
import { Torrent } from '@/models'
|
||||
|
||||
export class DocumentTitle {
|
||||
private static setDefault() {
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
import { defineComponent } from 'vue'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import qbit from '@/services/qbit'
|
||||
import {FullScreenModal, Modal} from '@/mixins'
|
||||
import {Torrent} from '@/models'
|
||||
import WebUISettings from '@/types/vuetorrent/WebUISettings'
|
||||
import { FullScreenModal, Modal } from '@/mixins'
|
||||
import { Torrent } from '@/models'
|
||||
import { WebUISettings } from '@/types/vuetorrent'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfirmDeleteModal',
|
||||
|
|
|
@ -178,7 +178,7 @@ import { General } from '@/mixins'
|
|||
import { TitleOptions } from '@/enums/vuetorrent'
|
||||
import Ajv from 'ajv'
|
||||
import { StoreStateSchema } from '@/schemas'
|
||||
import WebUISettings from '@/types/vuetorrent/WebUISettings'
|
||||
import { WebUISettings } from '@/types/vuetorrent'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'VueTorrent-General',
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent} from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { defineComponent } from 'vue'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'AddedOn',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'AmountLeft',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Availability',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Category',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CompletedOn',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ContentPath',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'DownloadLimit',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'DownloadPath',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'DownloadSpeed',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Downloaded',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'DownloadedSession',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ETA',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'GlobalSpeed',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'GlobalVolume',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Hash',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'InfoHashV1',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'InfoHashV2',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LastActivity',
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Peers',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Ratio',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SavePath',
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Seeds',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SeenComplete',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Size',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TimeActive',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TotalSize',
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TrackersCount',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'UploadLimit',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'UploadSpeed',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Uploaded',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'UploadedSession',
|
||||
|
|
|
@ -83,9 +83,9 @@ import { mapState } from 'vuex'
|
|||
import { mdiChevronUp, mdiChevronDown } from '@mdi/js'
|
||||
import { getDomainBody } from '@/helpers'
|
||||
import { DashboardProperty } from '@/enums/vuetorrent'
|
||||
import {TorrentDashboardItem} from '@/mixins'
|
||||
import {toPrecision} from '@/filters'
|
||||
import {TorrentProperty} from '@/types/vuetorrent'
|
||||
import { TorrentDashboardItem } from '@/mixins'
|
||||
import { toPrecision } from '@/filters'
|
||||
import { TorrentProperty } from '@/types/vuetorrent'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'MobileCard',
|
||||
|
|
|
@ -92,7 +92,14 @@
|
|||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-menu v-if="settings.queueing_enabled" :open-on-hover="!touchmode" top offset-x :transition="isRightside ? 'slide-x-reverse-transition' : 'slide-x-transition'" :left="isRightside">
|
||||
<v-menu
|
||||
v-if="settings.queueing_enabled"
|
||||
:open-on-hover="!touchmode"
|
||||
top
|
||||
offset-x
|
||||
:transition="isRightside ? 'slide-x-reverse-transition' : 'slide-x-transition'"
|
||||
:left="isRightside"
|
||||
>
|
||||
<template #activator="{ on }">
|
||||
<v-list-item link v-on="on">
|
||||
<v-icon>{{ mdiPriorityHigh }}</v-icon>
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import dayjs from 'dayjs'
|
||||
import {FullScreenModal, TorrentDashboardItem} from '@/mixins'
|
||||
import { FullScreenModal, TorrentDashboardItem } from '@/mixins'
|
||||
import qbit from '@/services/qbit'
|
||||
import { splitByUrl, stringContainsUrl } from '@/helpers'
|
||||
import { defineComponent } from 'vue'
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
<v-progress-circular v-else-if="torrent?.progress === 100" :size="100" :width="15" :value="100" color="torrent-seeding">
|
||||
<v-icon color="torrent-seeding">{{ mdiCheck }}</v-icon>
|
||||
</v-progress-circular>
|
||||
<v-progress-circular v-else :rotate="-90" :size="100" :width="15" :value="torrent?.progress ?? 0" color="accent">{{ (torrent.progress ?? 0) | progress }}</v-progress-circular>
|
||||
<v-progress-circular v-else :rotate="-90" :size="100" :width="15" :value="torrent?.progress ?? 0" color="accent">
|
||||
{{ (torrent.progress ?? 0) | progress }}
|
||||
</v-progress-circular>
|
||||
</v-col>
|
||||
<v-col cols="8" md="9" class="d-flex align-center justify-center flex-column">
|
||||
<div v-if="isFetchingMetadata">
|
||||
|
@ -136,7 +138,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import dayjs from 'dayjs'
|
||||
import {FullScreenModal, General, TorrentDashboardItem} from '@/mixins'
|
||||
import { FullScreenModal, General, TorrentDashboardItem } from '@/mixins'
|
||||
import qbit from '@/services/qbit'
|
||||
import { getDomainBody, splitByUrl, stringContainsUrl } from '@/helpers'
|
||||
import { defineComponent } from 'vue'
|
||||
|
@ -144,8 +146,8 @@ import { mapState } from 'vuex'
|
|||
import { mdiArrowDown, mdiArrowUp, mdiCheck, mdiClose, mdiPencil } from '@mdi/js'
|
||||
import { TorrentState } from '@/enums/vuetorrent'
|
||||
import { Priority } from '@/enums/qbit'
|
||||
import {TorrentFile} from '@/types/qbit/models'
|
||||
import {formatDataUnit, formatDataValue} from '@/filters'
|
||||
import { TorrentFile } from '@/types/qbit/models'
|
||||
import { formatDataUnit, formatDataValue } from '@/filters'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Overflow',
|
||||
|
@ -300,7 +302,7 @@ export default defineComponent({
|
|||
}
|
||||
},
|
||||
async changeLocation() {
|
||||
this.createModal('ChangeLocationModal', {hashes: [this.torrent?.hash as string]})
|
||||
this.createModal('ChangeLocationModal', { hashes: [this.torrent?.hash as string] })
|
||||
},
|
||||
async renameTorrentFile() {
|
||||
this.createModal('RenameTorrentFileModal', {
|
||||
|
|
|
@ -14,14 +14,14 @@ export default defineComponent({
|
|||
selectTorrent(hash: string) {
|
||||
if (!this.selectMode) this.selectMode = true
|
||||
if (this.isAlreadySelected(hash)) {
|
||||
this.$store.commit('SET_SELECTED', {type: 'remove', hash})
|
||||
this.$store.commit('SET_SELECTED', { type: 'remove', hash })
|
||||
} else {
|
||||
this.$store.commit('SET_SELECTED', {type: 'add', hash})
|
||||
this.$store.commit('SET_SELECTED', { type: 'add', hash })
|
||||
}
|
||||
},
|
||||
selectUntil(hash: string, index: number) {
|
||||
if (!this.selectMode) return
|
||||
this.$store.commit('SET_SELECTED', {type: 'until', hash, index})
|
||||
this.$store.commit('SET_SELECTED', { type: 'until', hash, index })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -41,6 +41,6 @@ export default {
|
|||
Vue.$toast.error(i18n.t('toast.resetSettingsNeeded').toString(), { timeout: 2500 })
|
||||
},
|
||||
FETCH_SEARCH_PLUGINS: async (store: Store<StoreState>) => {
|
||||
await qbit.getSearchPlugins().then(plugins => store.commit('UPDATE_SEARCH_PLUGINS', plugins))
|
||||
await qbit.getSearchPlugins().then(plugins => store.commit('SET_SEARCH_PLUGINS', plugins))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export default {
|
|||
getModals: (state: StoreState) => () => state.modals,
|
||||
getTorrents: (state: StoreState) => () => state.torrents,
|
||||
getTrackers: (state: StoreState) => () => state.trackers,
|
||||
getAuthenticated: (state: StoreState) => () => state.authenticated,
|
||||
isAuthenticated: (state: StoreState) => () => state.authenticated,
|
||||
getTorrentCountString: (state: StoreState, getters: any) => () => {
|
||||
if (state.selected_torrents.length) {
|
||||
let selectedSize = state.selected_torrents
|
||||
|
|
|
@ -93,7 +93,7 @@ export default {
|
|||
FETCH_TAGS: async (state: StoreState) => (state.tags = await qbit.getAvailableTags()),
|
||||
FETCH_FEEDS: async (state: StoreState) => (state.rss.feeds = Object.entries(await qbit.getFeeds(true)).map(([key, value]) => ({ name: key, ...value }))),
|
||||
FETCH_RULES: async (state: StoreState) => (state.rss.rules = Object.entries(await qbit.getRules()).map(([key, value]) => ({ name: key, ...value }))),
|
||||
UPDATE_SEARCH_PLUGINS: async (state: StoreState, plugins: SearchPlugin[]) => (state.searchPlugins = plugins),
|
||||
SET_SEARCH_PLUGINS: async (state: StoreState, plugins: SearchPlugin[]) => (state.searchPlugins = plugins),
|
||||
SET_CURRENT_ITEM_COUNT: (state: StoreState, count: number) => (state.filteredTorrentsCount = count),
|
||||
SET_LANGUAGE: async (state: StoreState) => setLanguage(state.webuiSettings.lang)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import type SortOptions from './SortOptions'
|
|||
import type { AppPreferences } from '../qbit/models'
|
||||
import type ModalTemplate from './ModalTemplate'
|
||||
import type { Status } from '@/models'
|
||||
import type WebUISettings from '@/types/vuetorrent/WebUISettings'
|
||||
import type WebUISettings from './WebUISettings'
|
||||
import type { SearchPlugin } from '@/types/qbit/models'
|
||||
|
||||
export interface PersistentStoreState {
|
||||
|
|
|
@ -7,7 +7,7 @@ import type SortOptions from './SortOptions'
|
|||
import type StoreState from './StoreState'
|
||||
import type { PersistentStoreState } from './StoreState'
|
||||
import type { TreeNode, TreeFile, TreeFolder, TreeRoot } from './TreeObjects'
|
||||
import { TorrentProperty } from './WebUISettings'
|
||||
import WebUISettings, { TorrentProperty } from './WebUISettings'
|
||||
import type Tracker from './Tracker'
|
||||
|
||||
export {
|
||||
|
@ -26,5 +26,6 @@ export {
|
|||
TreeFolder,
|
||||
TreeRoot,
|
||||
TorrentProperty,
|
||||
Tracker
|
||||
Tracker,
|
||||
WebUISettings
|
||||
}
|
||||
|
|
|
@ -391,7 +391,7 @@ export default {
|
|||
if (e.preventDefault) e.preventDefault()
|
||||
|
||||
if (!this.selectMode) {
|
||||
this.$store.commit('SET_SELECTED', {type: 'add', hash: data.torrent.hash})
|
||||
this.$store.commit('SET_SELECTED', { type: 'add', hash: data.torrent.hash })
|
||||
}
|
||||
|
||||
this.tmCalc.TouchMode = touchmode
|
||||
|
@ -401,7 +401,7 @@ export default {
|
|||
this.trcMenu.show = true
|
||||
})
|
||||
},
|
||||
hideTorrentRightClickMenu(e) {
|
||||
hideTorrentRightClickMenu() {
|
||||
if (!this.selectMode && this.getModals().length === 0) {
|
||||
this.resetSelected()
|
||||
}
|
||||
|
@ -486,8 +486,7 @@ export default {
|
|||
}
|
||||
|
||||
// 'Search' => Search view
|
||||
if (e.key === "/" && this.$route.name !== 'search' && document.activeElement !== document.getElementById('searchInput'))
|
||||
this.$router.push({ name: 'search' })
|
||||
if (e.key === '/' && this.$route.name !== 'search' && document.activeElement !== document.getElementById('searchInput')) this.$router.push({ name: 'search' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
import { describe, beforeEach, it, expect, vi } from 'vitest'
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import Vue from 'vue'
|
||||
import Vuetify from 'vuetify'
|
||||
import { Ripple } from 'vuetify/lib/directives'
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { mdiChevronDown } from '@mdi/js'
|
||||
import SpeedCard from '@/components/Core/SpeedCard.vue'
|
||||
import {setup} from "../helpers";
|
||||
import { mdiChevronDown } from "@mdi/js";
|
||||
import SpeedCard from "@/components/Core/SpeedCard.vue";
|
||||
import { setup } from "../helpers";
|
||||
|
||||
describe('SpeedCard.vue', () => {
|
||||
it('should render the card', () => {
|
||||
|
|
|
@ -11,14 +11,14 @@ let wrapper
|
|||
describe('StorageCard.vue', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = shallowMount(StorageCard, {
|
||||
propsData: {label, value, color},
|
||||
propsData: { label, value, color },
|
||||
filters: {
|
||||
formatDataValue: vi.fn().mockReturnValue('9.77'),
|
||||
formatDataUnit: vi.fn().mockReturnValue('KB')
|
||||
},
|
||||
mocks: {
|
||||
$store: {
|
||||
getters: { shouldUseBinaryData: vi.fn().mockReturnValue(true) },
|
||||
getters: { shouldUseBinaryData: vi.fn().mockReturnValue(true) }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import {titleCase, capitalize, formatData, formatSpeed, toPrecision} from '@/filters'
|
||||
import { titleCase, capitalize, formatData, formatSpeed, toPrecision } from '@/filters'
|
||||
|
||||
describe('Filters', () => {
|
||||
it('titleCase', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue