feat(QoL): idle status with generate button off

This commit is contained in:
Yocraft-2000
2026-08-03 22:04:02 +02:00
parent d61e327515
commit 7e6ca32873
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ local status = "idle"
local imageSize = 400 local imageSize = 400
local generateButton = noctalia.getConfig("generate_button")
local notifyConf = noctalia.getConfig("notify") local notifyConf = noctalia.getConfig("notify")
local function notify(text, error) local function notify(text, error)
@@ -23,7 +24,7 @@ local function statusText()
elseif status == "copied" then elseif status == "copied" then
return noctalia.tr("panel.status.copied") return noctalia.tr("panel.status.copied")
else else
return noctalia.tr("panel.status.idle") return noctalia.tr(generateButton and "panel.status.idle" or "panel.status.idlebis")
end end
end end
@@ -38,7 +39,7 @@ local function render()
}) })
} }
if noctalia.getConfig("generate_button") then if generateButton then
table.insert( table.insert(
rowContent, rowContent,
ui.button({ ui.button({
+2 -1
View File
@@ -50,7 +50,8 @@
"error": "Error: {message}", "error": "Error: {message}",
"ready": "QR code ready. Scan it here or click it to copy.", "ready": "QR code ready. Scan it here or click it to copy.",
"copied": "QR code copied to clipboard.", "copied": "QR code copied to clipboard.",
"idle": "Enter some text, then press Generate." "idle": "Enter some text, then press Generate.",
"idlebis": "Enter some text, then press Enter."
}, },
"error": { "error": {
"generate_failed": "failed to generate the QR code.", "generate_failed": "failed to generate the QR code.",