1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-22 03:05:32 +02:00

feat(tags): revamp tags tab (#29)

feat(tags): revamp tags tab — tooltips, entry counts, Create/Move flows, Esc handling (#29)
This commit is contained in:
TheGeneralist 2026-07-19 11:02:57 +02:00 committed by GitHub
parent a4de506495
commit 289037235c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 2942 additions and 847 deletions

View file

@ -111,6 +111,26 @@ export async function deleteTag(archiveId, tagUid) {
if (!res.ok) throw new Error(await res.text());
}
export async function createTag(archiveId, path) {
const res = await fetch(`/api/archives/${archiveId}/tags`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ path }),
});
if (!res.ok) throw new Error(await res.text());
return res.json();
}
export async function moveTag(archiveId, tagUid, parentUid) {
const res = await fetch(`/api/archives/${archiveId}/tags/${tagUid}/move`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ parent_uid: parentUid ?? null }),
});
if (!res.ok) throw new Error(await res.text());
return res.json();
}
export async function fetchRuns(archiveId) {
return getJson(`/api/archives/${archiveId}/runs`);
}