Add info about new APIs

This commit is contained in:
Evgeny
2024-12-08 09:36:10 +08:00
parent 6107bc47ce
commit d2651f22cb
4 changed files with 35 additions and 16 deletions

View File

@@ -1,3 +1,17 @@
### 5.3.5
* Added `ai` module
### 5.3.1
* Added `string:trim()`, `string:starts_with()` and `string:ends_with()` methods
### 5.3.0
* Added `prefs:show_dialog` method
* Added `system:show_notify()` and `system:cancel_notify()` methods
* Added support for SVG icons to the Rich UI API
### 5.2.3 ### 5.2.3
* Added `on_load()` callback * Added `on_load()` callback

View File

@@ -25,6 +25,12 @@ The type of script is determined by the line (meta tag) at the beginning of the
# Changelog # Changelog
### 5.5.4
* Added `icon` meta tag
* Added `private_mode` meta tag
* Added `calendar:enabled_calendar_ids()` method
### 5.5.1 ### 5.5.1
* Added `calendar:is_holiday()` method * Added `calendar:is_holiday()` method
@@ -33,20 +39,6 @@ The type of script is determined by the line (meta tag) at the beginning of the
* Added `aio:add_todo()` method * Added `aio:add_todo()` method
### 5.3.5
* Added `ai` module
### 5.3.1
* Added `string:trim()`, `string:starts_with()` and `string:ends_with()` methods
### 5.3.0
* Added `prefs:show_dialog` method
* Added `system:show_notify()` and `system:cancel_notify()` methods
* Added support for SVG icons to the Rich UI API
[Full changelog](CHANGELOG.md) [Full changelog](CHANGELOG.md)
# Widget scripts # Widget scripts
@@ -502,7 +494,8 @@ If there is a problem with the network, the `on_network_error_$id` callback will
* `calendar:open_event(id|event_table)` - opens an event in the system calendar; * `calendar:open_event(id|event_table)` - opens an event in the system calendar;
* `calendar:open_new_event([start], [end])` - opens a new event in the calendar, `start` - start date of the event in seconds, `end` - end date of the event; * `calendar:open_new_event([start], [end])` - opens a new event in the calendar, `start` - start date of the event in seconds, `end` - end date of the event;
* `calendar:add_event(event_table)` - adds event to the system calendar; * `calendar:add_event(event_table)` - adds event to the system calendar;
* `calendar:is_holiday(date)` - returns true if the given date is a holiday or a weekend. * `calendar:is_holiday(date)` - returns true if the given date is a holiday or a weekend;
* `calendar:enabled_calendar_ids()` - returns list of calendar IDs enabled in the builtin Calendar widget settings.
Event table format: Event table format:
@@ -865,10 +858,12 @@ In order for AIO Launcher to correctly display information about the script in t
``` ```
-- name = "Covid info" -- name = "Covid info"
-- icon = "fontawesome_icon_name"
-- description = "Cases of illness and death from covid" -- description = "Cases of illness and death from covid"
-- data_source = "https://covid19api.com" -- data_source = "https://covid19api.com"
-- type = "widget" -- type = "widget"
-- foldable = "false" -- foldable = "true"
-- private_mode = "false"
-- author = "Evgeny Zobnin (zobnin@gmail.com)" -- author = "Evgeny Zobnin (zobnin@gmail.com)"
-- version = "1.0" -- version = "1.0"
``` ```

View File

@@ -0,0 +1,3 @@
function on_resume()
ui:show_text(table.concat(calendar:enabled_calendar_ids(), ", "))
end

7
samples/icon-sample.lua Normal file
View File

@@ -0,0 +1,7 @@
-- name = "Icon / private mode sample"
-- icon = "house"
-- private_mode = true
function on_resume()
ui:show_text("This script have an icon and supports private mode")
end