mirror of
https://github.com/rommapp/romm.git
synced 2026-12-05 05:07:31 +01:00
working pagination on roms endpoint
This commit is contained in:
@@ -29,8 +29,11 @@ from exceptions.endpoint_exceptions import RomNotFoundInDatabaseException
|
||||
from exceptions.fs_exceptions import RomAlreadyExistsException
|
||||
from fastapi import HTTPException, Request, UploadFile, status
|
||||
from fastapi.responses import Response
|
||||
from fastapi_pagination.ext.sqlalchemy import paginate
|
||||
from fastapi_pagination.limit_offset import LimitOffsetPage, LimitOffsetParams
|
||||
from handler.auth.constants import Scope
|
||||
from handler.database import db_platform_handler, db_rom_handler
|
||||
from handler.database.base_handler import sync_session
|
||||
from handler.filesystem import fs_resource_handler, fs_rom_handler
|
||||
from handler.filesystem.base_handler import CoverSize
|
||||
from handler.metadata import meta_igdb_handler, meta_moby_handler, meta_ss_handler
|
||||
@@ -122,12 +125,12 @@ def get_roms(
|
||||
collection_id: int | None = None,
|
||||
virtual_collection_id: str | None = None,
|
||||
search_term: str | None = None,
|
||||
limit: int | None = None,
|
||||
offset: int | None = None,
|
||||
limit: int = 72,
|
||||
offset: int = 0,
|
||||
order_by: str = "name",
|
||||
order_dir: str = "asc",
|
||||
with_extra: bool = True,
|
||||
) -> list[SimpleRomSchema | RomSchema]:
|
||||
) -> LimitOffsetPage[RomSchema | SimpleRomSchema]:
|
||||
"""Get roms endpoint
|
||||
|
||||
Args:
|
||||
@@ -143,29 +146,25 @@ def get_roms(
|
||||
last_played (bool, optional): Flag to filter ROMs by last played
|
||||
|
||||
Returns:
|
||||
list[DetailedRomSchema]: List of ROMs stored in the database
|
||||
list[RomSchema | SimpleRomSchema]: List of ROMs stored in the database
|
||||
"""
|
||||
|
||||
if hasattr(Rom, order_by):
|
||||
roms = db_rom_handler.get_roms(
|
||||
query = db_rom_handler.get_roms(
|
||||
platform_id=platform_id,
|
||||
collection_id=collection_id,
|
||||
virtual_collection_id=virtual_collection_id,
|
||||
search_term=search_term,
|
||||
order_by=order_by.lower(),
|
||||
order_dir=order_dir.lower(),
|
||||
limit=limit,
|
||||
offset=offset,
|
||||
)
|
||||
elif hasattr(RomUser, order_by):
|
||||
roms = db_rom_handler.get_roms_user(
|
||||
query = db_rom_handler.get_roms_user(
|
||||
user_id=request.user.id,
|
||||
platform_id=platform_id,
|
||||
collection_id=collection_id,
|
||||
virtual_collection_id=virtual_collection_id,
|
||||
search_term=search_term,
|
||||
limit=limit,
|
||||
offset=offset,
|
||||
)
|
||||
else:
|
||||
raise HTTPException(
|
||||
@@ -173,9 +172,17 @@ def get_roms(
|
||||
detail="Invalid order_by field",
|
||||
)
|
||||
|
||||
SelectedSchema = SimpleRomSchema if with_extra else RomSchema
|
||||
roms = [SelectedSchema.from_orm_with_request(rom, request) for rom in roms]
|
||||
return [rom for rom in roms if rom]
|
||||
with sync_session.begin() as session:
|
||||
SelectedSchema = SimpleRomSchema if with_extra else RomSchema
|
||||
limit_offser_params = LimitOffsetParams(limit=limit, offset=offset)
|
||||
return paginate(
|
||||
session,
|
||||
query,
|
||||
limit_offser_params,
|
||||
transformer=lambda items: [
|
||||
SelectedSchema.from_orm_with_request(i, request) for i in items
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@protected_route(
|
||||
|
||||
@@ -129,11 +129,9 @@ class DBRomsHandler(DBBaseHandler):
|
||||
search_term: str | None = None,
|
||||
order_by: str = "name",
|
||||
order_dir: str = "asc",
|
||||
limit: int | None = None,
|
||||
offset: int | None = None,
|
||||
query: Query = None,
|
||||
session: Session = None,
|
||||
) -> Sequence[Rom]:
|
||||
) -> Query[Rom]:
|
||||
filtered_query = self._filter(
|
||||
query,
|
||||
platform_id,
|
||||
@@ -142,10 +140,7 @@ class DBRomsHandler(DBBaseHandler):
|
||||
search_term,
|
||||
session,
|
||||
)
|
||||
ordered_query = self._order(filtered_query, order_by, order_dir)
|
||||
offset_query = ordered_query.offset(offset)
|
||||
limited_query = offset_query.limit(limit)
|
||||
return session.scalars(limited_query).unique().all()
|
||||
return self._order(filtered_query, order_by, order_dir)
|
||||
|
||||
@begin_session
|
||||
@with_details
|
||||
@@ -266,17 +261,16 @@ class DBRomsHandler(DBBaseHandler):
|
||||
collection_id: int | None = None,
|
||||
virtual_collection_id: str | None = None,
|
||||
search_term: str | None = None,
|
||||
limit: int | None = None,
|
||||
offset: int | None = None,
|
||||
query: Query = None,
|
||||
session: Session = None,
|
||||
) -> Sequence[Rom]:
|
||||
) -> Query[Rom]:
|
||||
filtered_query = (
|
||||
query.join(RomUser)
|
||||
.filter(RomUser.user_id == user_id)
|
||||
.order_by(RomUser.last_played.desc())
|
||||
)
|
||||
filtered_query = self._filter(
|
||||
|
||||
return self._filter(
|
||||
filtered_query,
|
||||
platform_id,
|
||||
collection_id,
|
||||
@@ -284,9 +278,6 @@ class DBRomsHandler(DBBaseHandler):
|
||||
search_term,
|
||||
session,
|
||||
)
|
||||
offset_query = filtered_query.offset(offset)
|
||||
limited_query = offset_query.limit(limit)
|
||||
return session.scalars(limited_query).unique().all()
|
||||
|
||||
@begin_session
|
||||
def get_rom_user_by_id(self, id: int, session: Session = None) -> RomUser | None:
|
||||
|
||||
@@ -34,6 +34,7 @@ from endpoints import (
|
||||
)
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi_pagination import add_pagination
|
||||
from handler.auth.constants import ALGORITHM
|
||||
from handler.auth.hybrid_auth import HybridAuthBackend
|
||||
from handler.auth.middleware import CustomCSRFMiddleware, SessionMiddleware
|
||||
@@ -118,6 +119,8 @@ app.include_router(collections.router, prefix="/api")
|
||||
|
||||
app.mount("/ws", socket_handler.socket_app)
|
||||
|
||||
add_pagination(app)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Run migrations
|
||||
|
||||
1
frontend/src/__generated__/index.ts
generated
1
frontend/src/__generated__/index.ts
generated
@@ -25,6 +25,7 @@ export type { HTTPValidationError } from './models/HTTPValidationError';
|
||||
export type { IGDBAgeRating } from './models/IGDBAgeRating';
|
||||
export type { IGDBMetadataPlatform } from './models/IGDBMetadataPlatform';
|
||||
export type { IGDBRelatedGame } from './models/IGDBRelatedGame';
|
||||
export type { LimitOffsetPage_SimpleRomSchema_ } from './models/LimitOffsetPage_SimpleRomSchema_';
|
||||
export type { MessageResponse } from './models/MessageResponse';
|
||||
export type { MetadataSourcesDict } from './models/MetadataSourcesDict';
|
||||
export type { MobyMetadataPlatform } from './models/MobyMetadataPlatform';
|
||||
|
||||
12
frontend/src/__generated__/models/LimitOffsetPage_SimpleRomSchema_.ts
generated
Normal file
12
frontend/src/__generated__/models/LimitOffsetPage_SimpleRomSchema_.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { SimpleRomSchema } from './SimpleRomSchema';
|
||||
export type LimitOffsetPage_SimpleRomSchema_ = {
|
||||
items: Array<SimpleRomSchema>;
|
||||
total: (number | null);
|
||||
limit: (number | null);
|
||||
offset: (number | null);
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { Emitter } from "mitt";
|
||||
|
||||
const { t } = useI18n();
|
||||
const romsStore = storeRoms();
|
||||
const { gettingRoms } = storeToRefs(romsStore);
|
||||
const { fetchingRoms } = storeToRefs(romsStore);
|
||||
const searched = ref(false);
|
||||
const selectedPlatform = ref<Platform | null>(null);
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
@@ -20,7 +20,7 @@ const { searchText } = storeToRefs(galleryFilterStore);
|
||||
|
||||
function fetchRoms() {
|
||||
if (searchText.value !== null) {
|
||||
gettingRoms.value = true;
|
||||
fetchingRoms.value = true;
|
||||
const inputElement = document.getElementById("search-text-field");
|
||||
inputElement?.blur();
|
||||
searched.value = true;
|
||||
@@ -43,7 +43,7 @@ function fetchRoms() {
|
||||
console.error(`Couldn't fetch roms: ${error}`);
|
||||
})
|
||||
.finally(() => {
|
||||
gettingRoms.value = false;
|
||||
fetchingRoms.value = false;
|
||||
});
|
||||
filterRoms();
|
||||
galleryFilterStore.activeFilterDrawer = false;
|
||||
@@ -73,6 +73,6 @@ function filterRoms() {
|
||||
class="bg-toplayer"
|
||||
variant="text"
|
||||
icon="mdi-magnify"
|
||||
:disabled="gettingRoms || !searchText"
|
||||
:disabled="fetchingRoms || !searchText"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,7 @@ const { xs } = useDisplay();
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const romsStore = storeRoms();
|
||||
const { gettingRoms } = storeToRefs(romsStore);
|
||||
const { fetchingRoms } = storeToRefs(romsStore);
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
const galleryFilterStore = storeGalleryFilter();
|
||||
const { searchText } = storeToRefs(galleryFilterStore);
|
||||
@@ -25,7 +25,7 @@ async function fetchRoms() {
|
||||
// Auto hide android keyboard
|
||||
const inputElement = document.getElementById("search-text-field");
|
||||
inputElement?.blur();
|
||||
gettingRoms.value = true;
|
||||
fetchingRoms.value = true;
|
||||
|
||||
// Update URL with search term
|
||||
router.replace({ query: { search: searchText.value } });
|
||||
@@ -46,7 +46,7 @@ async function fetchRoms() {
|
||||
});
|
||||
console.error(`Couldn't fetch roms: ${error}`);
|
||||
} finally {
|
||||
gettingRoms.value = false;
|
||||
fetchingRoms.value = false;
|
||||
galleryFilterStore.activeFilterDrawer = false;
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ watch(
|
||||
autofocus
|
||||
@keyup.enter="fetchRoms"
|
||||
v-model="searchText"
|
||||
:disabled="gettingRoms"
|
||||
:disabled="fetchingRoms"
|
||||
:label="t('common.search')"
|
||||
hide-details
|
||||
class="bg-toplayer"
|
||||
|
||||
@@ -17,12 +17,12 @@ const romsStore = storeRoms();
|
||||
>
|
||||
<template #activator="{ props }">
|
||||
<v-btn
|
||||
:color="romsStore.selecting ? 'primary' : ''"
|
||||
:color="romsStore.selectingRoms ? 'primary' : ''"
|
||||
variant="text"
|
||||
rounded="0"
|
||||
v-bind="props"
|
||||
class="mr-0"
|
||||
icon="mdi-select-group"
|
||||
@click="romsStore.isSelecting()" /></template
|
||||
@click="romsStore.setSelecting()" /></template
|
||||
></v-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -10,6 +10,7 @@ import type { DetailedRom, SimpleRom } from "@/stores/roms";
|
||||
import { getDownloadPath } from "@/utils";
|
||||
import type { AxiosProgressEvent } from "axios";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import { type LimitOffsetPage_SimpleRomSchema_ as GetRomsResponse } from "@/__generated__/models/LimitOffsetPage_SimpleRomSchema_";
|
||||
|
||||
export const romApi = api;
|
||||
|
||||
@@ -55,41 +56,48 @@ async function uploadRoms({
|
||||
return Promise.allSettled(promises);
|
||||
}
|
||||
|
||||
export interface GetRomsParams {
|
||||
platformId?: number | null;
|
||||
collectionId?: number | null;
|
||||
virtualCollectionId?: string | null;
|
||||
searchTerm?: string | null;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
orderBy?: string | null;
|
||||
orderDir?: string | null;
|
||||
}
|
||||
|
||||
async function getRoms({
|
||||
platformId = null,
|
||||
collectionId = null,
|
||||
virtualCollectionId = null,
|
||||
searchTerm = null,
|
||||
limit = 72,
|
||||
offset = 0,
|
||||
orderBy = "name",
|
||||
orderDir = "asc",
|
||||
}: {
|
||||
platformId?: number | null;
|
||||
collectionId?: number | null;
|
||||
virtualCollectionId?: string | null;
|
||||
searchTerm?: string | null;
|
||||
orderBy?: string | null;
|
||||
orderDir?: string | null;
|
||||
}): Promise<{ data: SimpleRom[] }> {
|
||||
}: GetRomsParams): Promise<{ data: GetRomsResponse }> {
|
||||
return api.get(`/roms`, {
|
||||
params: {
|
||||
platform_id: platformId,
|
||||
collection_id: collectionId,
|
||||
virtual_collection_id: virtualCollectionId,
|
||||
search_term: searchTerm,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
order_by: orderBy,
|
||||
order_dir: orderDir,
|
||||
limit: 2500,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function getRecentRoms(): Promise<{ data: SimpleRom[] }> {
|
||||
async function getRecentRoms(): Promise<{ data: GetRomsResponse }> {
|
||||
return api.get("/roms", {
|
||||
params: { order_by: "id", order_dir: "desc", limit: 15 },
|
||||
});
|
||||
}
|
||||
|
||||
async function getRecentPlayedRoms(): Promise<{ data: SimpleRom[] }> {
|
||||
async function getRecentPlayedRoms(): Promise<{ data: GetRomsResponse }> {
|
||||
return api.get("/roms", {
|
||||
params: { order_by: "last_played", order_dir: "desc", limit: 15 },
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { SearchRomSchema } from "@/__generated__";
|
||||
import type { DetailedRomSchema, SimpleRomSchema } from "@/__generated__/";
|
||||
import romApi, { type GetRomsParams } from "@/services/api/rom";
|
||||
import storeCollection, {
|
||||
type Collection,
|
||||
type VirtualCollection,
|
||||
@@ -29,9 +30,11 @@ const defaultRomsState = {
|
||||
recentRoms: [] as SimpleRom[],
|
||||
continuePlayingRoms: [] as SimpleRom[],
|
||||
lastSelectedIndex: -1,
|
||||
selecting: false,
|
||||
itemsPerBatch: 72,
|
||||
gettingRoms: false,
|
||||
selectingRoms: false,
|
||||
fetchingRoms: false,
|
||||
fetchLimit: 72,
|
||||
fetchOffset: 0,
|
||||
fetchTotalRoms: 0,
|
||||
};
|
||||
|
||||
export default defineStore("roms", {
|
||||
@@ -107,9 +110,32 @@ export default defineStore("roms", {
|
||||
setCurrentVirtualCollection(collection: VirtualCollection | null) {
|
||||
this.currentVirtualCollection = collection;
|
||||
},
|
||||
set(roms: SimpleRom[]) {
|
||||
this.allRoms = roms;
|
||||
this._reorder();
|
||||
fetchRoms(params: GetRomsParams, galleryFilter: GalleryFilterStore) {
|
||||
if (this.fetchingRoms) return Promise.resolve();
|
||||
this.fetchingRoms = true;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
romApi
|
||||
.getRoms({
|
||||
...params,
|
||||
limit: this.fetchLimit,
|
||||
offset: this.fetchOffset,
|
||||
})
|
||||
.then(({ data: { items, offset, total } }) => {
|
||||
if (offset !== null) this.fetchOffset = offset + this.fetchLimit;
|
||||
if (total !== null) this.fetchTotalRoms = total;
|
||||
|
||||
this.add(items);
|
||||
this.setFiltered(items, galleryFilter);
|
||||
resolve(items);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
})
|
||||
.finally(() => {
|
||||
this.fetchingRoms = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
add(roms: SimpleRom[]) {
|
||||
this.allRoms = this.allRoms.concat(roms);
|
||||
@@ -364,8 +390,8 @@ export default defineStore("roms", {
|
||||
updateLastSelected(index: number) {
|
||||
this.lastSelectedIndex = index;
|
||||
},
|
||||
isSelecting() {
|
||||
this.selecting = !this.selecting;
|
||||
setSelecting() {
|
||||
this.selectingRoms = !this.selectingRoms;
|
||||
},
|
||||
resetSelection() {
|
||||
this._selectedIDs = new Set<number>();
|
||||
|
||||
@@ -34,10 +34,8 @@ const {
|
||||
currentPlatform,
|
||||
currentCollection,
|
||||
currentVirtualCollection,
|
||||
itemsPerBatch,
|
||||
gettingRoms,
|
||||
fetchingRoms,
|
||||
} = storeToRefs(romsStore);
|
||||
const itemsShown = ref(itemsPerBatch.value);
|
||||
const noCollectionError = ref(false);
|
||||
const router = useRouter();
|
||||
let timeout: ReturnType<typeof setTimeout>;
|
||||
@@ -45,52 +43,46 @@ const emitter = inject<Emitter<Events>>("emitter");
|
||||
|
||||
// Functions
|
||||
async function fetchRoms() {
|
||||
if (gettingRoms.value) return;
|
||||
|
||||
gettingRoms.value = true;
|
||||
if (fetchingRoms.value) return;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: gettingRoms.value,
|
||||
loading: true,
|
||||
scrim: false,
|
||||
});
|
||||
|
||||
try {
|
||||
const { data } = await romApi.getRoms({
|
||||
collectionId: romsStore.currentCollection?.id,
|
||||
virtualCollectionId: romsStore.currentVirtualCollection?.id,
|
||||
romsStore
|
||||
.fetchRoms(
|
||||
{
|
||||
collectionId: romsStore.currentCollection?.id,
|
||||
virtualCollectionId: romsStore.currentVirtualCollection?.id,
|
||||
},
|
||||
galleryFilterStore,
|
||||
)
|
||||
.then(() => {
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: false,
|
||||
scrim: false,
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Couldn't fetch roms for platform ID ${currentPlatform.value?.id}: ${error}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
timeout: 4000,
|
||||
});
|
||||
noCollectionError.value = true;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: false,
|
||||
scrim: false,
|
||||
});
|
||||
});
|
||||
romsStore.set(data);
|
||||
romsStore.setFiltered(data, galleryFilterStore);
|
||||
|
||||
gettingRoms.value = false;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: gettingRoms.value,
|
||||
scrim: false,
|
||||
});
|
||||
} catch (error) {
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Couldn't fetch roms for collection ID ${currentCollection.value?.id}: ${error}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
timeout: 4000,
|
||||
});
|
||||
console.error(
|
||||
`Couldn't fetch roms for collection ID ${currentCollection.value?.id}: ${error}`,
|
||||
);
|
||||
noCollectionError.value = true;
|
||||
} finally {
|
||||
gettingRoms.value = false;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: gettingRoms.value,
|
||||
scrim: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) {
|
||||
let index = filteredRoms.value.indexOf(emitData.rom);
|
||||
if (
|
||||
emitData.event.shiftKey ||
|
||||
romsStore.selecting ||
|
||||
romsStore.selectingRoms ||
|
||||
romsStore.selectedRoms.length > 0
|
||||
) {
|
||||
emitData.event.preventDefault();
|
||||
@@ -304,7 +296,7 @@ onBeforeUnmount(() => {
|
||||
<template>
|
||||
<template v-if="!noCollectionError">
|
||||
<gallery-app-bar-collection />
|
||||
<template v-if="gettingRoms">
|
||||
<template v-if="fetchingRoms">
|
||||
<skeleton />
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -352,7 +344,7 @@ onBeforeUnmount(() => {
|
||||
<fab-overlay />
|
||||
</template>
|
||||
<template v-else>
|
||||
<empty-game v-if="!gettingRoms" />
|
||||
<empty-game v-if="!fetchingRoms" />
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -6,7 +6,6 @@ import EmptyPlatform from "@/components/common/EmptyStates/EmptyPlatform.vue";
|
||||
import Skeleton from "@/components/Gallery/Skeleton.vue";
|
||||
import GameCard from "@/components/common/Game/Card/Base.vue";
|
||||
import GameDataTable from "@/components/common/Game/Table.vue";
|
||||
import romApi from "@/services/api/rom";
|
||||
import storeGalleryFilter, { type FilterType } from "@/stores/galleryFilter";
|
||||
import storeGalleryView from "@/stores/galleryView";
|
||||
import storePlatforms from "@/stores/platforms";
|
||||
@@ -33,10 +32,9 @@ const {
|
||||
selectedRoms,
|
||||
currentPlatform,
|
||||
currentCollection,
|
||||
itemsPerBatch,
|
||||
gettingRoms,
|
||||
fetchingRoms,
|
||||
fetchTotalRoms,
|
||||
} = storeToRefs(romsStore);
|
||||
const itemsShown = ref(itemsPerBatch.value);
|
||||
const noPlatformError = ref(false);
|
||||
const router = useRouter();
|
||||
let timeout: ReturnType<typeof setTimeout>;
|
||||
@@ -44,46 +42,46 @@ const emitter = inject<Emitter<Events>>("emitter");
|
||||
|
||||
// Functions
|
||||
async function fetchRoms() {
|
||||
if (gettingRoms.value) return;
|
||||
if (fetchingRoms.value) return;
|
||||
|
||||
gettingRoms.value = true;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: gettingRoms.value,
|
||||
loading: true,
|
||||
scrim: false,
|
||||
});
|
||||
|
||||
try {
|
||||
const { data } = await romApi.getRoms({
|
||||
platformId: romsStore.currentPlatform?.id,
|
||||
romsStore
|
||||
.fetchRoms(
|
||||
{
|
||||
platformId: romsStore.currentPlatform?.id,
|
||||
},
|
||||
galleryFilterStore,
|
||||
)
|
||||
.then(() => {
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: false,
|
||||
scrim: false,
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Couldn't fetch roms for platform ID ${currentPlatform.value?.id}: ${error}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
timeout: 4000,
|
||||
});
|
||||
noPlatformError.value = true;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: false,
|
||||
scrim: false,
|
||||
});
|
||||
});
|
||||
|
||||
romsStore.set(data);
|
||||
romsStore.setFiltered(data, galleryFilterStore);
|
||||
} catch (error) {
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Couldn't fetch roms for platform ID ${currentPlatform.value?.id}: ${error}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
timeout: 4000,
|
||||
});
|
||||
console.error(
|
||||
`Couldn't fetch roms for platform ID ${currentPlatform.value?.id}: ${error}`,
|
||||
);
|
||||
noPlatformError.value = true;
|
||||
} finally {
|
||||
gettingRoms.value = false;
|
||||
emitter?.emit("showLoadingDialog", {
|
||||
loading: gettingRoms.value,
|
||||
scrim: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) {
|
||||
let index = filteredRoms.value.indexOf(emitData.rom);
|
||||
if (
|
||||
emitData.event.shiftKey ||
|
||||
romsStore.selecting ||
|
||||
romsStore.selectingRoms ||
|
||||
romsStore.selectedRoms.length > 0
|
||||
) {
|
||||
emitData.event.preventDefault();
|
||||
@@ -134,25 +132,20 @@ function onGameTouchEnd() {
|
||||
}
|
||||
|
||||
function onScroll() {
|
||||
if (galleryViewStore.currentView != 2) {
|
||||
clearTimeout(timeout);
|
||||
clearTimeout(timeout);
|
||||
|
||||
window.setTimeout(async () => {
|
||||
const { scrollTop, scrollHeight, clientHeight } =
|
||||
document.documentElement;
|
||||
scrolledToTop.value = scrollTop === 0;
|
||||
const totalScrollableHeight = scrollHeight - clientHeight;
|
||||
const ninetyPercentPoint = totalScrollableHeight * 0.9;
|
||||
if (
|
||||
scrollTop >= ninetyPercentPoint &&
|
||||
itemsShown.value < filteredRoms.value.length
|
||||
) {
|
||||
itemsShown.value = itemsShown.value + itemsPerBatch.value;
|
||||
galleryViewStore.scroll = scrollHeight;
|
||||
}
|
||||
}, 100);
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
window.setTimeout(async () => {
|
||||
const { scrollTop, scrollHeight, clientHeight } = document.documentElement;
|
||||
scrolledToTop.value = scrollTop === 0;
|
||||
const totalScrollableHeight = scrollHeight - clientHeight;
|
||||
const ninetyPercentPoint = totalScrollableHeight * 0.9;
|
||||
if (
|
||||
scrollTop >= ninetyPercentPoint &&
|
||||
fetchTotalRoms.value > allRoms.value.length
|
||||
) {
|
||||
await fetchRoms();
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function resetGallery() {
|
||||
@@ -161,7 +154,6 @@ function resetGallery() {
|
||||
galleryFilterStore.activeFilterDrawer = false;
|
||||
scrolledToTop.value = true;
|
||||
noPlatformError.value = false;
|
||||
itemsShown.value = itemsPerBatch.value;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -243,7 +235,7 @@ onBeforeUnmount(() => {
|
||||
<template>
|
||||
<template v-if="!noPlatformError">
|
||||
<gallery-app-bar />
|
||||
<template v-if="gettingRoms">
|
||||
<template v-if="fetchingRoms">
|
||||
<skeleton />
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -251,7 +243,7 @@ onBeforeUnmount(() => {
|
||||
<v-row v-if="currentView != 2" class="pb-2 mx-1 mt-3" no-gutters>
|
||||
<!-- Gallery cards view -->
|
||||
<v-col
|
||||
v-for="rom in filteredRoms.slice(0, itemsShown)"
|
||||
v-for="rom in filteredRoms"
|
||||
:key="rom.id"
|
||||
class="pa-1 align-self-end"
|
||||
:cols="views[currentView]['size-cols']"
|
||||
@@ -291,7 +283,7 @@ onBeforeUnmount(() => {
|
||||
<fab-overlay />
|
||||
</template>
|
||||
<template v-else>
|
||||
<empty-game v-if="!gettingRoms" />
|
||||
<empty-game v-if="!fetchingRoms" />
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -24,23 +24,20 @@ const romsStore = storeRoms();
|
||||
const router = useRouter();
|
||||
const initialSearch = ref(false);
|
||||
const {
|
||||
allRoms,
|
||||
filteredRoms,
|
||||
selectedRoms,
|
||||
currentPlatform,
|
||||
currentCollection,
|
||||
itemsPerBatch,
|
||||
gettingRoms,
|
||||
fetchingRoms,
|
||||
} = storeToRefs(romsStore);
|
||||
|
||||
const itemsShown = ref(itemsPerBatch.value);
|
||||
let timeout: ReturnType<typeof setTimeout>;
|
||||
|
||||
function onGameClick(emitData: { rom: SimpleRom; event: MouseEvent }) {
|
||||
let index = filteredRoms.value.indexOf(emitData.rom);
|
||||
if (
|
||||
emitData.event.shiftKey ||
|
||||
romsStore.selecting ||
|
||||
romsStore.selectingRoms ||
|
||||
romsStore.selectedRoms.length > 0
|
||||
) {
|
||||
emitData.event.preventDefault();
|
||||
@@ -137,7 +134,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
<template>
|
||||
<gallery-app-bar-search />
|
||||
<template v-if="gettingRoms">
|
||||
<template v-if="fetchingRoms">
|
||||
<skeleton />
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -185,7 +182,7 @@ onBeforeUnmount(() => {
|
||||
<fab-overlay />
|
||||
</template>
|
||||
<template v-else>
|
||||
<empty-game v-if="!gettingRoms && initialSearch" />
|
||||
<empty-game v-if="!fetchingRoms && initialSearch" />
|
||||
<empty-search v-else-if="!initialSearch" />
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -45,11 +45,11 @@ const emitter = inject<Emitter<Events>>("emitter");
|
||||
const noRomError = ref(false);
|
||||
const romsStore = storeRoms();
|
||||
const platformsStore = storePlatforms();
|
||||
const { currentRom, gettingRoms } = storeToRefs(romsStore);
|
||||
const { currentRom, fetchingRoms } = storeToRefs(romsStore);
|
||||
|
||||
// Functions
|
||||
async function fetchDetails() {
|
||||
gettingRoms.value = true;
|
||||
fetchingRoms.value = true;
|
||||
await romApi
|
||||
.getRom({ romId: parseInt(route.params.rom as string) })
|
||||
.then(({ data }) => {
|
||||
@@ -61,7 +61,7 @@ async function fetchDetails() {
|
||||
})
|
||||
.finally(() => {
|
||||
emitter?.emit("showLoadingDialog", { loading: false, scrim: false });
|
||||
gettingRoms.value = false;
|
||||
fetchingRoms.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ watch(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template v-if="currentRom && !gettingRoms">
|
||||
<template v-if="currentRom && !fetchingRoms">
|
||||
<background-header />
|
||||
|
||||
<v-row class="px-5" no-gutters :class="{ 'justify-center': smAndDown }">
|
||||
|
||||
79
poetry.lock
generated
79
poetry.lock
generated
@@ -169,10 +169,6 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a37b8f0391212d29b3a91a799c8e4a2855e0576911cdfb2515487e30e322253d"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e84799f09591700a4154154cab9787452925578841a94321d5ee8fb9a9a328f0"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f66b5337fa213f1da0d9000bc8dc0cb5b896b726eefd9c6046f699b169c41b9e"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5dab0844f2cf82be357a0eb11a9087f70c5430b2c241493fc122bb6f2bb0917c"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e4fe605b917c70283db7dfe5ada75e04561479075761a0b3866c081d035b01c1"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:1e9a65b5736232e7a7f91ff3d02277f11d339bf34099a56cdab6a8b3410a02b2"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:58d4b711689366d4a03ac7957ab8c28890415e267f9b6589969e74b6e42225ec"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-win32.whl", hash = "sha256:be36e3d172dc816333f33520154d708a2657ea63762ec16b62ece02ab5e4daf2"},
|
||||
{file = "Brotli-1.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:0c6244521dda65ea562d5a69b9a26120769b7a9fb3db2fe9545935ed6735b128"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a3daabb76a78f829cafc365531c972016e4aa8d5b4bf60660ad8ecee19df7ccc"},
|
||||
@@ -185,14 +181,8 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:19c116e796420b0cee3da1ccec3b764ed2952ccfcc298b55a10e5610ad7885f9"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:510b5b1bfbe20e1a7b3baf5fed9e9451873559a976c1a78eebaa3b86c57b4265"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a1fd8a29719ccce974d523580987b7f8229aeace506952fa9ce1d53a033873c8"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c247dd99d39e0338a604f8c2b3bc7061d5c2e9e2ac7ba9cc1be5a69cb6cd832f"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1b2c248cd517c222d89e74669a4adfa5577e06ab68771a529060cf5a156e9757"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:2a24c50840d89ded6c9a8fdc7b6ed3692ed4e86f1c4a4a938e1e92def92933e0"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f31859074d57b4639318523d6ffdca586ace54271a73ad23ad021acd807eb14b"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-win32.whl", hash = "sha256:39da8adedf6942d76dc3e46653e52df937a3c4d6d18fdc94a7c29d263b1f5b50"},
|
||||
{file = "Brotli-1.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:aac0411d20e345dc0920bdec5548e438e999ff68d77564d5e9463a7ca9d3e7b1"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:32d95b80260d79926f5fab3c41701dbb818fde1c9da590e77e571eefd14abe28"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b760c65308ff1e462f65d69c12e4ae085cff3b332d894637f6273a12a482d09f"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:316cc9b17edf613ac76b1f1f305d2a748f1b976b033b049a6ecdfd5612c70409"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:caf9ee9a5775f3111642d33b86237b05808dafcd6268faa492250e9b78046eb2"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70051525001750221daa10907c77830bc889cb6d865cc0b813d9db7fefc21451"},
|
||||
@@ -203,24 +193,8 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:4093c631e96fdd49e0377a9c167bfd75b6d0bad2ace734c6eb20b348bc3ea180"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:7e4c4629ddad63006efa0ef968c8e4751c5868ff0b1c5c40f76524e894c50248"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:861bf317735688269936f755fa136a99d1ed526883859f86e41a5d43c61d8966"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:87a3044c3a35055527ac75e419dfa9f4f3667a1e887ee80360589eb8c90aabb9"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c5529b34c1c9d937168297f2c1fde7ebe9ebdd5e121297ff9c043bdb2ae3d6fb"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:ca63e1890ede90b2e4454f9a65135a4d387a4585ff8282bb72964fab893f2111"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e79e6520141d792237c70bcd7a3b122d00f2613769ae0cb61c52e89fd3443839"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-win32.whl", hash = "sha256:5f4d5ea15c9382135076d2fb28dde923352fe02951e66935a9efaac8f10e81b0"},
|
||||
{file = "Brotli-1.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:906bc3a79de8c4ae5b86d3d75a8b77e44404b0f4261714306e3ad248d8ab0951"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8bf32b98b75c13ec7cf774164172683d6e7891088f6316e54425fde1efc276d5"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7bc37c4d6b87fb1017ea28c9508b36bbcb0c3d18b4260fcdf08b200c74a6aee8"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c0ef38c7a7014ffac184db9e04debe495d317cc9c6fb10071f7fefd93100a4f"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91d7cc2a76b5567591d12c01f019dd7afce6ba8cba6571187e21e2fc418ae648"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a93dde851926f4f2678e704fadeb39e16c35d8baebd5252c9fd94ce8ce68c4a0"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0db75f47be8b8abc8d9e31bc7aad0547ca26f24a54e6fd10231d623f183d089"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6967ced6730aed543b8673008b5a391c3b1076d834ca438bbd70635c73775368"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:7eedaa5d036d9336c95915035fb57422054014ebdeb6f3b42eac809928e40d0c"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:d487f5432bf35b60ed625d7e1b448e2dc855422e87469e3f450aa5552b0eb284"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:832436e59afb93e1836081a20f324cb185836c617659b07b129141a8426973c7"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-win32.whl", hash = "sha256:43395e90523f9c23a3d5bdf004733246fba087f2948f87ab28015f12359ca6a0"},
|
||||
{file = "Brotli-1.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:9011560a466d2eb3f5a6e4929cf4a09be405c64154e12df0dd72713f6500e32b"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:a090ca607cbb6a34b0391776f0cb48062081f5f60ddcce5d11838e67a01928d1"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2de9d02f5bda03d27ede52e8cfe7b865b066fa49258cbab568720aa5be80a47d"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2333e30a5e00fe0fe55903c8832e08ee9c3b1382aacf4db26664a16528d51b4b"},
|
||||
@@ -230,10 +204,6 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:fd5f17ff8f14003595ab414e45fce13d073e0762394f957182e69035c9f3d7c2"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:069a121ac97412d1fe506da790b3e69f52254b9df4eb665cd42460c837193354"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:e93dfc1a1165e385cc8239fab7c036fb2cd8093728cbd85097b284d7b99249a2"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_2_aarch64.whl", hash = "sha256:aea440a510e14e818e67bfc4027880e2fb500c2ccb20ab21c7a7c8b5b4703d75"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_2_i686.whl", hash = "sha256:6974f52a02321b36847cd19d1b8e381bf39939c21efd6ee2fc13a28b0d99348c"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_2_ppc64le.whl", hash = "sha256:a7e53012d2853a07a4a79c00643832161a910674a893d296c9f1259859a289d2"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:d7702622a8b40c49bffb46e1e3ba2e81268d5c04a34f460978c6b5517a34dd52"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-win32.whl", hash = "sha256:a599669fd7c47233438a56936988a2478685e74854088ef5293802123b5b2460"},
|
||||
{file = "Brotli-1.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:d143fd47fad1db3d7c27a1b1d66162e855b5d50a89666af46e1679c496e8e579"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:11d00ed0a83fa22d29bc6b64ef636c4552ebafcef57154b4ddd132f5638fbd1c"},
|
||||
@@ -245,10 +215,6 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:919e32f147ae93a09fe064d77d5ebf4e35502a8df75c29fb05788528e330fe74"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:23032ae55523cc7bccb4f6a0bf368cd25ad9bcdcc1990b64a647e7bbcce9cb5b"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:224e57f6eac61cc449f498cc5f0e1725ba2071a3d4f48d5d9dffba42db196438"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:cb1dac1770878ade83f2ccdf7d25e494f05c9165f5246b46a621cc849341dc01"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:3ee8a80d67a4334482d9712b8e83ca6b1d9bc7e351931252ebef5d8f7335a547"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:5e55da2c8724191e5b557f8e18943b1b4839b8efc3ef60d65985bcf6f587dd38"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:d342778ef319e1026af243ed0a07c97acf3bad33b9f29e7ae6a1f68fd083e90c"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-win32.whl", hash = "sha256:587ca6d3cef6e4e868102672d3bd9dc9698c309ba56d41c2b9c85bbb903cdb95"},
|
||||
{file = "Brotli-1.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2954c1c23f81c2eaf0b0717d9380bd348578a94161a65b3a2afc62c86467dd68"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:efa8b278894b14d6da122a72fefcebc28445f2d3f880ac59d46c90f4c13be9a3"},
|
||||
@@ -261,10 +227,6 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ab4fbee0b2d9098c74f3057b2bc055a8bd92ccf02f65944a241b4349229185a"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:141bd4d93984070e097521ed07e2575b46f817d08f9fa42b16b9b5f27b5ac088"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fce1473f3ccc4187f75b4690cfc922628aed4d3dd013d047f95a9b3919a86596"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d2b35ca2c7f81d173d2fadc2f4f31e88cc5f7a39ae5b6db5513cf3383b0e0ec7"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:af6fa6817889314555aede9a919612b23739395ce767fe7fcbea9a80bf140fe5"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:2feb1d960f760a575dbc5ab3b1c00504b24caaf6986e2dc2b01c09c87866a943"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:4410f84b33374409552ac9b6903507cdb31cd30d2501fc5ca13d18f73548444a"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-win32.whl", hash = "sha256:db85ecf4e609a48f4b29055f1e144231b90edc90af7481aa731ba2d059226b1b"},
|
||||
{file = "Brotli-1.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3d7954194c36e304e1523f55d7042c59dc53ec20dd4e9ea9d151f1b62b4415c0"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5fb2ce4b8045c78ebbc7b8f3c15062e435d47e7393cc57c25115cfd49883747a"},
|
||||
@@ -277,10 +239,6 @@ files = [
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:949f3b7c29912693cee0afcf09acd6ebc04c57af949d9bf77d6101ebb61e388c"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:89f4988c7203739d48c6f806f1e87a1d96e0806d44f0fba61dba81392c9e474d"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:de6551e370ef19f8de1807d0a9aa2cdfdce2e85ce88b122fe9f6b2b076837e59"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0737ddb3068957cf1b054899b0883830bb1fec522ec76b1098f9b6e0f02d9419"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:4f3607b129417e111e30637af1b56f24f7a49e64763253bbc275c75fa887d4b2"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:6c6e0c425f22c1c719c42670d561ad682f7bfeeef918edea971a79ac5252437f"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:494994f807ba0b92092a163a0a283961369a65f6cbe01e8891132b7a320e61eb"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-win32.whl", hash = "sha256:f0d8a7a6b5983c2496e364b969f0e526647a06b075d034f3297dc66f3b360c64"},
|
||||
{file = "Brotli-1.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:cdad5b9014d83ca68c25d2e9444e28e967ef16e80f6b436918c700c117a85467"},
|
||||
{file = "Brotli-1.1.0.tar.gz", hash = "sha256:81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724"},
|
||||
@@ -654,6 +612,39 @@ typing-extensions = ">=4.8.0"
|
||||
all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"]
|
||||
standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "fastapi-pagination"
|
||||
version = "0.12.34"
|
||||
description = "FastAPI pagination"
|
||||
optional = false
|
||||
python-versions = "<4.0,>=3.8"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "fastapi_pagination-0.12.34-py3-none-any.whl", hash = "sha256:089d1078aae1784395b4dbd923d0c8246641ddcc291c5ec6d92a30edb92ecbdd"},
|
||||
{file = "fastapi_pagination-0.12.34.tar.gz", hash = "sha256:05ee8c0bc572072160f7f30900bfd87869e1880c87bc5797922fec2e49e65f11"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
pydantic = ">=1.9.1"
|
||||
typing-extensions = ">=4.8.0,<5.0.0"
|
||||
|
||||
[package.extras]
|
||||
all = ["SQLAlchemy (>=1.3.20)", "asyncpg (>=0.24.0)", "beanie (>=1.25.0)", "bunnet (>=1.1.0,<2.0.0)", "databases (>=0.6.0)", "django (<5.0.0)", "mongoengine (>=0.23.1,<0.30.0)", "motor (>=3.6.0,<4.0.0)", "odmantic (>=1.0.2,<2.0.0)", "orm (>=0.3.1)", "piccolo (>=0.89,<1.22)", "pony (>=0.7.16,<0.8.0)", "scylla-driver (>=3.25.6,<4.0.0)", "sqlakeyset (>=2.0.1680321678,<3.0.0)", "sqlmodel (>=0.0.22)", "tortoise-orm (>=0.22.0)"]
|
||||
asyncpg = ["SQLAlchemy (>=1.3.20)", "asyncpg (>=0.24.0)"]
|
||||
beanie = ["beanie (>=1.25.0)"]
|
||||
bunnet = ["bunnet (>=1.1.0,<2.0.0)"]
|
||||
databases = ["databases (>=0.6.0)"]
|
||||
django = ["databases (>=0.6.0)", "django (<5.0.0)"]
|
||||
mongoengine = ["mongoengine (>=0.23.1,<0.30.0)"]
|
||||
motor = ["motor (>=3.6.0,<4.0.0)"]
|
||||
odmantic = ["odmantic (>=1.0.2,<2.0.0)"]
|
||||
orm = ["databases (>=0.6.0)", "orm (>=0.3.1)"]
|
||||
piccolo = ["piccolo (>=0.89,<1.22)"]
|
||||
scylla-driver = ["scylla-driver (>=3.25.6,<4.0.0)"]
|
||||
sqlalchemy = ["SQLAlchemy (>=1.3.20)", "sqlakeyset (>=2.0.1680321678,<3.0.0)"]
|
||||
sqlmodel = ["sqlakeyset (>=2.0.1680321678,<3.0.0)", "sqlmodel (>=0.0.22)"]
|
||||
tortoise = ["tortoise-orm (>=0.22.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "freezegun"
|
||||
version = "1.5.1"
|
||||
@@ -2722,7 +2713,7 @@ description = "Python for Window Extensions"
|
||||
optional = true
|
||||
python-versions = "*"
|
||||
groups = ["main"]
|
||||
markers = "platform_python_implementation != \"PyPy\" and sys_platform == \"win32\" and extra == \"dev\""
|
||||
markers = "sys_platform == \"win32\" and platform_python_implementation != \"PyPy\" and extra == \"dev\""
|
||||
files = [
|
||||
{file = "pywin32-308-cp310-cp310-win32.whl", hash = "sha256:796ff4426437896550d2981b9c2ac0ffd75238ad9ea2d3bfa67a1abd546d262e"},
|
||||
{file = "pywin32-308-cp310-cp310-win_amd64.whl", hash = "sha256:4fc888c59b3c0bef905ce7eb7e2106a07712015ea1c8234b703a088d46110e8e"},
|
||||
@@ -4092,4 +4083,4 @@ test = ["fakeredis", "pytest", "pytest-asyncio", "pytest-env", "pytest-mock", "p
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = "^3.12"
|
||||
content-hash = "cd26d8392654433fd53cea5277d3deb5afd847cf2c48f9bebb8fa7bf5f4be66c"
|
||||
content-hash = "3dea00d714187e695c44714ef3a71db53aa55e8453c7f5f91b712af11b0b0e6f"
|
||||
|
||||
@@ -51,6 +51,7 @@ dependencies = [
|
||||
"websockets == 12.0",
|
||||
"yarl ~= 1.14",
|
||||
"zipfile-deflate64 ~= 0.2",
|
||||
"fastapi-pagination (>=0.12.34,<0.13.0)",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
Reference in New Issue
Block a user