feat: owner review 2 phase 1: :latest, Unraid array space, Settings with About, whole-folder import (#9)
CI / Build and test (push) Successful in 5m11s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 8m57s
CI / PostgreSQL 16 integration (push) Successful in 3m10s
CI / PostgreSQL 17 integration (push) Successful in 3m30s
CI / Docker image (push) Successful in 49s
Release / Server image (push) Successful in 1m4s
CI / Build and test (push) Successful in 5m11s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 8m57s
CI / PostgreSQL 16 integration (push) Successful in 3m10s
CI / PostgreSQL 17 integration (push) Successful in 3m30s
CI / Docker image (push) Successful in 49s
Release / Server image (push) Successful in 1m4s
- :latest follows the highest stable release, or the highest pre-release while none is stable (Chronos.Tools release-channels); bad tags are refused before anything is built. - Unraid: CHRONOS_SPACE_PATH and the template's Array view show the array's free space; the write volume (cache) is shown apart; completions check the archive volume (507). - Settings is a gear, docked at the foot of the admin sidebar; About is the last part of Settings on the desktop and the panel. - Import > Folder > Whole folder: one sequence per format (desktop only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #9.
This commit is contained in:
1 parent
5acdf146c7
commit
1f089888e8
320 files changed
+3030
-927
No files matched your search
@@ -5,7 +5,12 @@ import { icons } from "./icons.js";
|
||||
import { escapeHtml, attr, errorText, nativeName, formatNumber, fitColumns } from "./ui.js";
|
||||
|
||||
const app = document.getElementById("app");
|
||||
const pages = ["dashboard", "users", "archive", "jobs", "settings", "logs", "about"];
|
||||
// The menu: its pages from the top, then the ones docked at its foot above the account (owner review 2).
|
||||
const topPages = ["dashboard", "users", "archive", "jobs", "logs"];
|
||||
const bottomPages = ["settings"];
|
||||
const pages = [...topPages, ...bottomPages];
|
||||
/** Routes of old bookmarks and where they open now: About is the last group of Settings (owner review 2). */
|
||||
const MOVED = { about: "settings?group=about" };
|
||||
const THEME_KEY = "chronos.admin.theme";
|
||||
const SIDEBAR_KEY = "chronos.admin.sidebar";
|
||||
/** The narrow layout of admin.css, where the menu is the top bar and does not collapse. */
|
||||
@@ -43,7 +48,12 @@ async function start() {
|
||||
}
|
||||
|
||||
function currentPage() {
|
||||
const p = location.hash.replace(/^#\/?/, "").split("?")[0];
|
||||
let p = location.hash.replace(/^#\/?/, "").split("?")[0];
|
||||
if (Object.hasOwn(MOVED, p)) {
|
||||
// The address shows the new route; replaceState fires no hashchange.
|
||||
history.replaceState(null, "", `#/${MOVED[p]}`);
|
||||
p = MOVED[p].split("?")[0];
|
||||
}
|
||||
return pages.includes(p) ? p : "dashboard";
|
||||
}
|
||||
|
||||
@@ -136,7 +146,7 @@ function renderPasswordChange() {
|
||||
}
|
||||
|
||||
function renderShell(page, focus) {
|
||||
const nav = pages.map((p) => `
|
||||
const links = (group) => group.map((p) => `
|
||||
<a href="#/${p}" ${p === page ? 'aria-current="page"' : ""} data-i18n-title="Admin.Nav.${cap(p)}.Tip">${icons[p]}<span data-i18n="Admin.Nav.${cap(p)}"></span>
|
||||
<span class="sr-only" id="badge-text-${p}"></span><span class="badge" id="badge-${p}" aria-hidden="true" hidden></span></a>`).join("");
|
||||
const user = api.user();
|
||||
@@ -146,7 +156,7 @@ function renderShell(page, focus) {
|
||||
<aside class="sidebar">
|
||||
<button class="btn icon sidebar-toggle" id="sidebar-toggle">${icons.menu}</button>
|
||||
${brand()}
|
||||
<nav class="nav">${nav}</nav>
|
||||
<nav class="nav"><div class="nav-group">${links(topPages)}</div><div class="nav-group bottom">${links(bottomPages)}</div></nav>
|
||||
<div class="user">
|
||||
<div class="avatar" aria-hidden="true">${escapeHtml(user.username.slice(0, 1).toUpperCase())}</div>
|
||||
<div class="who"><strong class="ellipsis" dir="auto" title="${attr(user.username)}">${escapeHtml(user.username)}</strong><span data-i18n="Admin.Role.Admin"></span></div>
|
||||
|
||||
Reference in new issue
Block a user