feat(frontend): notes list with tag chips and the tag in the url, from the menu and settings, capture status dot on the menu and a line in settings
This commit is contained in:
1 parent
171d8d922d
commit
9c556ff8b9
8 files changed
+596
-9
No files matched your search
@@ -11,6 +11,7 @@
|
||||
import Spinner from "#lib/components/ui/Spinner.svelte";
|
||||
import { t } from "#lib/i18n/locale.svelte.js";
|
||||
import { accounts } from "#lib/stores/accounts.svelte.js";
|
||||
import { notes } from "#lib/stores/notes.svelte.js";
|
||||
import { ui } from "#lib/stores/ui.svelte.js";
|
||||
import { page } from "$app/state";
|
||||
import AnnotationEditor from "./AnnotationEditor.svelte";
|
||||
@@ -41,6 +42,7 @@
|
||||
.then((rows) => {
|
||||
if (current === token) {
|
||||
items = rows;
|
||||
notes.mark(cid, mid, rows.length > 0);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -59,6 +61,7 @@
|
||||
try {
|
||||
const created = await createAnnotation(chatId, messageId, text);
|
||||
items = [created, ...items];
|
||||
notes.mark(chatId, messageId, true);
|
||||
} finally {
|
||||
saving = false;
|
||||
}
|
||||
@@ -72,6 +75,7 @@
|
||||
async function remove(annotation: Annotation) {
|
||||
await deleteAnnotation(annotation.id);
|
||||
items = items.filter((item) => item.id !== annotation.id);
|
||||
notes.mark(annotation.chat_id, annotation.message_id, items.length > 0);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user