Can now import anime from Anilist by ID in Custom list
This commit is contained in:
parent
605e4c763a
commit
b0e32b6717
8 changed files with 156 additions and 37 deletions
37
src/AddAnimeWindow.slint
Normal file
37
src/AddAnimeWindow.slint
Normal file
|
@ -0,0 +1,37 @@
|
|||
import { State } from "./state.slint";
|
||||
import { VText, VTextInput , VButton, ToggleButton, VActionButton, Svg, Palette } from "@selenite";
|
||||
import { ComboBox } from "std-widgets.slint";
|
||||
|
||||
export component AddAnimeWindow inherits Window {
|
||||
title: "Lali - Add List";
|
||||
|
||||
background: Palette.background;
|
||||
default-font-size: 16px;
|
||||
padding: 0px;
|
||||
|
||||
width: 200px;
|
||||
|
||||
private property <bool> show-add-list-form: false;
|
||||
in-out property <string> anilist-anime-id;
|
||||
|
||||
callback import-anilist-anime(string);
|
||||
|
||||
VerticalLayout {
|
||||
alignment: start;
|
||||
padding: 16px;
|
||||
spacing: 16px;
|
||||
source := ComboBox {
|
||||
model: ["Anilist", "Custom"];
|
||||
}
|
||||
|
||||
if source.current-value == "Anilist" : VTextInput {
|
||||
label: "Anilist anime ID";
|
||||
text <=> anilist-anime-id;
|
||||
}
|
||||
|
||||
VButton {
|
||||
text: "Import";
|
||||
clicked => { import-anilist-anime(anilist-anime-id) }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue