mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-08-03 23:11:28 +02:00
25 lines
635 B
Plaintext
25 lines
635 B
Plaintext
export struct SItem {
|
|
name: string,
|
|
checked: bool,
|
|
amount: int,
|
|
}
|
|
|
|
export global State {
|
|
in-out property <[SItem]> list: [
|
|
{ name: "Test 1", checked: true },
|
|
{ name: "Test 2", checked: false },
|
|
{ name: "Test 3", checked: false },
|
|
];
|
|
callback refresh-list();
|
|
callback add-to-list(string);
|
|
callback check-item(string);
|
|
callback delete-checked();
|
|
callback inc-amount(string);
|
|
callback dec-amount(string);
|
|
in-out property <string> server-address;
|
|
callback set-server-address(string);
|
|
set-server-address(address) => {
|
|
server-address = address;
|
|
}
|
|
}
|