40 lines
675 B
Text
40 lines
675 B
Text
export struct Anime {
|
|
id: int,
|
|
title: string,
|
|
description: string,
|
|
image-url: string,
|
|
image: image
|
|
}
|
|
|
|
export struct List {
|
|
name: string,
|
|
selected: bool,
|
|
}
|
|
|
|
export struct CurrentList {
|
|
name: string,
|
|
animes: [Anime]
|
|
}
|
|
|
|
export struct AddAnilistListParams {
|
|
name: string,
|
|
anilist-user-name: string,
|
|
anilist-list-name: string
|
|
}
|
|
|
|
export struct AddLocalListParams {
|
|
name: string,
|
|
}
|
|
|
|
export global State {
|
|
|
|
in-out property <[List]> lists;
|
|
in-out property <CurrentList> current-list;
|
|
|
|
callback select-list(int);
|
|
callback sync-list(string);
|
|
callback add-anilist-list(AddAnilistListParams);
|
|
callback add-local-list(AddLocalListParams);
|
|
|
|
callback config-changed();
|
|
}
|