feat: show runtime learner mode in database tab
This commit is contained in:
@@ -285,6 +285,24 @@ function QuestieOptions.tabs.database:Initialize()
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data_source_runtime = {
|
||||||
|
type = "description",
|
||||||
|
order = 2.07,
|
||||||
|
fontSize = "medium",
|
||||||
|
name = function()
|
||||||
|
local selectedMode = GetLearnerSelectedMode()
|
||||||
|
local runtimeMode = GetLearnerRuntimeMode()
|
||||||
|
if runtimeMode == selectedMode then
|
||||||
|
return string.format("|cFF5EBAF3Runtime mode:|r %s", l10n(runtimeMode == "learner" and "Learner" or runtimeMode == "static" and "Static" or runtimeMode == "none" and "Neither" or "Auto"))
|
||||||
|
end
|
||||||
|
return string.format(
|
||||||
|
"|cFF5EBAF3Runtime mode:|r %s |cFF888888(selected: %s)|r",
|
||||||
|
l10n(runtimeMode == "learner" and "Learner" or runtimeMode == "static" and "Static" or runtimeMode == "none" and "Neither" or "Auto"),
|
||||||
|
l10n(selectedMode == "learner" and "Learner" or selectedMode == "static" and "Static" or selectedMode == "none" and "Neither" or "Auto")
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
learn_npcs = {
|
learn_npcs = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
order = 2.1,
|
order = 2.1,
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ describe("QuestieLearner data source mode", function()
|
|||||||
assert.is_true(has(dbOptions, "none = l10n(\"Neither (base DB only)\")"))
|
assert.is_true(has(dbOptions, "none = l10n(\"Neither (base DB only)\")"))
|
||||||
assert.is_true(has(dbOptions, "local function GetLearnerSelectedMode()"))
|
assert.is_true(has(dbOptions, "local function GetLearnerSelectedMode()"))
|
||||||
assert.is_true(has(dbOptions, "get = function() return GetLearnerSelectedMode() end"))
|
assert.is_true(has(dbOptions, "get = function() return GetLearnerSelectedMode() end"))
|
||||||
|
assert.is_true(has(dbOptions, "Runtime mode:"))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("defaults the learner mode to auto and exposes the live refresh hook", function()
|
it("defaults the learner mode to auto and exposes the live refresh hook", function()
|
||||||
|
|||||||
Reference in New Issue
Block a user