Add support for local lists

This commit is contained in:
Vyn 2024-11-20 11:48:49 +01:00
parent 7861b5b5b1
commit 4fec086508
4 changed files with 36 additions and 2 deletions

View file

@ -56,7 +56,7 @@ export component AppWindow inherits Window {
in-out property <string> anilist-list-name;
list-type := ComboBox {
model: ["Anilist"];
model: ["Anilist", "Local"];
}
VTextInput {
label: "List name";
@ -79,6 +79,10 @@ export component AppWindow inherits Window {
anilist-user-name: parent.anilist-user-name,
anilist-list-name: parent.anilist-list-name
});
} else if list-type.current-value == "Local" {
State.add-local-list({
name: parent.name,
});
}
show-add-list-form = false;
}

View file

@ -22,6 +22,10 @@ export struct AddAnilistListParams {
anilist-list-name: string
}
export struct AddLocalListParams {
name: string,
}
export global State {
in-out property <[List]> lists;
@ -30,6 +34,7 @@ export global State {
callback select-list(int);
callback sync-list(string);
callback add-anilist-list(AddAnilistListParams);
callback add-local-list(AddLocalListParams);
callback config-changed();
}