mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
add pinia colada delay plugin
This commit is contained in:
parent
fba032fb20
commit
f105fcebe6
4 changed files with 28 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import { availableLocales } from '@/utils/i18n/locale-helper'
|
|||
import { localeDecorator } from './locale.decorator'
|
||||
import { vuetifyViewports } from './viewport'
|
||||
import { allModes } from './modes'
|
||||
import { PiniaColadaDelay } from '@pinia/colada-plugin-delay'
|
||||
|
||||
initialize(
|
||||
{
|
||||
|
|
@ -76,7 +77,12 @@ setup((app) => {
|
|||
app.use(vueIntl)
|
||||
app.use(createPinia())
|
||||
app.use(PiniaColada, {
|
||||
plugins: [PiniaColadaAutoRefetch()],
|
||||
plugins: [
|
||||
PiniaColadaAutoRefetch(),
|
||||
PiniaColadaDelay({
|
||||
delay: 200, // default delay
|
||||
}),
|
||||
],
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
13
next-ui/package-lock.json
generated
13
next-ui/package-lock.json
generated
|
|
@ -11,6 +11,7 @@
|
|||
"@formatjs/intl-localematcher": "^0.6.1",
|
||||
"@pinia/colada": "^0.17.5",
|
||||
"@pinia/colada-plugin-auto-refetch": "^0.2.2",
|
||||
"@pinia/colada-plugin-delay": "^0.1.0",
|
||||
"@vueuse/core": "^13.9.0",
|
||||
"core-js": "^3.45.1",
|
||||
"marked": "^16.3.0",
|
||||
|
|
@ -2119,6 +2120,18 @@
|
|||
"@pinia/colada": ">=0.17.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@pinia/colada-plugin-delay": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-plugin-delay/-/colada-plugin-delay-0.1.0.tgz",
|
||||
"integrity": "sha512-E7E0I/JN0R4BBDacbW54kyM6eyOWiUP8efIHDb2TSd38N40pOuiYobIXCJJYXeCei9WYij29Xa22QIxYXvOfBw==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/posva"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pinia/colada": ">=0.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pinia/colada/node_modules/@vue/devtools-api": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-8.0.2.tgz",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
"@formatjs/intl-localematcher": "^0.6.1",
|
||||
"@pinia/colada": "^0.17.5",
|
||||
"@pinia/colada-plugin-auto-refetch": "^0.2.2",
|
||||
"@pinia/colada-plugin-delay": "^0.1.0",
|
||||
"@vueuse/core": "^13.9.0",
|
||||
"core-js": "^3.45.1",
|
||||
"marked": "^16.3.0",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import pinia from '../stores'
|
|||
import router from '../router'
|
||||
import { PiniaColada } from '@pinia/colada'
|
||||
import { PiniaColadaAutoRefetch } from '@pinia/colada-plugin-auto-refetch'
|
||||
import { PiniaColadaDelay } from '@pinia/colada-plugin-delay'
|
||||
import { vueIntl } from '@/plugins/vue-intl'
|
||||
|
||||
// Types
|
||||
|
|
@ -27,7 +28,12 @@ export function registerPlugins(app: App) {
|
|||
.use(router)
|
||||
.use(pinia)
|
||||
.use(PiniaColada, {
|
||||
plugins: [PiniaColadaAutoRefetch()],
|
||||
plugins: [
|
||||
PiniaColadaAutoRefetch(),
|
||||
PiniaColadaDelay({
|
||||
delay: 200, // default delay
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
// register navigation guards
|
||||
|
|
|
|||
Loading…
Reference in a new issue