Bottom-bar module picker routes

- Add GET/POST /settings/bottombar to choose the pinned module.
This commit is contained in:
s1to 2026-07-09 16:44:17 +02:00
parent bc0f55e914
commit c7419a44d5

View file

@ -7887,6 +7887,15 @@ router
saveConfig(cfg);
ctx.redirect(`/modules`);
})
.get("/settings/bottombar", async (ctx) => {
ctx.body = require("../views/main_views").bottomBarPickerView();
})
.post("/settings/bottombar", koaBody(), async (ctx) => {
const cfg = getConfig();
cfg.bottomBarPin = String(ctx.request.body.pin || '').trim();
saveConfig(cfg);
ctx.redirect('/activity');
})
.post("/settings/ai", koaBody(), async (ctx) => {
const aiPrompt = String(ctx.request.body.ai_prompt || "").trim();
if (aiPrompt.length > 128) { sendErrorPage(ctx, "Prompt too long. Must be 128 characters or fewer.", { status: 400 }); return; }