36 lines
576 B
Text
36 lines
576 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 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 config-changed();
|
||
|
}
|