Add aio:add_todo() method

This commit is contained in:
Evgeny
2024-10-31 10:05:43 +07:00
parent 2b3d6d9b90
commit 98afb5708e
2 changed files with 23 additions and 1 deletions

View File

@@ -25,6 +25,10 @@ The type of script is determined by the line (meta tag) at the beginning of the
# Changelog
### 5.5.0
* Added `aio:add_todo()` method
### 5.3.5
* Added `ai` module
@@ -351,7 +355,8 @@ Intent table format (all fields are optional):
* `aio:do_action(string)` - performs an AIO action ([more](https://aiolauncher.app/api.html));
* `aio:actions()` - returns a list of available actions;
* `aio:settings()` - returns a list of available AIO Settings sections;
* `aio:open_settings([section])` - open AIO Settings or AIO Settings section.
* `aio:open_settings([section])` - open AIO Settings or AIO Settings section;
* `aio:add_todo(icon, text)` - add a TODO item with the specified Fontawesome icon and text.
Format of table elements returned by `aio:available_widgets()`:

View File

@@ -0,0 +1,17 @@
function on_resume()
ui:show_lines{
"Add todo #1",
"Add todo #2",
"Add todo #3",
}
end
function on_click(idx)
if idx == 1 then
aio:add_todo("face-smile", "Todo #1")
elseif idx == 2 then
aio:add_todo("face-smile-tongue", "Todo #2")
else
aio:add_todo("face-smile-tear", "Todo #3")
end
end