feat(frontend): storage shows the heaviest chats, a chat opens its own files with selective cleanup and a whole-chat move to trash
This commit is contained in:
1 parent
5eacabd101
commit
7f124059be
9 files changed
+671
-232
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { ui } from "#lib/stores/ui.svelte.js";
|
||||
|
||||
export type StorageListing = "files" | "chats";
|
||||
|
||||
function createStorageUi() {
|
||||
let listing = $state<StorageListing>("files");
|
||||
let chatId = $state<number | null>(null);
|
||||
|
||||
return {
|
||||
get chatId() {
|
||||
return chatId;
|
||||
},
|
||||
get listing() {
|
||||
return listing;
|
||||
},
|
||||
set listing(next: StorageListing) {
|
||||
listing = next;
|
||||
},
|
||||
openChat(id: number) {
|
||||
chatId = id;
|
||||
ui.openPanel("storage-chat");
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const storageUi = createStorageUi();
|
||||
Reference in new issue
Block a user