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
This commit is contained in:
+1
-1
@@ -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.
|
||||
|
||||
+11
-6
@@ -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
|
||||
|
||||
+3
-3
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user