Add Oasis-Mobile-UX theme with hexagon navigation
- Selectable Oasis-Mobile-UX theme; mobile.css kept intact - Hexagon category launcher on home (10 categories with expandable modules) - Customizable bottom bar (up to 4 shortcuts, Peers/Invites fixed) - Empty states and collapsible activity filters
This commit is contained in:
parent
89a11fd789
commit
9ff72a17a0
19 changed files with 1202 additions and 673 deletions
|
|
@ -7887,6 +7887,28 @@ 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();
|
||||
const MAX = 4;
|
||||
const body = ctx.request.body || {};
|
||||
const action = String(body.action || '').trim();
|
||||
const key = String(body.key || '').trim();
|
||||
const catalog = require("../views/main_views").PINNABLE_MODULES || [];
|
||||
let pins = Array.isArray(cfg.bottomBarPins) ? cfg.bottomBarPins.slice() : [];
|
||||
if (action === 'add') {
|
||||
if (key && catalog.some(m => m.key === key) && !pins.includes(key) && pins.length < MAX) pins.push(key);
|
||||
} else if (action === 'remove') {
|
||||
pins = pins.filter(k => k !== key);
|
||||
} else if (action === 'clear') {
|
||||
pins = [];
|
||||
}
|
||||
cfg.bottomBarPins = pins.slice(0, MAX);
|
||||
saveConfig(cfg);
|
||||
ctx.redirect('/settings/bottombar');
|
||||
})
|
||||
.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