Setup wizard & 0.3.0 release (#146)

* fix: small merge fixes

* feat: initial setup wizard

* fix: last few localization items

* fix: lint

* fix: bump version
This commit is contained in:
DecDuck
2025-07-31 20:41:02 +10:00
committed by GitHub
parent ed99e020df
commit e4c8d42cc8
25 changed files with 684 additions and 279 deletions

View File

@ -296,8 +296,15 @@ useHead({
const { t } = useI18n();
// Optional token for setup wizard
const { token = undefined } = defineProps<{ token?: string }>();
const headers = token ? { Authorization: token } : undefined;
const sources = ref(
await $dropFetch<WorkingLibrarySource[]>("/api/v1/admin/library/sources"),
await $dropFetch<WorkingLibrarySource[]>("/api/v1/admin/library/sources", {
headers,
}),
);
const editIndex = ref<undefined | number>(undefined);
@ -345,6 +352,7 @@ async function performActionSource() {
options: sourceConfig.value,
},
method: createMode ? "POST" : "PATCH",
headers,
},
);
if (createMode) {
@ -394,6 +402,7 @@ async function deleteSource(index: number) {
await $dropFetch("/api/v1/admin/library/sources", {
method: "DELETE",
body: { id: source.id },
headers,
});
} catch (e) {
createModal(