From 66f655a89e0e9ad5c4135418c2d13a0b7e702cd5 Mon Sep 17 00:00:00 2001 From: Cleboost Date: Wed, 29 Jul 2026 03:13:10 +0200 Subject: [PATCH] fix(anilist): open plugin settings via noctalia.openSettings() (#118) * fix(anilist): open plugin settings via noctalia.openSettings() Require plugin API 15 and replace the settings-open plugins shell workaround. * fix(anilist): Correct author name capitalization * chore(anilist): bump version --- anilist/README.md | 2 +- anilist/panel.luau | 17 +++++++++++------ anilist/plugin.toml | 6 +++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/anilist/README.md b/anilist/README.md index a759ffe..962c124 100644 --- a/anilist/README.md +++ b/anilist/README.md @@ -42,7 +42,7 @@ Inside the panel: - Filter by list status. Anime uses **Watching**, **Planning**, and so on; manga uses **Reading** instead of Watching and **Plan to Read** instead of Planning. - The **Watching** / **Reading** filter sorts entries by progress (highest first). Other filters sort A–Z. - Use **Reload list** to refresh the active tab without logging in again. -- Use the settings button to open **Settings → Plugins**. +- Use the settings button to open this plugin's settings. - Click a cover image to open a larger preview. From there you can download the cover or close the preview. - Use **−** / **+** to go back or forward one episode/chapter. - Use the check button to mark an entry completed. diff --git a/anilist/panel.luau b/anilist/panel.luau index 4367015..21846d1 100644 --- a/anilist/panel.luau +++ b/anilist/panel.luau @@ -220,11 +220,20 @@ local function filterButton(key, label, filter) }) end +local function settingsButton() + return ui.button({ + glyph = "settings", + variant = "ghost", + tooltip = tr("settings"), + onClick = noctalia.openSettings, + }) +end + local function renderLogin() local children = { ui.row({ align = "center", justify = "space_between", gap = 8 }, { ui.label({ text = tr("login_title"), fontSize = 18, fontWeight = "bold", flexGrow = 1 }), - ui.button({ glyph = "settings", variant = "ghost", tooltip = tr("settings"), onClick = "onOpenSettings" }), + settingsButton(), ui.button({ glyph = "close", variant = "ghost", tooltip = tr("close"), onClick = "onClosePanel" }), }), ui.label({ text = tr("login_help"), fontSize = 12, color = "on_surface_variant", maxLines = 8 }), @@ -530,7 +539,7 @@ local function renderLibrary() table.insert(children, ui.row({ align = "center", justify = "space_between", gap = 8 }, { ui.column({ gap = 2, flexGrow = 1 }, headerChildren), - ui.button({ glyph = "settings", variant = "ghost", tooltip = tr("settings"), onClick = "onOpenSettings" }), + settingsButton(), ui.button({ glyph = "refresh", variant = "ghost", tooltip = tr("refresh"), onClick = "onRefresh" }), ui.button({ glyph = "logout", variant = "ghost", tooltip = tr("logout"), onClick = "onLogout" }), ui.button({ glyph = "close", variant = "ghost", tooltip = tr("close"), onClick = "onClosePanel" }), @@ -683,10 +692,6 @@ end function onNoop() end -function onOpenSettings() - noctalia.runAsync("noctalia msg settings-open plugins") -end - function onConnect() sendCommand("start_oauth") dirty = true diff --git a/anilist/plugin.toml b/anilist/plugin.toml index 0853079..06db5b1 100644 --- a/anilist/plugin.toml +++ b/anilist/plugin.toml @@ -1,8 +1,8 @@ id = "cleboost/anilist" name = "AniList (UNOFFICIAL)" -version = "1.0.1" -plugin_api = 9 -author = "cleboost" +version = "1.1.0" +plugin_api = 15 +author = "Cleboost" license = "MIT" icon = "device-tv" description = "Browse and update your AniList anime and manga lists from a quick panel without opening the site."