Files
2025-09-02 03:32:47 +02:00

21 lines
402 B
Lua

local count = ya.sync(function()
return #cx.tabs
end)
local function entry()
if count() < 2 then
return ya.mgr_emit("quit", {})
end
local yes = ya.confirm({
pos = { "center", w = 60, h = 9 },
title = "Quit?",
content = ui.Text("\nMultiple tabs are open.\n\nAre you sure you want to quit?"):wrap(ui.Text.WRAP),
})
if yes then
ya.mgr_emit("quit", {})
end
end
return { entry = entry }