Bottom-bar module picker routes
- Add GET/POST /settings/bottombar to choose the pinned module.
This commit is contained in:
parent
bc0f55e914
commit
c7419a44d5
1 changed files with 9 additions and 0 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue