feat: mobile ui and other design

This commit is contained in:
DecDuck
2025-01-28 16:10:42 +11:00
parent cf0aa948fe
commit ecd26a42a8
8 changed files with 143 additions and 91 deletions

View File

@ -18,6 +18,17 @@ export const useCollections = async () => {
return state;
};
export async function refreshCollection(id: string) {
const state = useState<FullCollection[]>("collections");
const collection = await $fetch<FullCollection>(`/api/v1/collection/${id}`);
const index = state.value.findIndex((e) => e.id == id);
if (index == -1) {
state.value.push(collection);
return;
}
state.value[index] = collection;
}
export const useLibrary = async () => {
// @ts-expect-error
const state = useState<FullCollection>("library", () => undefined);