Add support for local lists
This commit is contained in:
parent
7861b5b5b1
commit
4fec086508
4 changed files with 36 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue