feat(QoL): idle status with generate button off
This commit is contained in:
+3
-2
@@ -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({
|
||||||
|
|||||||
@@ -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.",
|
||||||
|
|||||||
Reference in New Issue
Block a user