chore: fix vite refresh

This commit is contained in:
WDaan 2022-11-15 11:52:45 +01:00
parent 24a473e616
commit 85d30c70af
5 changed files with 12 additions and 6 deletions

View file

@ -1,2 +1,2 @@
VITE_USE_FAKE_TORRENTS=true VITE_USE_FAKE_TORRENTS=false
VITE_FAKE_TORRENT_COUNT=30 VITE_FAKE_TORRENT_COUNT=30

5
env.d.ts vendored
View file

@ -2,3 +2,8 @@ declare module '*.vue' {
import Vue from 'vue' import Vue from 'vue'
export default Vue export default Vue
} }
declare module 'vuetify/lib/framework' {
import Vuetify from 'vuetify';
export default Vuetify;
}

View file

@ -18,7 +18,8 @@ export class Torrents {
store.state.torrents = data.map(t => new Torrent(t)) store.state.torrents = data.map(t => new Torrent(t))
// load fake torrents if enabled // load fake torrents if enabled
if (isProduction() && !import.meta.env.VITE_USE_FAKE_TORRENTS) return if (isProduction()) return
if(import.meta.env.VITE_USE_FAKE_TORRENTS == 'false') return
const count = import.meta.env.VITE_FAKE_TORRENT_COUNT const count = import.meta.env.VITE_FAKE_TORRENT_COUNT
store.state.torrents.push(...generateMultiple(count)) store.state.torrents.push(...generateMultiple(count))
} }

View file

@ -4,9 +4,9 @@ import { i18n } from '../plugins/i18n'
export default { export default {
INIT_INTERVALS: async context => { INIT_INTERVALS: async context => {
// context.state.intervals[0] = setInterval(() => { context.state.intervals[0] = setInterval(() => {
// context.commit('updateMainData') context.commit('updateMainData')
// }, 2000) }, 2000)
}, },
LOGIN: async (context, payload) => { LOGIN: async (context, payload) => {
const res = await qbit.login(payload) const res = await qbit.login(payload)

View file

@ -13,7 +13,7 @@
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"]
}, },
"lib": ["esnext", "dom", "dom.iterable", "scripthost"] "lib": ["WebWorker"]
}, },
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"], "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["node_modules"] "exclude": ["node_modules"]