mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-24 18:36:14 +03:00
chore: fix vite refresh
This commit is contained in:
parent
24a473e616
commit
85d30c70af
5 changed files with 12 additions and 6 deletions
|
@ -1,2 +1,2 @@
|
|||
VITE_USE_FAKE_TORRENTS=true
|
||||
VITE_USE_FAKE_TORRENTS=false
|
||||
VITE_FAKE_TORRENT_COUNT=30
|
5
env.d.ts
vendored
5
env.d.ts
vendored
|
@ -2,3 +2,8 @@ declare module '*.vue' {
|
|||
import Vue from 'vue'
|
||||
export default Vue
|
||||
}
|
||||
|
||||
declare module 'vuetify/lib/framework' {
|
||||
import Vuetify from 'vuetify';
|
||||
export default Vuetify;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ export class Torrents {
|
|||
store.state.torrents = data.map(t => new Torrent(t))
|
||||
|
||||
// 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
|
||||
store.state.torrents.push(...generateMultiple(count))
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ import { i18n } from '../plugins/i18n'
|
|||
|
||||
export default {
|
||||
INIT_INTERVALS: async context => {
|
||||
// context.state.intervals[0] = setInterval(() => {
|
||||
// context.commit('updateMainData')
|
||||
// }, 2000)
|
||||
context.state.intervals[0] = setInterval(() => {
|
||||
context.commit('updateMainData')
|
||||
}, 2000)
|
||||
},
|
||||
LOGIN: async (context, payload) => {
|
||||
const res = await qbit.login(payload)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
},
|
||||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
||||
"lib": ["WebWorker"]
|
||||
},
|
||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||
"exclude": ["node_modules"]
|
||||
|
|
Loading…
Reference in a new issue