38 lines
842 B
Text
38 lines
842 B
Text
|
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) }
|
||
|
}
|
||
|
}
|
||
|
}
|