Add aio:add_todo() method
This commit is contained in:
@@ -25,6 +25,10 @@ The type of script is determined by the line (meta tag) at the beginning of the
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
### 5.5.0
|
||||||
|
|
||||||
|
* Added `aio:add_todo()` method
|
||||||
|
|
||||||
### 5.3.5
|
### 5.3.5
|
||||||
|
|
||||||
* Added `ai` module
|
* 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:do_action(string)` - performs an AIO action ([more](https://aiolauncher.app/api.html));
|
||||||
* `aio:actions()` - returns a list of available actions;
|
* `aio:actions()` - returns a list of available actions;
|
||||||
* `aio:settings()` - returns a list of available AIO Settings sections;
|
* `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()`:
|
Format of table elements returned by `aio:available_widgets()`:
|
||||||
|
|
||||||
|
|||||||
17
samples/add_todo_sample.lua
Normal file
17
samples/add_todo_sample.lua
Normal 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
|
||||||
Reference in New Issue
Block a user