From d2651f22cb56eae17fee53e414607e218a14203a Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 8 Dec 2024 09:36:10 +0800 Subject: [PATCH] Add info about new APIs --- CHANGELOG.md | 14 ++++++++++++++ README.md | 27 +++++++++++---------------- samples/calendars_enabled.lua | 3 +++ samples/icon-sample.lua | 7 +++++++ 4 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 samples/calendars_enabled.lua create mode 100644 samples/icon-sample.lua diff --git a/CHANGELOG.md b/CHANGELOG.md index b3cb41e..4c962ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 * Added `on_load()` callback diff --git a/README.md b/README.md index a074d14..5301e2b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,12 @@ The type of script is determined by the line (meta tag) at the beginning of the # Changelog +### 5.5.4 + +* Added `icon` meta tag +* Added `private_mode` meta tag +* Added `calendar:enabled_calendar_ids()` method + ### 5.5.1 * 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 -### 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) # 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_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: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: @@ -865,10 +858,12 @@ In order for AIO Launcher to correctly display information about the script in t ``` -- name = "Covid info" +-- icon = "fontawesome_icon_name" -- description = "Cases of illness and death from covid" -- data_source = "https://covid19api.com" -- type = "widget" --- foldable = "false" +-- foldable = "true" +-- private_mode = "false" -- author = "Evgeny Zobnin (zobnin@gmail.com)" -- version = "1.0" ``` diff --git a/samples/calendars_enabled.lua b/samples/calendars_enabled.lua new file mode 100644 index 0000000..a149d6d --- /dev/null +++ b/samples/calendars_enabled.lua @@ -0,0 +1,3 @@ +function on_resume() + ui:show_text(table.concat(calendar:enabled_calendar_ids(), ", ")) +end diff --git a/samples/icon-sample.lua b/samples/icon-sample.lua new file mode 100644 index 0000000..f46e6a5 --- /dev/null +++ b/samples/icon-sample.lua @@ -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