Can now import anime from Anilist by ID in Custom list

This commit is contained in:
Vyn 2024-11-21 11:59:39 +01:00
parent 605e4c763a
commit b0e32b6717
8 changed files with 156 additions and 37 deletions

View file

@ -1,4 +1,4 @@
import { State } from "./state.slint";
import { State, ListSource } from "./state.slint";
import { VText, VTextInput , VButton, ToggleButton, VActionButton, Svg, Palette } from "@selenite";
import { ComboBox } from "std-widgets.slint";
@ -117,6 +117,19 @@ export component AppWindow inherits Window {
text: "\{State.current-list.animes.length} animes";
font-size: 1rem;
}
HorizontalLayout {
alignment: start;
if State.current-list.source == ListSource.Local : VButton {
icon-svg: Svg.plus;
text: "Add";
clicked => { State.open-add-anime-window() }
}
if State.current-list.source == ListSource.Anilist : VButton {
text: "Sync";
clicked => { State.sync-list() }
}
}
}
animes-grid-background := Rectangle {