mirror of
https://github.com/gotson/komga.git
synced 2026-05-07 20:15:47 +02:00
bump pinia colada
This commit is contained in:
parent
4bbc181dad
commit
17f29ef3ca
28 changed files with 171 additions and 186 deletions
49
next-ui/package-lock.json
generated
49
next-ui/package-lock.json
generated
|
|
@ -9,9 +9,9 @@
|
|||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@formatjs/intl-localematcher": "^0.8.1",
|
||||
"@pinia/colada": "^0.21.2",
|
||||
"@pinia/colada-plugin-auto-refetch": "^0.2.4",
|
||||
"@pinia/colada-plugin-delay": "^0.1.4",
|
||||
"@pinia/colada": "^1.0.0",
|
||||
"@pinia/colada-plugin-auto-refetch": "^0.2.6",
|
||||
"@pinia/colada-plugin-delay": "^0.2.0",
|
||||
"@vueuse/components": "^14.2.1",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"@vueuse/router": "^14.2.1",
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
"@eslint/js": "^9.39.2",
|
||||
"@formatjs/cli": "^6.13.0",
|
||||
"@iconify-json/mdi": "^1.2.3",
|
||||
"@pinia/colada-devtools": "^0.4.2",
|
||||
"@pinia/colada-devtools": "^0.4.5",
|
||||
"@storybook/addon-a11y": "^10.2.16",
|
||||
"@storybook/addon-docs": "^10.2.16",
|
||||
"@storybook/addon-themes": "^10.2.16",
|
||||
|
|
@ -2391,9 +2391,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@pinia/colada": {
|
||||
"version": "0.21.2",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada/-/colada-0.21.2.tgz",
|
||||
"integrity": "sha512-k2epk1jed5cTmNA7l00UtsFRyqw9HfyU6WO4cV0BMUT3sSE4CMLCilprbLAL5h2bxD76WSiglciI/6o+Uh7Vzw==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada/-/colada-1.0.0.tgz",
|
||||
"integrity": "sha512-YKSybA6wusFK4CAUPzItoSgPCfScVnnnO2MSlmaaisE/L7luE77GxFyhTzipM8IbvbXh4zkCy97OE7w9WX34wA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/posva"
|
||||
|
|
@ -2404,9 +2404,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@pinia/colada-devtools": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-devtools/-/colada-devtools-0.4.2.tgz",
|
||||
"integrity": "sha512-BikO2+rfSNeUyKoHncWDQINEEiux3yN4/JbAoCjt6Tv32f7sG8aBFiHkXJ/xWa3kIxAP9Xgj/+CmTueTYzj7fA==",
|
||||
"version": "0.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-devtools/-/colada-devtools-0.4.5.tgz",
|
||||
"integrity": "sha512-YSUa5nVmtbcQG+to7qysixNcB49bxEMUo+VvkU9YFrUNFPhPVUl+tMx3Xx79J024MEV46nQkyf1+hpQ4kwSsyg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
|
|
@ -2414,24 +2414,27 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@pinia/colada-plugin-auto-refetch": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-plugin-auto-refetch/-/colada-plugin-auto-refetch-0.2.4.tgz",
|
||||
"integrity": "sha512-+/XTIX+7gaRt6vXyqAyXDjujjVU+EyHM3851zdlD/qsoHjt9V5VgjOPnUWwtAwHjipd5jfkCoDN3uyVEsxiOqA==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@pinia/colada": ">=0.17.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@pinia/colada-plugin-delay": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-plugin-delay/-/colada-plugin-delay-0.1.4.tgz",
|
||||
"integrity": "sha512-FYpOj7IamiyWi42wx3o81IVIkUbmxUhmh4DVXD3hD53mJE3WJ5Gl+NC1XVcA8cTxISnOq3b/08Xda+qFPNgY/A==",
|
||||
"version": "0.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-plugin-auto-refetch/-/colada-plugin-auto-refetch-0.2.6.tgz",
|
||||
"integrity": "sha512-u/W8orRnOEHKWqatQ1yaHr9R1UPKJseHKjShW23oqq4TrOZvR6RU8Nc7flBtTbauU2KCydpgDQE68tWAZ4sNsg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/posva"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pinia/colada": ">=0.19.1"
|
||||
"@pinia/colada": ">=1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pinia/colada-plugin-delay": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@pinia/colada-plugin-delay/-/colada-plugin-delay-0.2.0.tgz",
|
||||
"integrity": "sha512-NrcvBGyVqMP/rajoDgM/Za603jKDxId+cLQRK05Xp0vvh4YI5EmiQ8gP17rsZ5RTJiagOyxQAfr2hIkHhHgLGQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/posva"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@pinia/colada": ">=1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pkgjs/parseargs": {
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@formatjs/intl-localematcher": "^0.8.1",
|
||||
"@pinia/colada": "^0.21.2",
|
||||
"@pinia/colada-plugin-auto-refetch": "^0.2.4",
|
||||
"@pinia/colada-plugin-delay": "^0.1.4",
|
||||
"@pinia/colada": "^1.0.0",
|
||||
"@pinia/colada-plugin-auto-refetch": "^0.2.6",
|
||||
"@pinia/colada-plugin-delay": "^0.2.0",
|
||||
"@vueuse/components": "^14.2.1",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"@vueuse/router": "^14.2.1",
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
"@eslint/js": "^9.39.2",
|
||||
"@formatjs/cli": "^6.13.0",
|
||||
"@iconify-json/mdi": "^1.2.3",
|
||||
"@pinia/colada-devtools": "^0.4.2",
|
||||
"@pinia/colada-devtools": "^0.4.5",
|
||||
"@storybook/addon-a11y": "^10.2.16",
|
||||
"@storybook/addon-docs": "^10.2.16",
|
||||
"@storybook/addon-themes": "^10.2.16",
|
||||
|
|
|
|||
|
|
@ -12,11 +12,9 @@ export const QUERY_KEYS_BOOKS = {
|
|||
export const bookListQuery = defineQueryOptions(
|
||||
({
|
||||
search,
|
||||
pause = false,
|
||||
pageRequest,
|
||||
}: {
|
||||
search: components['schemas']['BookSearch']
|
||||
pause?: boolean
|
||||
pageRequest?: PageRequest
|
||||
}) => ({
|
||||
key: QUERY_KEYS_BOOKS.bySearch({ search: search, pageRequest: pageRequest }),
|
||||
|
|
@ -32,8 +30,7 @@ export const bookListQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,12 +12,10 @@ export const collectionsListQuery = defineQueryOptions(
|
|||
({
|
||||
search,
|
||||
libraryIds,
|
||||
pause = false,
|
||||
pageRequest,
|
||||
}: {
|
||||
search?: string
|
||||
libraryIds?: string[]
|
||||
pause?: boolean
|
||||
pageRequest?: PageRequest
|
||||
}) => ({
|
||||
key: QUERY_KEYS_COLLECTIONS.bySearch({ search: search, libraryIds, pageRequest: pageRequest }),
|
||||
|
|
@ -34,8 +32,7 @@ export const collectionsListQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ export const historyQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const pageHashesKnownQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ export const pageHashesUnknownQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
@ -86,6 +86,6 @@ export const pageHashMatchesQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,12 +12,10 @@ export const readListsListQuery = defineQueryOptions(
|
|||
({
|
||||
search,
|
||||
libraryIds,
|
||||
pause = false,
|
||||
pageRequest,
|
||||
}: {
|
||||
search?: string
|
||||
libraryIds?: string[]
|
||||
pause?: boolean
|
||||
pageRequest?: PageRequest
|
||||
}) => ({
|
||||
key: QUERY_KEYS_READLIST.bySearch({
|
||||
|
|
@ -38,8 +36,7 @@ export const readListsListQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ export const authorsQuery = defineQueryOptions(
|
|||
series_id,
|
||||
readlist_id,
|
||||
pageRequest,
|
||||
pause = false,
|
||||
placeholder = true,
|
||||
}: {
|
||||
search?: string
|
||||
role?: string
|
||||
|
|
@ -21,8 +19,6 @@ export const authorsQuery = defineQueryOptions(
|
|||
series_id?: string[]
|
||||
readlist_id?: string[]
|
||||
pageRequest?: PageRequest
|
||||
pause?: boolean
|
||||
placeholder?: boolean
|
||||
}) => {
|
||||
const queryParams = {
|
||||
search: search,
|
||||
|
|
@ -44,8 +40,6 @@ export const authorsQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: placeholder ? (previousData: any) => previousData : undefined, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
@ -56,15 +50,11 @@ export const genresQuery = defineQueryOptions(
|
|||
library_id,
|
||||
collection_id,
|
||||
pageRequest,
|
||||
pause = false,
|
||||
placeholder = true,
|
||||
}: {
|
||||
search?: string
|
||||
library_id?: string[]
|
||||
collection_id?: string[]
|
||||
pageRequest?: PageRequest
|
||||
pause?: boolean
|
||||
placeholder?: boolean
|
||||
}) => {
|
||||
const queryParams = {
|
||||
search: search,
|
||||
|
|
@ -83,8 +73,6 @@ export const genresQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: placeholder ? (previousData: any) => previousData : undefined, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
@ -98,8 +86,6 @@ export const tagsQuery = defineQueryOptions(
|
|||
readlist_id,
|
||||
include,
|
||||
pageRequest,
|
||||
pause = false,
|
||||
placeholder = true,
|
||||
}: {
|
||||
search?: string
|
||||
library_id?: string[]
|
||||
|
|
@ -108,8 +94,6 @@ export const tagsQuery = defineQueryOptions(
|
|||
readlist_id?: string[]
|
||||
include?: 'SERIES' | 'BOOK' | 'BOTH'
|
||||
pageRequest?: PageRequest
|
||||
pause?: boolean
|
||||
placeholder?: boolean
|
||||
}) => {
|
||||
const queryParams = {
|
||||
search: search,
|
||||
|
|
@ -131,8 +115,6 @@ export const tagsQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: placeholder ? (previousData: any) => previousData : undefined, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
@ -143,15 +125,11 @@ export const publishersQuery = defineQueryOptions(
|
|||
library_id,
|
||||
collection_id,
|
||||
pageRequest,
|
||||
pause = false,
|
||||
placeholder = true,
|
||||
}: {
|
||||
search?: string
|
||||
library_id?: string[]
|
||||
collection_id?: string[]
|
||||
pageRequest?: PageRequest
|
||||
pause?: boolean
|
||||
placeholder?: boolean
|
||||
}) => {
|
||||
const queryParams = {
|
||||
search: search,
|
||||
|
|
@ -170,8 +148,6 @@ export const publishersQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: placeholder ? (previousData: any) => previousData : undefined, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
@ -182,15 +158,11 @@ export const sharingLabelsQuery = defineQueryOptions(
|
|||
library_id,
|
||||
collection_id,
|
||||
pageRequest,
|
||||
pause = false,
|
||||
placeholder = true,
|
||||
}: {
|
||||
search?: string
|
||||
library_id?: string[]
|
||||
collection_id?: string[]
|
||||
pageRequest?: PageRequest
|
||||
pause?: boolean
|
||||
placeholder?: boolean
|
||||
}) => {
|
||||
const queryParams = {
|
||||
search: search,
|
||||
|
|
@ -209,8 +181,6 @@ export const sharingLabelsQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: placeholder ? (previousData: any) => previousData : undefined, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,11 +13,9 @@ export const QUERY_KEYS_SERIES = {
|
|||
export const seriesListQuery = defineQueryOptions(
|
||||
({
|
||||
search,
|
||||
pause = false,
|
||||
pageRequest,
|
||||
}: {
|
||||
search: components['schemas']['SeriesSearch']
|
||||
pause?: boolean
|
||||
pageRequest?: PageRequest
|
||||
}) => ({
|
||||
key: QUERY_KEYS_SERIES.bySearch({ search: search, pageRequest: pageRequest }),
|
||||
|
|
@ -33,8 +31,7 @@ export const seriesListQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
enabled: !pause,
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ export const authenticationActivityQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
@ -249,6 +249,6 @@ export const myAuthenticationActivityQuery = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -74,6 +74,6 @@ const {
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
placeholderData: (previousData: any) => previousData, // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
placeholderData: (previousData) => previousData,
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -147,22 +147,20 @@ const {
|
|||
data: series,
|
||||
isLoading,
|
||||
error,
|
||||
} = useQuery(seriesListQuery, () => {
|
||||
const search: components['schemas']['SeriesSearch'] = {
|
||||
fullTextSearch: searchStringDebounced.value,
|
||||
...(!includeOneShots && {
|
||||
condition: {
|
||||
oneShot: { operator: 'IsFalse' },
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
return {
|
||||
search: search,
|
||||
pause: !searchStringDebounced.value,
|
||||
} = useQuery(() => ({
|
||||
...seriesListQuery({
|
||||
search: {
|
||||
fullTextSearch: searchStringDebounced.value,
|
||||
...(!includeOneShots && {
|
||||
condition: {
|
||||
oneShot: { operator: 'IsFalse' },
|
||||
},
|
||||
}),
|
||||
},
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
}
|
||||
})
|
||||
}),
|
||||
enabled: !searchStringDebounced.value,
|
||||
}))
|
||||
|
||||
const { data: libraries } = useLibraries()
|
||||
|
||||
|
|
|
|||
|
|
@ -44,12 +44,13 @@ const apiQuery = {
|
|||
role: role,
|
||||
}
|
||||
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(authorsQuery, () => ({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
pause: !searchDebounced.value,
|
||||
placeholder: false,
|
||||
...apiQuery,
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(() => ({
|
||||
...authorsQuery({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
...apiQuery,
|
||||
}),
|
||||
enabled: searchDebounced.value,
|
||||
}))
|
||||
const searchResults = computed(() => searchItems.value?.content?.map((it) => toItemType(it.name)))
|
||||
|
||||
|
|
|
|||
|
|
@ -39,12 +39,13 @@ const apiQuery = {
|
|||
...filterContext,
|
||||
}
|
||||
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(genresQuery, () => ({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
pause: !searchDebounced.value,
|
||||
placeholder: false,
|
||||
...apiQuery,
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(() => ({
|
||||
...genresQuery({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
...apiQuery,
|
||||
}),
|
||||
enabled: searchDebounced.value,
|
||||
}))
|
||||
const searchResults = computed(() => searchItems.value?.content?.map((it) => toItemType(it)))
|
||||
|
||||
|
|
|
|||
|
|
@ -39,12 +39,13 @@ const apiQuery = {
|
|||
...filterContext,
|
||||
}
|
||||
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(publishersQuery, () => ({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
pause: !searchDebounced.value,
|
||||
placeholder: false,
|
||||
...apiQuery,
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(() => ({
|
||||
...publishersQuery({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
...apiQuery,
|
||||
}),
|
||||
enabled: searchDebounced.value,
|
||||
}))
|
||||
const searchResults = computed(() => searchItems.value?.content?.map((it) => toItemType(it)))
|
||||
|
||||
|
|
|
|||
|
|
@ -39,12 +39,13 @@ const apiQuery = {
|
|||
...filterContext,
|
||||
}
|
||||
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(sharingLabelsQuery, () => ({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
pause: !searchDebounced.value,
|
||||
placeholder: false,
|
||||
...apiQuery,
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(() => ({
|
||||
...sharingLabelsQuery({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
...apiQuery,
|
||||
}),
|
||||
enabled: searchDebounced.value,
|
||||
}))
|
||||
const searchResults = computed(() => searchItems.value?.content?.map((it) => toItemType(it)))
|
||||
|
||||
|
|
|
|||
|
|
@ -44,12 +44,13 @@ const apiQuery = {
|
|||
include: include,
|
||||
}
|
||||
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(tagsQuery, () => ({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
pause: !searchDebounced.value,
|
||||
placeholder: false,
|
||||
...apiQuery,
|
||||
const { data: searchItems, isLoading: searchLoading } = useQuery(() => ({
|
||||
...tagsQuery({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
search: searchDebounced.value,
|
||||
...apiQuery,
|
||||
}),
|
||||
enabled: searchDebounced.value,
|
||||
}))
|
||||
const searchResults = computed(() => searchItems.value?.content?.map((it) => toItemType(it)))
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ const headers = [
|
|||
|
||||
const pageRequest = ref<PageRequest>(new PageRequest())
|
||||
|
||||
const { data, isLoading, error } = useQuery(historyQuery, () => ({ ...pageRequest.value }))
|
||||
const { data, isLoading, error } = useQuery(() => historyQuery({ ...pageRequest.value }))
|
||||
|
||||
function updateOptions({
|
||||
page,
|
||||
|
|
@ -204,14 +204,14 @@ const seriesCache = reactive<Record<string, string | undefined>>({})
|
|||
const booksCache = reactive<Record<string, string | undefined>>({})
|
||||
|
||||
const getSeriesTitle = useMemoize(async (seriesId: string) =>
|
||||
useQuery(seriesDetailQuery, () => ({ seriesId: seriesId }))
|
||||
useQuery(() => seriesDetailQuery({ seriesId: seriesId }))
|
||||
.refresh(true)
|
||||
.then(({ data }) => data?.metadata.title)
|
||||
.catch(() => undefined),
|
||||
)
|
||||
|
||||
const getBookTitle = useMemoize(async (bookId: string) =>
|
||||
useQuery(bookDetailQuery, () => ({ bookId: bookId }))
|
||||
useQuery(() => bookDetailQuery({ bookId: bookId }))
|
||||
.refresh(true)
|
||||
.then(({ data }) => data?.metadata.title)
|
||||
.catch(() => undefined),
|
||||
|
|
|
|||
|
|
@ -521,9 +521,11 @@ function fileNamePicked(name: string) {
|
|||
//endregion
|
||||
|
||||
function analyzeBook(book: BookImport) {
|
||||
void useQuery(transientBookAnalyze, () => ({
|
||||
transientBookId: book.transientBook.id,
|
||||
}))
|
||||
void useQuery(() =>
|
||||
transientBookAnalyze({
|
||||
transientBookId: book.transientBook.id,
|
||||
}),
|
||||
)
|
||||
.refresh()
|
||||
.then(({ data }) => {
|
||||
if (data) {
|
||||
|
|
@ -535,9 +537,11 @@ function analyzeBook(book: BookImport) {
|
|||
}
|
||||
|
||||
function fetchSeries(book: BookImport) {
|
||||
void useQuery(seriesDetailQuery, () => ({
|
||||
seriesId: book.transientBook.seriesId!,
|
||||
}))
|
||||
void useQuery(() =>
|
||||
seriesDetailQuery({
|
||||
seriesId: book.transientBook.seriesId!,
|
||||
}),
|
||||
)
|
||||
.refresh()
|
||||
.then(({ data }) => {
|
||||
if (data) assignSeries(book, data)
|
||||
|
|
@ -545,14 +549,16 @@ function fetchSeries(book: BookImport) {
|
|||
}
|
||||
|
||||
function fetchBooks(book: BookImport) {
|
||||
void useQuery(bookListQuery, () => ({
|
||||
search: {
|
||||
condition: {
|
||||
seriesId: { operator: 'Is', value: book.series!.id },
|
||||
},
|
||||
} as components['schemas']['BookSearch'],
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
}))
|
||||
void useQuery(() =>
|
||||
bookListQuery({
|
||||
search: {
|
||||
condition: {
|
||||
seriesId: { operator: 'Is', value: book.series!.id },
|
||||
},
|
||||
} as components['schemas']['BookSearch'],
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
}),
|
||||
)
|
||||
.refresh()
|
||||
.then(({ data }) => {
|
||||
if (data) {
|
||||
|
|
|
|||
|
|
@ -487,13 +487,15 @@ function bookPicked(book: components['schemas']['BookDto']) {
|
|||
//endregion
|
||||
|
||||
const getSeriesBooks = useMemoize(async (seriesId: string) =>
|
||||
useQuery(bookListQuery, () => ({
|
||||
search: {
|
||||
condition: {
|
||||
seriesId: { operator: 'Is', value: seriesId },
|
||||
},
|
||||
} as components['schemas']['BookSearch'],
|
||||
}))
|
||||
useQuery(() =>
|
||||
bookListQuery({
|
||||
search: {
|
||||
condition: {
|
||||
seriesId: { operator: 'Is', value: seriesId },
|
||||
},
|
||||
} as components['schemas']['BookSearch'],
|
||||
}),
|
||||
)
|
||||
.refresh()
|
||||
.then(({ data }) => data),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,15 +28,19 @@ const { libraryId } = defineProps<{
|
|||
const display = useDisplay()
|
||||
|
||||
const { libraries } = useGetLibrariesById(libraryId)
|
||||
const { data: collections } = useQuery(collectionsListQuery, () => ({
|
||||
libraryIds: libraries.value?.map((it) => it.id),
|
||||
pageRequest: PageRequest.Zero(),
|
||||
pause: libraries.value === undefined,
|
||||
const { data: collections } = useQuery(() => ({
|
||||
...collectionsListQuery({
|
||||
libraryIds: libraries.value?.map((it) => it.id),
|
||||
pageRequest: PageRequest.Zero(),
|
||||
}),
|
||||
enabled: libraries.value !== undefined,
|
||||
}))
|
||||
const { data: readlists } = useQuery(readListsListQuery, () => ({
|
||||
libraryIds: libraries.value?.map((it) => it.id),
|
||||
pageRequest: PageRequest.Zero(),
|
||||
pause: libraries.value === undefined,
|
||||
const { data: readlists } = useQuery(() => ({
|
||||
...readListsListQuery({
|
||||
libraryIds: libraries.value?.map((it) => it.id),
|
||||
pageRequest: PageRequest.Zero(),
|
||||
}),
|
||||
enabled: libraries.value !== undefined,
|
||||
}))
|
||||
|
||||
const routesBase = [
|
||||
|
|
|
|||
|
|
@ -331,10 +331,12 @@ const filterOptions = [
|
|||
|
||||
const pageRequest = ref<PageRequest>(new PageRequest())
|
||||
|
||||
const { data, isLoading, error } = useQuery(pageHashesKnownQuery, () => ({
|
||||
...pageRequest.value,
|
||||
actions: filterSelect.value,
|
||||
}))
|
||||
const { data, isLoading, error } = useQuery(() =>
|
||||
pageHashesKnownQuery({
|
||||
...pageRequest.value,
|
||||
actions: filterSelect.value,
|
||||
}),
|
||||
)
|
||||
|
||||
function updateOptions({
|
||||
page,
|
||||
|
|
|
|||
|
|
@ -129,10 +129,12 @@ const headers = [
|
|||
const sortBy = ref<SortItem[]>([])
|
||||
const pageRequest = ref<PageRequest>(new PageRequest())
|
||||
|
||||
const { data, isLoading, error } = useQuery(pageHashMatchesQuery, () => ({
|
||||
pageHash: pageHash.value,
|
||||
...pageRequest.value,
|
||||
}))
|
||||
const { data, isLoading, error } = useQuery(() =>
|
||||
pageHashMatchesQuery({
|
||||
pageHash: pageHash.value,
|
||||
...pageRequest.value,
|
||||
}),
|
||||
)
|
||||
|
||||
function updateOptions({
|
||||
page,
|
||||
|
|
|
|||
|
|
@ -278,9 +278,11 @@ const headers = [
|
|||
|
||||
const pageRequest = ref<PageRequest>(new PageRequest())
|
||||
|
||||
const { data, isLoading, error } = useQuery(pageHashesUnknownQuery, () => ({
|
||||
...pageRequest.value,
|
||||
}))
|
||||
const { data, isLoading, error } = useQuery(() =>
|
||||
pageHashesUnknownQuery({
|
||||
...pageRequest.value,
|
||||
}),
|
||||
)
|
||||
|
||||
function updateOptions({
|
||||
page,
|
||||
|
|
|
|||
|
|
@ -151,9 +151,10 @@ const headers = computed(() => {
|
|||
|
||||
const pageRequest = ref<PageRequest>(new PageRequest())
|
||||
|
||||
const { data, isLoading, error } = useQuery(
|
||||
forMe ? myAuthenticationActivityQuery : authenticationActivityQuery,
|
||||
() => ({ ...pageRequest.value }),
|
||||
const { data, isLoading, error } = useQuery(() =>
|
||||
forMe
|
||||
? myAuthenticationActivityQuery({ ...pageRequest.value })
|
||||
: authenticationActivityQuery({ ...pageRequest.value }),
|
||||
)
|
||||
|
||||
function updateOptions({
|
||||
|
|
|
|||
|
|
@ -280,9 +280,11 @@ const user = defineModel<UserCreation | UserUpdate>({ required: true })
|
|||
const showPassword = ref<boolean>(false)
|
||||
|
||||
const { data: libraries } = useLibraries()
|
||||
const { data: sharingLabels } = useQuery(sharingLabelsQuery, () => ({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
}))
|
||||
const { data: sharingLabels } = useQuery(() =>
|
||||
sharingLabelsQuery({
|
||||
pageRequest: PageRequest.Unpaged(),
|
||||
}),
|
||||
)
|
||||
|
||||
function selectAllLibraries() {
|
||||
user.value.sharedLibraries!.all = !user.value.sharedLibraries?.all
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@ const {
|
|||
data: transientBooks,
|
||||
isLoading,
|
||||
refetch,
|
||||
} = useQuery(transientBooksScan, () => ({
|
||||
path: scanDirectory.value,
|
||||
}))
|
||||
} = useQuery(() =>
|
||||
transientBooksScan({
|
||||
path: scanDirectory.value,
|
||||
}),
|
||||
)
|
||||
|
||||
function doScan(directory: string) {
|
||||
scanDirectory.value = directory
|
||||
|
|
|
|||
|
|
@ -295,16 +295,14 @@ const conds = computed(() => ({
|
|||
],
|
||||
}))
|
||||
|
||||
const { data: series } = useQuery(seriesListQuery, () => {
|
||||
const search: components['schemas']['SeriesSearch'] = {
|
||||
condition: conds.value as components['schemas']['AllOfSeries'],
|
||||
}
|
||||
|
||||
return {
|
||||
search: search,
|
||||
const { data: series } = useQuery(() =>
|
||||
seriesListQuery({
|
||||
search: {
|
||||
condition: conds.value as components['schemas']['AllOfSeries'],
|
||||
},
|
||||
pageRequest: PageRequest.FromPageSize(appStore.browsingPageSize, page0.value),
|
||||
}
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
watch(series, (newSeries) => {
|
||||
if (newSeries) pageCount.value = newSeries.totalPages ?? 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue