diff --git a/community/amdroid-nextalarm-app-widget.lua b/community/amdroid-nextalarm-app-widget.lua index 73ae020..7162f63 100644 --- a/community/amdroid-nextalarm-app-widget.lua +++ b/community/amdroid-nextalarm-app-widget.lua @@ -2,7 +2,7 @@ -- description = "AIO wrapper for the Amdroid Next alarm app widget" -- type = "widget" -- author = "Theodor Galanis (t.me/TheodorGalanis)" --- version = "1.10" +-- version = "1.11" -- foldable = "false" -- uses_app = "com.amdroidalarmclock.amdroid" @@ -46,7 +46,7 @@ function on_click(idx) end function on_settings() -ui:show_dialog("Amdroid app Next Alarm widget", "This script wrapper uses Amdroid app's Next alarm widget to display the next scheduled alarm. No settings are required.") +dialogs:show_dialog("Amdroid app Next Alarm widget", "This script wrapper uses Amdroid app's Next alarm widget to display the next scheduled alarm. No settings are required.") end function setup_app_widget() diff --git a/community/birthdays-widget.lua b/community/birthdays-widget.lua index f3d0afe..419f7d2 100644 --- a/community/birthdays-widget.lua +++ b/community/birthdays-widget.lua @@ -3,7 +3,7 @@ -- description = "Shows upcoming birthdays from the contacts" -- type = "widget" -- author = "Andrey Gavrilov" --- version = "1.2" +-- version = "1.3" local prefs = require "prefs" local fmt = require "fmt" @@ -104,7 +104,7 @@ function on_click(idx) end function on_settings() - ui:show_radio_dialog("Number of events", {1,2,3,4,5,6,7,8,9,10}, prefs.count) + dialogs:show_radio_dialog("Number of events", {1,2,3,4,5,6,7,8,9,10}, prefs.count) end function on_dialog_action(idx) diff --git a/community/calllog-ru-root-widget.lua b/community/calllog-ru-root-widget.lua index c6dfc41..bd6e7ed 100644 --- a/community/calllog-ru-root-widget.lua +++ b/community/calllog-ru-root-widget.lua @@ -2,7 +2,7 @@ -- description = "Скрипт показывает историю вызов через прямое чтение базы звонков" -- type = "widget" -- author = "Andrey Gavrilov" --- version = "1.0" +-- version = "1.1" -- lang = "ru" -- root = "true" @@ -77,7 +77,7 @@ end function on_click(idx) if math.ceil(idx/3) > #tab then - ui:show_radio_dialog("Выберите тип вызовов",types,typ) + dialogs:show_radio_dialog("Выберите тип вызовов",types,typ) else local cmd = "am start -a android.intent.action.DIAL -d tel:"..tab[math.ceil(idx/3)].number system:exec(cmd) diff --git a/community/fifteen-widget.lua b/community/fifteen-widget.lua index a7aca2a..22dcabc 100644 --- a/community/fifteen-widget.lua +++ b/community/fifteen-widget.lua @@ -2,7 +2,7 @@ -- description = "Game" -- type = "widget" -- author = "Andrey Gavrilov" --- version = "1.0" +-- version = "1.1" local json = require "json" local folded = "15 puzzle" @@ -96,7 +96,7 @@ end function on_click(idx) if idx == 0 then - ui:show_dialog("Select Action","","Cancel","Reload") + dialogs:show_dialog("Select Action","","Cancel","Reload") return else local tab = tabs_to_tab(tabs_to_desk(tab_to_tabs(json.decode(files:read("fifteen"))))) diff --git a/community/google-search-app-widget.lua b/community/google-search-app-widget.lua index 5b4c534..11f9a07 100644 --- a/community/google-search-app-widget.lua +++ b/community/google-search-app-widget.lua @@ -2,7 +2,7 @@ -- description = "AIO wrapper for the Google search app widget - open widget settings for options" -- type = "widget" -- author = "Theodor Galanis (t.me/TheodorGalanis)" --- version = "2.6" +-- version = "2.7" -- foldable = "false" -- uses_app: "com.google.android.googlequicksearchbox" @@ -53,13 +53,13 @@ elseif idx == indices[4] then w_bridge:click("image_11") elseif idx == indices[5] then w_bridge:click("image_12") - else return + else return end end function on_settings() local tab = {"Left-handed mode with weather", "Left-handed mode, no weather", "Right-handed mode with weather", "Right-handed mode, no weather" } -ui:show_radio_dialog("Select mode", tab, mode) +dialogs:show_radio_dialog("Select mode", tab, mode) end function on_long_click(idx) @@ -70,7 +70,7 @@ ui:show_toast("Google weather") elseif idx == indices[3] then ui:show_toast("Google discover") elseif idx == indices[4] then - ui:show_toast("Google voice search") + ui:show_toast("Google voice search") elseif idx == indices[5] then ui:show_toast("Google Lens") end @@ -86,7 +86,7 @@ end function setup_app_widget() local id = widgets:setup("com.google.android.googlequicksearchbox/com.google.android.googlequicksearchbox.SearchWidgetProvider") - + if (id ~= nil) then prefs.wid = id else @@ -125,4 +125,4 @@ tab.category = "MAIN" tab.package = "com.google.android.googlequicksearchbox" tab.component = "com.google.android.googlequicksearchbox/com.google.android.apps.search.weather.WeatherExportedActivity" return tab -end \ No newline at end of file +end diff --git a/community/google-translate-widget.lua b/community/google-translate-widget.lua index 52d3112..c48052b 100644 --- a/community/google-translate-widget.lua +++ b/community/google-translate-widget.lua @@ -2,7 +2,7 @@ -- data_source = "https://translate.google.com" -- type = "widget" -- author = "Andrey Gavrilov" --- version = "1.2" +-- version = "1.3" local json = require "json" local uri = "http://translate.googleapis.com/translate_a/single?client=gtx&sl=auto" @@ -13,7 +13,7 @@ function on_resume() end function on_click() - ui:show_edit_dialog("Enter text") + dialogs:show_edit_dialog("Enter text") end function on_dialog_action(text) diff --git a/community/quickactions-widget.lua b/community/quickactions-widget.lua index 7fb35c1..64851df 100644 --- a/community/quickactions-widget.lua +++ b/community/quickactions-widget.lua @@ -4,7 +4,7 @@ -- arguments_help = "Long click button for options, open widget settings for list of buttons" --foldable = "true" -- author = "Theodor Galanis" --- version = "2.5" +-- version = "2.6" md_colors = require "md_colors" @@ -35,7 +35,7 @@ function on_long_click(idx) pos = idx local tab = settings:get() label = get_label(actions[get_checkbox_idx()[idx]]) - if label == nil then + if label == nil then label = names[get_checkbox_idx()[idx]] end ui:show_context_menu({{"angle-left",""},{"ban",""},{"angle-right",""},{icons[get_checkbox_idx()[idx]]:gsub("fa:",""),label}}) @@ -66,13 +66,13 @@ axions = aio:actions() lab = {} for i = 1, #axions do lav = get_label(actions[i]) - if lav == nil then + if lav == nil then table.insert(lab,names[i]) - else + else table.insert(lab, lav) end end - ui:show_checkbox_dialog("Select actions", lab, get_checkbox_idx()) + dialogs:show_checkbox_dialog("Select actions", lab, get_checkbox_idx()) end --utilities-- @@ -140,4 +140,4 @@ axions = aio:actions() return action["label"] end end -end \ No newline at end of file +end diff --git a/community/tvguide-ru-widget.lua b/community/tvguide-ru-widget.lua index f77fbff..2d0b570 100644 --- a/community/tvguide-ru-widget.lua +++ b/community/tvguide-ru-widget.lua @@ -1,7 +1,7 @@ -- name = "ТВ-Программа" -- description = "Программа передач россиийского ТВ" -- type = "widget" --- version = "1.0" +-- version = "1.1" -- lang = "ru" -- author = "Andrey Gavrilov" @@ -23,9 +23,9 @@ end function on_click(idx) if math.ceil(idx/2) > #tab_desc then - ui:show_edit_dialog("Введите название канала","",title) + dialogs:show_edit_dialog("Введите название канала","",title) else - ui:show_dialog(tab_name[math.ceil(idx/2)].."\n"..tab_time[math.ceil(idx/2)],tab_desc[math.ceil(idx/2)],"Перейти к каналу") + dialogs:show_dialog(tab_name[math.ceil(idx/2)].."\n"..tab_time[math.ceil(idx/2)],tab_desc[math.ceil(idx/2)],"Перейти к каналу") link = tab_link[math.ceil(idx/2)] end end diff --git a/community/widgets-on-off.lua b/community/widgets-on-off.lua index 2d8e8bf..23adabc 100644 --- a/community/widgets-on-off.lua +++ b/community/widgets-on-off.lua @@ -2,7 +2,7 @@ -- description = "Turns screen widgets on and off when buttons are pressed" -- type = "widget" -- author = "Andrey Gavrilov" --- version = "3.0" +-- version = "3.1" prefs = require "prefs" @@ -56,7 +56,7 @@ function on_dialog_action(data) end function on_settings() - ui:show_checkbox_dialog("Select widgets", widgets.label, indexes) + dialogs:show_checkbox_dialog("Select widgets", widgets.label, indexes) end function get_indexes(tab1,tab2) diff --git a/main/calendar.lua b/main/calendar.lua index cbde23d..9533a0c 100644 --- a/main/calendar.lua +++ b/main/calendar.lua @@ -32,7 +32,7 @@ end function on_settings() dialog_id = "settings" - ui:show_checkbox_dialog("Check calendars", get_all_cals()[3],cal_id_to_id(settings:get())) + dialogs:show_checkbox_dialog("Check calendars", get_all_cals()[3],cal_id_to_id(settings:get())) end function on_click(i) @@ -51,7 +51,7 @@ function on_click(i) on_resume() elseif i > 1 and i < 8 then dialog_id = "date" - ui:show_edit_dialog("Enter month and year", "Format - 12.2020. Empty value - current month", string.format("%02d.%04d", month, year)) + dialogs:show_edit_dialog("Enter month and year", "Format - 12.2020. Empty value - current month", string.format("%02d.%04d", month, year)) return elseif (i-1)%8 ~= 0 and tab[i] ~= " " then day = tab[i]:match(">(%d+)<"):gsub("^0","") diff --git a/main/shell-widget.lua b/main/shell-widget.lua index 0d10ae1..8f9f52a 100644 --- a/main/shell-widget.lua +++ b/main/shell-widget.lua @@ -20,7 +20,7 @@ function redraw() end function on_click(idx) - ui:show_edit_dialog("Enter command") + dialogs:show_edit_dialog("Enter command") end function on_dialog_action(text) diff --git a/main/unit-converter.lua b/main/unit-converter.lua index 20d25f2..17fb70d 100644 --- a/main/unit-converter.lua +++ b/main/unit-converter.lua @@ -37,10 +37,10 @@ end function on_click(idx) if idx == 1 then dialog_id ="amount" - ui:show_edit_dialog("Enter amount", "", amount) + dialogs:show_edit_dialog("Enter amount", "", amount) elseif idx == 2 then dialog_id = "unit_from" - ui:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_from)) + dialogs:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_from)) elseif idx == 3 then local unit_tmp = unit_from unit_from = unit_to @@ -50,10 +50,10 @@ function on_click(idx) system:copy_to_clipboard(sum) elseif idx == 5 then dialog_id = "unit_to" - ui:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_to)) + dialogs:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_to)) elseif idx == 6 then dialog_id = "unit" - ui:show_radio_dialog("Select converter",get_radio_tab(""),get_radio_idx(unit)) + dialogs:show_radio_dialog("Select converter",get_radio_tab(""),get_radio_idx(unit)) end end