diff --git a/CHANGELOG.md b/CHANGELOG.md index 153b8c77..736f3249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ pre-releases for test devices only. ## 0.3.0-beta.17 +- **Style "Glass".** A third look next to Classic dark and light: *System → Appearance → Style*. The same pages, elements, sizes and corners – only the material changes: translucent, blurred panes over a soft aurora background, in a slate dark and a misty light theme (neither black nor white), with all eight accent colours (raised where needed so small accent text stays readable). It covers the classic and the desktop view and the login page; users with web access can pick their own style. Web apps follow it through the app SDK (`data-style="glass"` on ``, a glass variant of `/_shareos/theme.css`). UCI: `shareos.ui.style` (`classic` | `glass`). - **Devtest images for new models.** A model that is being added is built as `ShareOS---devtest.*` until it is tested (status `devtest` in `post-image.sh`, `BOARD_DEVTEST` in `board.sh`): root keeps the password `shareos` instead of being claimed with a button – the buttons of a new model are not known yet – and the overview and the messages say so. The release build refuses such files, so they only come from the build of a pull request. See [docs/DEVICES.md](docs/DEVICES.md#devtest-image-the-first-image-for-a-new-model). - **Device info** (`http:///deviceinfo`, admins, on every model; not in the menu): everything needed to add a model – flash partitions, CPU, memory, device tree, LEDs, sensors, buttons, GPIOs, serial ports, I2C, USB, network, the U-Boot environment (read only) and the kernel log – as a text file to download or copy. MAC addresses and serial numbers are masked for public issues unless asked for. The same report in the rescue system: `shareos-deviceinfo`. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 1d00857b..25dae78a 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -335,8 +335,9 @@ The timeline covers the first month, from the start on Friday, 16 Oct to 16 Nov ## The web interface The default is the dark blue theme with the logo. Light, dark or "same as the -operating system" and the accent colours blue, green, red and white apply to -all users. The logo and the browser icon take on the accent colour; the logo +operating system", the style (*Classic* or *Glass*: the same pages with +translucent panes over a soft mid-tone background) and the accent colours +apply to all users; users with web access can choose their own. The logo and the browser icon take on the accent colour; the logo can be switched off. Every section with tiles has a switch for a table view at the right of its heading. The interface is available in German and English. diff --git a/docs/ENTWICKLUNG.md b/docs/ENTWICKLUNG.md index a5177697..09be754a 100644 --- a/docs/ENTWICKLUNG.md +++ b/docs/ENTWICKLUNG.md @@ -336,8 +336,9 @@ Die Chronik umfasst den ersten Monat, vom Start am Freitag, 16.10., bis zum 16.1 ## Die Oberfläche Standard ist das dunkelblaue Design mit Logo. Hell, Dunkel oder „wie das -Betriebssystem“ sowie die Akzentfarben Blau, Grün, Rot und Weiß gelten für alle -Nutzer. Logo und Browser-Symbol nehmen die Akzentfarbe an, das Logo lässt sich +Betriebssystem“, der Stil (*Classic* oder *Glass*: dieselben Seiten mit +durchscheinenden Flächen über einem weichen, mittelhellen Hintergrund) und die +Akzentfarben gelten für alle Nutzer; Benutzer mit Web-Zugang können eigene wählen. Logo und Browser-Symbol nehmen die Akzentfarbe an, das Logo lässt sich abschalten. Jeder Bereich mit Kacheln hat rechts in der Kopfzeile einen Schalter für die Tabellenansicht. Die Oberfläche gibt es auf Deutsch und Englisch. diff --git a/docs/TESTEN.md b/docs/TESTEN.md index e2e00038..9161caf5 100644 --- a/docs/TESTEN.md +++ b/docs/TESTEN.md @@ -271,6 +271,7 @@ Die Desktop-Ansicht ist ein **Modul**. Die klassische Ansicht bleibt daneben. - **Admins:** Freigaben → **Dateien** zeigt alle eingehängten Laufwerke: Ordner anlegen, hochladen (auch per Ziehen), herunterladen, umbenennen, verschieben, kopieren, löschen. - **Benutzer:** Im Benutzerkonto „Dateien“ einschalten. Dann gibt es in „Mein ShareOS“ den Reiter **Dateien** mit dem eigenen Ordner und den Freigaben, für die der Benutzer Rechte hat (ab 0.2.0-beta.6, siehe 14m). - **Darstellung:** Benutzer mit Web-Zugang stellen unter **Darstellung** Hell/Dunkel und Akzentfarbe für sich ein (seit 0.3.0-beta.6 acht Farben, darunter Grau: Logo, Browser-Symbol und eine offene App ziehen mit). „Wie für alle“ nimmt wieder die Vorgabe des Admins. +- **Stil Glass:** System → Appearance → **Style: Glass** – jede Seite (klassische und Desktop-Ansicht, Anmeldeseite) zeigt durchscheinende, unscharf hinterlegte Flächen über einem weichen Hintergrund, in Dunkel und Hell, mit denselben Elementgrößen und Ecken wie Classic; die Scanline-Option ist ausgeblendet. Zurück auf Classic: der alte Look, unverändert. Ein Benutzer kann einen eigenen Stil wählen; „Wie für alle“ folgt wieder dem Admin. - Testidee: eine große Datei (z. B. 1 GB) hochladen und wieder herunterladen. Das darf nicht nach 60 s abbrechen. ## 12. Apps (Store) @@ -325,7 +326,7 @@ Ab der ersten Version mit Release-Schlüssel auf der Box (*System → Firmware* - **Webpad 1.1** installieren (Store). Im Dateibrowser steht bei einer `.txt`-Datei **Webpad ↗**; darauf (oder auf den Dateinamen) klicken: Webpad öffnet sich in einem eigenen Fenster mit der Datei. - Etwas ändern, **Ctrl+S**: Meldung „gespeichert“; der Dateibrowser zeigt neue Größe und Zeit. Besitzer und Rechte der Datei bleiben. -- Aussehen: in ShareOS Hell/Dunkel oder die Akzentfarbe wechseln – eine offene App zieht mit. +- Aussehen: in ShareOS Hell/Dunkel, die Akzentfarbe oder den Stil (Classic/Glass) wechseln – eine offene App zieht mit. - Benutzer mit persönlichem Ordner können das genauso mit ihren Dateien. - **Name und Symbole (beta.10):** ShareOS über die IP öffnen (`https://10.241.1.106`). Unter **Apps → Installiert** haben Webpad und WebTerm ihr Symbol. **Öffnen** startet die App unter dem Namen des Zertifikats (`https://shareos.skynet.lan:8444/…`), ohne Zertifikatswarnung. **System → Netzwerk → Name der Box für Links** zeigt den Namen aus dem Zertifikat als Vorschlag; ein eigener Name wird dort gespeichert, leer = automatisch. diff --git a/docs/TESTING.md b/docs/TESTING.md index 41047b69..ce6b0943 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -266,6 +266,7 @@ The desktop view is a **module**. The classic view stays next to it. - **Admins:** Shares → **Files** shows every mounted drive: create folders, upload (also by dragging), download, rename, move, copy, delete. - **Users:** enable "Files" in the user account. "My ShareOS" then has a **Files** tab with the own folder and the shares the user has rights to (from 0.2.0-beta.6, see 14m). - **Look:** users with web access set light/dark and the accent colour for themselves under **Appearance** (eight colours since 0.3.0-beta.6, among them grey: logo, browser icon and an open app take it on). "Same as for everyone" goes back to the admin's choice. +- **Style Glass:** System → Appearance → **Style: Glass** – every page (classic and desktop view, login page) shows translucent, blurred panes over a soft background in dark and light, with the same element sizes and corners as Classic; the scanline option is hidden. Change it back to Classic: the old look, unchanged. A user can pick a style of their own; "Same as for everyone" follows the admin again. - Test idea: upload a large file (e.g. 1 GB) and download it again. It must not stop after 60 s. ## 12. Apps (store) @@ -320,7 +321,7 @@ From the first version with a release key on the box (*System → Firmware* then - Install **Webpad 1.1** (store). In the file browser a `.txt` file shows **Webpad ↗**; click it (or the file name): Webpad opens in its own window with the file. - Change something, **Ctrl+S**: the message says "saved"; the file browser shows the new size and time. Owner and rights of the file stay. -- Look: switch light/dark or the accent colour in ShareOS – an open app follows. +- Look: switch light/dark, the accent colour or the style (Classic/Glass) in ShareOS – an open app follows. - Users with a personal folder can do the same with their files. - **Name and icons (beta.10):** open ShareOS by its IP (`https://10.241.1.106`). Under **Apps → Installed** Webpad and WebTerm show their icon. **Open** starts the app under the certificate's name (`https://shareos.skynet.lan:8444/…`) without a certificate warning. **System → Network → Box name for links** shows the name from the certificate as suggestion; a name of your own is saved there, empty = automatic. diff --git a/src/shareos-core/etc/config/shareos b/src/shareos-core/etc/config/shareos index eb3f402b..5c794c21 100644 --- a/src/shareos-core/etc/config/shareos +++ b/src/shareos-core/etc/config/shareos @@ -15,9 +15,11 @@ config ui 'ui' # language of the web interface for everyone: en, de, ... (www/i18n/) option lang 'en' # look for everyone: theme dark | light | system (follows the computer), - # accent blue | green | red | white + # accent blue | green | red | white | grey | violet | orange | teal, + # style classic | glass (translucent panes) option theme 'dark' option accent 'blue' + option style 'classic' config web 'web' # HTTPS on port 443 (a self-signed certificate is created on first boot) diff --git a/src/shareos-core/parts/rpc/me.uc b/src/shareos-core/parts/rpc/me.uc index 950a6e72..c175be84 100644 --- a/src/shareos-core/parts/rpc/me.uc +++ b/src/shareos-core/parts/rpc/me.uc @@ -205,18 +205,19 @@ add_methods({ ui_set: { // own look; null/'' = back to the look for everyone - args: { theme: '', accent: '' }, + args: { theme: '', accent: '', style: '' }, call: function(req) { let u = session_user(req), a = req.args, c = cursor(); if (!u || u == 'root' || c.get('accounts', u) != 'user') return { error: 'session not bound' }; if (a.theme && !(a.theme in { dark: 1, light: 1, system: 1 })) return { error: 'invalid theme' }; if (a.accent && !(a.accent in ACCENTS)) return { error: 'invalid accent' }; - for (let k in [ 'theme', 'accent' ]) { + if (a.style && !(a.style in STYLES)) return { error: 'invalid style' }; + for (let k in [ 'theme', 'accent', 'style' ]) { if (!(k in a)) continue; if (a[k]) c.set('accounts', u, k, a[k]); else c.delete('accounts', u, k); } c.commit('accounts'); - return { theme: c.get('accounts', u, 'theme') ?? null, accent: c.get('accounts', u, 'accent') ?? null }; + return { theme: c.get('accounts', u, 'theme') ?? null, accent: c.get('accounts', u, 'accent') ?? null, style: c.get('accounts', u, 'style') ?? null }; } }, diff --git a/src/shareos-core/parts/rpc/media.uc b/src/shareos-core/parts/rpc/media.uc index 8188dc51..7e2e2547 100644 --- a/src/shareos-core/parts/rpc/media.uc +++ b/src/shareos-core/parts/rpc/media.uc @@ -175,7 +175,7 @@ function me_info(u) { info.apps = role == 'admin' || !area_on('apps') ? [] : map(apps_for(u), (a) => ({ id: a.id, name: a.name, entry: a.entry, icon: a.icon, icon_data: a.icon_data, description: a.description, permissions: a.permissions ?? [], window: a.window, display: a.display })); info.apps_server = apps_server(); - info.ui = u == 'root' ? null : { theme: c.get('accounts', u, 'theme') ?? null, accent: c.get('accounts', u, 'accent') ?? null }; + info.ui = u == 'root' ? null : { theme: c.get('accounts', u, 'theme') ?? null, accent: c.get('accounts', u, 'accent') ?? null, style: c.get('accounts', u, 'style') ?? null }; info.fav = fav_of(c, u); info.paperless = area_on('paperless') && !!c.get('paperless', 'global', 'url') && c.get('paperless', 'global', 'enabled') != '0' && !!home; return info; diff --git a/src/shareos-core/parts/rpc/web.uc b/src/shareos-core/parts/rpc/web.uc index 8a8c672f..d3a7ee56 100644 --- a/src/shareos-core/parts/rpc/web.uc +++ b/src/shareos-core/parts/rpc/web.uc @@ -12,6 +12,9 @@ const THEMES = { dark: 1, light: 1, system: 1 }; // accent colours – also in www-apps/_shareos/app.js (accepted list) and // www/app.js (ACCENT_NAMES, LOGO_FILTER), palettes in shareos.css and theme.css const ACCENTS = { blue: 1, green: 1, red: 1, white: 1, grey: 1, violet: 1, orange: 1, teal: 1 }; +// styles (material of the panes) – also in www/app.js (STYLE_NAMES) and +// www-apps/_shareos/app.js; the glass style is at the end of shareos.css, desktop.css, theme.css +const STYLES = { classic: 1, glass: 1 }; // modules: system apps with "module" (see shareos-apps) that switch on an // area of the firmware – tab, "My ShareOS" part, background work. The code @@ -35,7 +38,7 @@ function area_on(a) { function ui_settings() { let c = cursor(); - let theme = c.get('shareos', 'ui', 'theme'), accent = c.get('shareos', 'ui', 'accent'); + let theme = c.get('shareos', 'ui', 'theme'), accent = c.get('shareos', 'ui', 'accent'), style = c.get('shareos', 'ui', 'style'); let areas = {}; for (let a in AREAS) areas[a] = c.get('shareos', 'ui', 'area_' + a) != '0'; for (let m in MODULES) areas[m] = module_on(m); @@ -44,7 +47,8 @@ function ui_settings() { logo: (c.get('shareos', 'ui', 'logo') ?? '1') != '0', areas, theme: THEMES[theme] ? theme : 'dark', - accent: ACCENTS[accent] ? accent : 'blue' + accent: ACCENTS[accent] ? accent : 'blue', + style: STYLES[style] ? style : 'classic' }; } @@ -58,7 +62,7 @@ add_methods({ }, set: { - args: { lang: '', logo: false, theme: '', accent: '', areas: {} }, + args: { lang: '', logo: false, theme: '', accent: '', style: '', areas: {} }, call: function(req) { let c = cursor(); c.set('shareos', 'ui', 'ui'); // section may be missing in configs from older versions @@ -83,6 +87,10 @@ add_methods({ if (!ACCENTS[req.args.accent]) return { error: 'invalid accent' }; c.set('shareos', 'ui', 'accent', req.args.accent); } + if (req.args.style) { + if (!STYLES[req.args.style]) return { error: 'invalid style' }; + c.set('shareos', 'ui', 'style', req.args.style); + } c.commit('shareos'); if (length(changed)) { system('/usr/sbin/shareos-cron sync >/dev/null 2>&1'); diff --git a/src/shareos-core/parts/web/apps.js b/src/shareos-core/parts/web/apps.js index b52d0763..f3304d64 100644 --- a/src/shareos-core/parts/web/apps.js +++ b/src/shareos-core/parts/web/apps.js @@ -49,7 +49,7 @@ async function favSave(args) { // apps get the look and the address of this interface (for messages) in the URL function appParams(extra = {}) { // user: the app SDK keeps the browser storage of the accounts apart - return new URLSearchParams({ theme: effTheme(), accent: S.accent, origin: location.origin, user: S.me?.name || S.user || '', lang: LANG, ...extra }).toString(); + return new URLSearchParams({ theme: effTheme(), accent: S.accent, style: S.style, origin: location.origin, user: S.me?.name || S.user || '', lang: LANG, ...extra }).toString(); } const appLaunchUrl = (a, srv, extra) => `${appUrl(a, srv)}?${appParams(extra)}`; const appWins = new Set(); @@ -128,7 +128,7 @@ async function appFrameLoad() { // tell open app windows and embedded apps about a new look function themeToApps() { - const msg = { sos: 'theme', theme: effTheme(), accent: S.accent }, origin = appBase(appSrv()); + const msg = { sos: 'theme', theme: effTheme(), accent: S.accent, style: S.style }, origin = appBase(appSrv()); for (const w of appWins) { if (w.closed) appWins.delete(w); else try { w.postMessage(msg, origin); } catch (e) { } } // the app shown in the page and the app windows of the desktop view for (const f of document.querySelectorAll('#appframe, iframe.dk-app')) try { f.contentWindow?.postMessage(msg, origin); } catch (e) { } diff --git a/src/shareos-core/parts/web/core.js b/src/shareos-core/parts/web/core.js index e0e6f36a..a802325b 100644 --- a/src/shareos-core/parts/web/core.js +++ b/src/shareos-core/parts/web/core.js @@ -171,6 +171,7 @@ const S = { // theme and accent are system-wide (UCI shareos.ui), cached here for the first paint theme: store.get('theme') || 'dark', // dark | light | system accent: store.get('accent') || 'blue', + style: store.get('style') === 'glass' ? 'glass' : 'classic', // classic | glass (material of the panes) scan: store.get('scan') !== '0', // only this browser views: (() => { try { return JSON.parse(store.get('views') || '{}'); } catch (e) { return {}; } })(), logo: store.get('logo') !== '0' // global setting (UCI shareos.ui.logo), cached for the login page @@ -226,6 +227,8 @@ const LOGO_FILTER = { const logoFilter = () => LOGO_FILTER[effTheme() === 'light' && LOGO_FILTER[S.accent + '-light'] != null ? S.accent + '-light' : S.accent] || ''; // the accent colours to choose from (order of the swatches) const ACCENT_NAMES = { blue: 'Blue', teal: 'Teal', green: 'Green', orange: 'Orange', red: 'Red', violet: 'Violet', grey: 'Grey', white: 'White' }; +// the styles: the same interface, other material of the panes +const STYLE_NAMES = { classic: 'Classic', glass: 'Glass' }; const MQ_DARK = window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null; function effTheme() { return S.theme === 'system' ? (MQ_DARK && !MQ_DARK.matches ? 'light' : 'dark') : S.theme; } @@ -233,9 +236,10 @@ MQ_DARK?.addEventListener?.('change', () => { if (S.theme === 'system') { applyT function applyTheme() { const app = $('#app'); - app.className = 'sos acc-' + S.accent + (effTheme() === 'light' ? ' light' : '') + (S.desk ? ' desk' : ''); + app.className = 'sos acc-' + S.accent + (effTheme() === 'light' ? ' light' : '') + (S.style === 'glass' ? ' glass' : '') + (S.desk ? ' desk' : ''); $('.scan', app).hidden = !S.scan; - const bg = getComputedStyle(app).getPropertyValue('--bg').trim(); + // the page ground: --ground in the glass style (there --bg is the well inside a pane) + const cs = getComputedStyle(app), bg = (cs.getPropertyValue('--ground') || cs.getPropertyValue('--bg')).trim(); document.body.style.background = bg; $('meta[name=theme-color]')?.setAttribute('content', bg || '#1b2433'); tintFavicon(); @@ -264,10 +268,10 @@ function tintFavicon() { } async function saveLook(v) { - store.set('theme', S.theme); store.set('accent', S.accent); + store.set('theme', S.theme); store.set('accent', S.accent); store.set('style', S.style); try { if (isUser()) S.me.ui = await rpc('shareos.me', 'ui_set', v); - else { await rpc('shareos.ui', 'set', v); S.sysLook = { theme: S.theme, accent: S.accent }; } + else { await rpc('shareos.ui', 'set', v); S.sysLook = { theme: S.theme, accent: S.accent, style: S.style }; } } catch (e) { toast('Appearance: ' + e.message, true); } } diff --git a/src/shareos-core/parts/web/deviceinfo.js b/src/shareos-core/parts/web/deviceinfo.js index 268c7260..8c9517f6 100644 --- a/src/shareos-core/parts/web/deviceinfo.js +++ b/src/shareos-core/parts/web/deviceinfo.js @@ -40,9 +40,9 @@ Object.assign(SYS, { - ${!d || d.loading ? html`
Reading …
` - : d.error ? html`` - : html`
${d.text}
`} + ${!d || d.loading ? html`
Reading …
` + : d.error ? html`` + : html`
${d.text}
`} `; } }); diff --git a/src/shareos-core/parts/web/layout.js b/src/shareos-core/parts/web/layout.js index b1f56186..4e36276e 100644 --- a/src/shareos-core/parts/web/layout.js +++ b/src/shareos-core/parts/web/layout.js @@ -13,7 +13,8 @@ async function loadUiSettings() { S.defaultPw = !!r.default_password; if (r.theme) { S.theme = r.theme; store.set('theme', r.theme); } if (r.accent) { S.accent = r.accent; store.set('accent', r.accent); } - S.sysLook = { theme: r.theme || S.theme, accent: r.accent || S.accent }; + if (r.style) { S.style = r.style; store.set('style', r.style); } + S.sysLook = { theme: r.theme || S.theme, accent: r.accent || S.accent, style: r.style || S.style }; if (r.lang && r.lang !== LANG) { try { localStorage.setItem('shareos.lang', r.lang); } catch (e) { } return r.lang; } } catch (e) { } return LANG; diff --git a/src/shareos-core/parts/web/me.js b/src/shareos-core/parts/web/me.js index 84d81f39..bb82ea62 100644 --- a/src/shareos-core/parts/web/me.js +++ b/src/shareos-core/parts/web/me.js @@ -40,15 +40,18 @@ function userLookView() {
ACCENT COLOUR
${Object.keys(names).map((c) => html``)}

Applies only to your login, on every device. Logo and browser icon take on the accent colour.

- + ${S.style === 'glass' ? '' : html``} ${favBarOpt()}
- ${own.theme || own.accent ? html`
` : ''} + ${own.theme || own.accent || own.style ? html`
` : ''}
CHANGE PASSWORD
@@ -136,7 +139,13 @@ function renderUserMain() { S.theme = v || S.sysLook?.theme || 'dark'; applyTheme(); renderUserHeader(); renderUserMain(); saveLook({ theme: v }); }); - $('#opt-uscan').addEventListener('change', (e) => { S.scan = e.target.checked; store.set('scan', S.scan ? '1' : '0'); applyTheme(); }); + $('#opt-ustyle').addEventListener('change', (e) => { + const v = e.target.value; + S.me.ui = { ...S.me.ui, style: v || null }; + S.style = v || S.sysLook?.style || 'classic'; applyTheme(); renderUserHeader(); renderUserMain(); + saveLook({ style: v }); + }); + $('#opt-uscan')?.addEventListener('change', (e) => { S.scan = e.target.checked; store.set('scan', S.scan ? '1' : '0'); applyTheme(); }); return; } renderUserHome(); diff --git a/src/shareos-core/parts/web/session.js b/src/shareos-core/parts/web/session.js index a12047d4..b38a5ad4 100644 --- a/src/shareos-core/parts/web/session.js +++ b/src/shareos-core/parts/web/session.js @@ -30,8 +30,8 @@ const isUser = () => !!(S.me && S.me.role !== 'admin'); // plain users may have their own look; otherwise the look for everyone function applyOwnLook() { - const sys = S.sysLook || { theme: S.theme, accent: S.accent }, own = isUser() ? S.me.ui || {} : {}; - S.theme = own.theme || sys.theme; S.accent = own.accent || sys.accent; + const sys = S.sysLook || { theme: S.theme, accent: S.accent, style: S.style }, own = isUser() ? S.me.ui || {} : {}; + S.theme = own.theme || sys.theme; S.accent = own.accent || sys.accent; S.style = own.style || sys.style || 'classic'; applyTheme(); } diff --git a/src/shareos-core/parts/web/system-general.js b/src/shareos-core/parts/web/system-general.js index 205ee070..442c5ecd 100644 --- a/src/shareos-core/parts/web/system-general.js +++ b/src/shareos-core/parts/web/system-general.js @@ -231,12 +231,15 @@ Object.assign(SYS, {
APPEARANCEapplies to everyone
ACCENT COLOUR
${Object.keys(names).map((c) => html``)}

The logo and the browser icon take on the accent colour. The setting applies to everyone, including the login page.

+

Glass shows the same pages with translucent panes over a soft background.

- + ${S.style === 'glass' ? '' : html``}
@@ -436,6 +439,7 @@ afterSystemPage('general', () => { afterSystemPage('appearance', () => { $('#opt-theme').addEventListener('change', (e) => { S.theme = e.target.value; applyTheme(); renderHeader(); renderMain(); saveLook({ theme: S.theme }); }); + $('#opt-style').addEventListener('change', (e) => { S.style = e.target.value; applyTheme(); renderHeader(); renderMain(); saveLook({ style: S.style }); }); $('#opt-lang').addEventListener('change', async (e) => { try { await rpc('shareos.ui', 'set', { lang: e.target.value }); @@ -450,7 +454,7 @@ afterSystemPage('appearance', () => { S.logo = on; store.set('logo', on ? '1' : '0'); renderHeader(); renderMain(); } catch (err) { e.target.checked = !on; toast('Logo: ' + err.message, true); } }); - $('#opt-scan').addEventListener('change', (e) => { S.scan = e.target.checked; store.set('scan', S.scan ? '1' : '0'); applyTheme(); }); + $('#opt-scan')?.addEventListener('change', (e) => { S.scan = e.target.checked; store.set('scan', S.scan ? '1' : '0'); applyTheme(); }); document.querySelectorAll('.chip-show').forEach((c) => c.addEventListener('change', () => { const h = new Set(chipHidden()); if (c.checked) h.delete(c.dataset.id); else h.add(c.dataset.id); @@ -476,8 +480,8 @@ Object.assign(ACTIONS, { }, async 'look-reset'() { try { - S.me.ui = await rpc('shareos.me', 'ui_set', { theme: '', accent: '' }); - applyOwnLook(); store.set('theme', S.theme); store.set('accent', S.accent); + S.me.ui = await rpc('shareos.me', 'ui_set', { theme: '', accent: '', style: '' }); + applyOwnLook(); store.set('theme', S.theme); store.set('accent', S.accent); store.set('style', S.style); renderUserHeader(); renderUserMain(); toast('Look reset to the one for everyone.'); } catch (e) { toast('Appearance: ' + e.message, true); } }, diff --git a/src/shareos-core/www-apps/_shareos/app.js b/src/shareos-core/www-apps/_shareos/app.js index fe6d2626..cb801fb8 100644 --- a/src/shareos-core/www-apps/_shareos/app.js +++ b/src/shareos-core/www-apps/_shareos/app.js @@ -4,7 +4,8 @@ * * * ShareOS.app id of this app (first part of the path) - * ShareOS.theme { theme: 'dark'|'light', accent } – applied to + * ShareOS.theme { theme: 'dark'|'light', accent, style: 'classic'|'glass' } + * – applied to (data-theme, data-accent, data-style) * ShareOS.onTheme(fn) called when the user changes the look * ShareOS.file the file the app was opened with, or null: * .name, .mode ('view'|'edit') (after await ShareOS.file.info()) @@ -260,7 +261,7 @@ * browser this separates, it does not protect: what must stay private goes * to the user's folders on the box (ShareOS.fs), checked by the box. * - * URL parameters set by ShareOS: theme, accent, file (ticket), name, origin, + * URL parameters set by ShareOS: theme, accent, style, file (ticket), name, origin, * fs (grant for ShareOS.fs), user (account), lang. */ (function () { @@ -333,13 +334,15 @@ // the look is the same for everybody in this browser: plain keys function store(k, v) { try { if (v === undefined) return nativeLS.getItem(k); nativeLS.setItem(k, v); } catch (e) { return null; } } - function applyTheme(theme, accent) { + function applyTheme(theme, accent, style) { if (theme !== 'light' && theme !== 'dark') theme = window.matchMedia && matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'; if (['blue', 'green', 'red', 'white', 'grey', 'violet', 'orange', 'teal'].indexOf(accent) < 0) accent = 'blue'; + if (style !== 'glass') style = 'classic'; root.setAttribute('data-theme', theme); root.setAttribute('data-accent', accent); - api.theme = { theme: theme, accent: accent }; + root.setAttribute('data-style', style); + api.theme = { theme: theme, accent: accent, style: style }; themeFns.forEach(function (fn) { try { fn(api.theme); } catch (e) { } }); } @@ -356,8 +359,8 @@ if (!adminOrigin || ev.origin !== adminOrigin) return; var m = ev.data || {}; if (m.sos === 'theme') { - store('sos-theme', m.theme); store('sos-accent', m.accent); - applyTheme(m.theme, m.accent); + store('sos-theme', m.theme); store('sos-accent', m.accent); store('sos-style', m.style || ''); + applyTheme(m.theme, m.accent, m.style); } }); function toAdmin(msg) { @@ -488,7 +491,7 @@ + '.sos-pick .empty{padding:20px;text-align:center;color:var(--sos-muted,#6f90ad);cursor:default}' + '.sos-pick select,.sos-pick input{min-height:32px;padding:0 10px;border:1px solid var(--sos-line,#15253b);border-radius:8px;background:var(--sos-bg,#06090d);color:var(--sos-text,#c6dff5);font:inherit}.sos-pick input{flex:1}' + '.sos-pick button{min-height:32px;padding:0 12px;border:1px solid var(--sos-line,#15253b);border-radius:8px;background:var(--sos-panel,#0b111a);color:var(--sos-text,#c6dff5);font:600 12px inherit;cursor:pointer}' - + '.sos-pick button.primary{background:var(--sos-accent,#3da5ff);border-color:var(--sos-accent,#3da5ff);color:var(--sos-bg,#06090d)}.sos-pick button:disabled{opacity:.5;cursor:default}' + + '.sos-pick button.primary{background:var(--sos-accent,#3da5ff);border-color:var(--sos-accent,#3da5ff);color:var(--sos-ink,var(--sos-bg,#06090d))}.sos-pick button:disabled{opacity:.5;cursor:default}' + '.sos-pick .err{color:var(--sos-err,#ff5f5f)}'; function el(tag, cls, text) { var e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; } function fmtSize(b) { var u = ['B', 'KB', 'MB', 'GB', 'TB'], i = 0; while (b >= 1000 && i < 4) { b /= 1000; i++; } return (i ? b.toFixed(1) : b) + ' ' + u[i]; } @@ -803,7 +806,7 @@ function openApp(id, size) { if (!/^[a-z][a-z0-9-]{1,31}$/.test(id || '')) return null; size = size || {}; - var p = new URLSearchParams({ theme: (api.theme || {}).theme || '', accent: (api.theme || {}).accent || '', user: user, lang: de ? 'de' : (q.get('lang') || '') }); + var p = new URLSearchParams({ theme: (api.theme || {}).theme || '', accent: (api.theme || {}).accent || '', style: (api.theme || {}).style || '', user: user, lang: de ? 'de' : (q.get('lang') || '') }); if (adminOrigin) p.set('origin', adminOrigin); var w = Math.max(400, Math.min(+size.width || 1000, screen.availWidth || 4000)); var h = Math.max(300, Math.min(+size.height || 700, screen.availHeight || 4000)); @@ -869,8 +872,8 @@ }; window.ShareOS = api; - if (q.get('theme')) { store('sos-theme', q.get('theme')); store('sos-accent', q.get('accent') || ''); } - applyTheme(q.get('theme') || store('sos-theme'), q.get('accent') || store('sos-accent')); + if (q.get('theme')) { store('sos-theme', q.get('theme')); store('sos-accent', q.get('accent') || ''); store('sos-style', q.get('style') || ''); } + applyTheme(q.get('theme') || store('sos-theme'), q.get('accent') || store('sos-accent'), q.get('style') || store('sos-style')); if (embedded) { root.setAttribute('data-embedded', ''); if ('ResizeObserver' in window) diff --git a/src/shareos-core/www-apps/_shareos/theme.css b/src/shareos-core/www-apps/_shareos/theme.css index 7ac54708..ce890477 100644 --- a/src/shareos-core/www-apps/_shareos/theme.css +++ b/src/shareos-core/www-apps/_shareos/theme.css @@ -6,7 +6,8 @@ * Colours: --sos-bg, --sos-panel, --sos-bar, --sos-line, --sos-accent, * --sos-soft, --sos-dim, --sos-text, --sos-muted, --sos-ok, --sos-warn, * --sos-err, --sos-rgb (accent as r,g,b). Light/dark: , - * accent: . + * accent: , + * style: (glass: translucent panes, see the end). * Building blocks: .sos-app, .sos-titlebar, .sos-menubar (+ .sos-menu), * .sos-toolbar, .sos-statusbar, .sos-btn, .sos-input, .sos-dialog. */ @@ -155,3 +156,48 @@ /* shown inside the ShareOS interface (permission "embed") */ :root[data-embedded] .sos-titlebar { display: none; } + +/* style "Glass" (, set by app.js): the same building + blocks with translucent panes over a soft mid-tone background. Embedded in a + ShareOS window the page is transparent, so the window's pane shows through. + Extra variables: --sos-ground (page ground), --sos-blur (backdrop-filter). */ +:root[data-style="glass"] { + --sos-ground: #161e2d; --sos-bg: rgba(12, 18, 28, .38); --sos-panel: rgba(42, 56, 80, .55); --sos-bar: rgba(30, 42, 62, .58); + --sos-line: rgba(255, 255, 255, .12); --sos-text: #eef3fa; --sos-muted: #b0bfd1; --sos-pop: rgba(46, 62, 88, .8); + --sos-ok: #4ee391; --sos-warn: #ecc967; --sos-err: #ff8f8f; --sos-ink: #08131f; + --sos-blur: blur(16px) saturate(160%); +} +:root[data-style="glass"][data-accent="green"] { --sos-accent: #3dff8a; --sos-soft: #2bcf6c; --sos-dim: #2f8f55; } +:root[data-style="glass"][data-accent="red"] { --sos-accent: #ff8a95; --sos-soft: #ee949e; --sos-dim: #a8414c; } +:root[data-style="glass"][data-accent="blue"] { --sos-accent: #5cb3ff; --sos-soft: #77b4e7; --sos-dim: #3a73ad; } +:root[data-style="glass"][data-accent="white"] { --sos-accent: #f2f4f5; --sos-soft: #c9cdd1; --sos-dim: #7a8087; } +:root[data-style="glass"][data-accent="grey"] { --sos-accent: #a4aeb9; --sos-soft: #a7adb6; --sos-dim: #69717b; } +:root[data-style="glass"][data-accent="violet"] { --sos-accent: #b89fff; --sos-soft: #b7a1f9; --sos-dim: #6a4fb0; } +:root[data-style="glass"][data-accent="orange"] { --sos-accent: #ffa043; --sos-soft: #e29f5d; --sos-dim: #a86a2c; } +:root[data-style="glass"][data-accent="teal"] { --sos-accent: #38d9cf; --sos-soft: #2ec1b9; --sos-dim: #2a9e98; } +:root[data-style="glass"][data-theme="light"] { + --sos-ground: #cdd7e4; --sos-bg: rgba(196, 208, 223, .55); --sos-panel: rgba(241, 245, 251, .58); --sos-bar: rgba(236, 242, 249, .55); + --sos-line: rgba(15, 26, 40, .12); --sos-text: #0f1a28; --sos-muted: #3d4b5d; --sos-pop: rgba(244, 247, 252, .82); + --sos-ok: #0b6630; --sos-warn: #654800; --sos-err: #a32020; --sos-ink: #fff; +} +:root[data-style="glass"][data-theme="light"][data-accent="green"] { --sos-accent: #0a7336; --sos-soft: #117338; --sos-dim: #7fbf99; } +:root[data-style="glass"][data-theme="light"][data-accent="red"] { --sos-accent: #be2939; --sos-soft: #b02434; --sos-dim: #d98e96; } +:root[data-style="glass"][data-theme="light"][data-accent="blue"] { --sos-accent: #1c63bb; --sos-soft: #1a5bab; --sos-dim: #8fb2e0; } +:root[data-style="glass"][data-theme="light"][data-accent="white"] { --sos-accent: #1d2125; --sos-soft: #3a4046; --sos-dim: #9aa0a6; } +:root[data-style="glass"][data-theme="light"][data-accent="grey"] { --sos-accent: #56616e; --sos-soft: #3d4651; --sos-dim: #a9b0b8; } +:root[data-style="glass"][data-theme="light"][data-accent="violet"] { --sos-accent: #6a46d4; --sos-soft: #501ea7; --sos-dim: #b29ae3; } +:root[data-style="glass"][data-theme="light"][data-accent="orange"] { --sos-accent: #9b4e00; --sos-soft: #955211; --sos-dim: #d9b089; } +:root[data-style="glass"][data-theme="light"][data-accent="teal"] { --sos-accent: #096e69; --sos-soft: #0b6e69; --sos-dim: #8fd3cf; } +:root[data-style="glass"] .sos-app { + background: radial-gradient(ellipse 55% 60% at 85% 10%, rgba(58, 212, 245, .2), transparent 70%), + radial-gradient(ellipse 50% 55% at 8% 95%, rgba(138, 108, 255, .2), transparent 70%), var(--sos-ground); + background-attachment: fixed; +} +:root[data-style="glass"][data-embedded] .sos-app { background: transparent; } +:root[data-style="glass"] :is(.sos-titlebar, .sos-menubar, .sos-toolbar, .sos-statusbar) { -webkit-backdrop-filter: var(--sos-blur); backdrop-filter: var(--sos-blur); } +:root[data-style="glass"] :is(.sos-menu, .sos-dialog) { background: var(--sos-pop); -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); } +:root[data-style="glass"] .sos-btn { -webkit-backdrop-filter: var(--sos-blur); backdrop-filter: var(--sos-blur); } +:root[data-style="glass"] .sos-btn.primary { color: var(--sos-ink); } +:root[data-style="glass"] .sos-dialog::backdrop { background: rgba(10, 15, 24, .45); backdrop-filter: blur(6px); } +:root[data-style="glass"] { scrollbar-color: var(--sos-dim) transparent; } +@media (prefers-reduced-transparency: reduce) { :root[data-style="glass"] { --sos-panel: var(--sos-pop); --sos-blur: none; } } diff --git a/src/shareos-core/www/desktop.css b/src/shareos-core/www/desktop.css index f7101170..cc9aa028 100644 --- a/src/shareos-core/www/desktop.css +++ b/src/shareos-core/www/desktop.css @@ -135,3 +135,19 @@ dialog.dk-wd{width:min(560px,calc(100vw - 32px));max-width:min(560px,calc(100vw .dk-menu{right:12px} .dk-sg{grid-template-columns:repeat(3,minmax(0,1fr))} } + +/* style "Glass" (see shareos.css): the wallpaper is the aurora ground, windows and + bars are panes; a wallpaper image replaces the aurora, the panes stay */ +.sos.glass .dk-wall:not(.img){background:radial-gradient(ellipse 55% 60% at 85% 10%,rgba(58,212,245,.2),transparent 70%),radial-gradient(ellipse 50% 55% at 8% 95%,rgba(138,108,255,.2),transparent 70%),radial-gradient(ellipse 70% 50% at 45% 55%,rgba(var(--rgb),.14),transparent 75%),var(--ground)} +.sos.glass .dk-wall.img{background-color:var(--ground)} +.sos.glass .dk-bar{background:var(--bar);-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur)} +.sos.glass :is(.dk-tb,.dk-tw,.dk-tile){-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);box-shadow:inset 0 1px 0 var(--hi)} +.sos.glass .dk-win{-webkit-backdrop-filter:var(--blur2);backdrop-filter:var(--blur2);box-shadow:inset 0 1px 0 var(--hi),0 18px 50px rgba(5,9,16,.42)} +.sos.glass.light .dk-win{box-shadow:inset 0 1px 0 var(--hi),0 18px 50px rgba(30,45,66,.2)} +.sos.glass .dk-wt{background:var(--bar)} +.sos.glass .dk-wc{background:transparent} +.sos.glass .dk-wc iframe{background:transparent} +.sos.glass .dk-view .subtabs{background:var(--bar)} +.sos.glass .dk-pop{background:var(--pop);-webkit-backdrop-filter:var(--blur2);backdrop-filter:var(--blur2);box-shadow:inset 0 1px 0 var(--hi),0 24px 60px rgba(5,9,16,.45)} +.sos.glass .dk-av{color:var(--ink)} +.sos.glass .dk-il{background:var(--bar);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)} diff --git a/src/shareos-core/www/i18n/ar.json b/src/shareos-core/www/i18n/ar.json index dc8701c0..87607bbf 100644 --- a/src/shareos-core/www/i18n/ar.json +++ b/src/shareos-core/www/i18n/ar.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "بيانات العتاد لإضافة طراز", "Copying is not allowed here – use Download.": "النسخ غير مسموح هنا – استخدم التنزيل.", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "الطراز وأقسام الذاكرة الوميضية والمعالج والذاكرة والمصابيح والمستشعرات والأزرار ومنافذ GPIO والمنافذ التسلسلية والشبكة وبيئة U-Boot وسجل النواة لهذا الجهاز – كل ما يحتاجه طراز جديد. قراءة فقط، لا يتغير شيء. أرفق الملف بتذكرة الطراز.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "إظهار عناوين MAC والأرقام التسلسلية (وإلا فهي مخفية – لا تضعها في التذاكر العامة)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "إظهار عناوين MAC والأرقام التسلسلية (وإلا فهي مخفية – لا تضعها في التذاكر العامة)", + "STYLE": "النمط", + "Glass": "زجاج", + "Glass shows the same pages with translucent panes over a soft background.": "يعرض نمط الزجاج الصفحات نفسها بألواح شبه شفافة فوق خلفية ناعمة." }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/bn.json b/src/shareos-core/www/i18n/bn.json index 9ba88bf7..11bebff8 100644 --- a/src/shareos-core/www/i18n/bn.json +++ b/src/shareos-core/www/i18n/bn.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "মডেল যোগ করার জন্য হার্ডওয়্যারের তথ্য", "Copying is not allowed here – use Download.": "এখানে কপি করার অনুমতি নেই – ডাউনলোড ব্যবহার করুন।", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "এই বক্সের মডেল, ফ্ল্যাশ পার্টিশন, CPU, মেমরি, LED, সেন্সর, বোতাম, GPIO, সিরিয়াল পোর্ট, নেটওয়ার্ক, U-Boot এনভায়রনমেন্ট ও কার্নেল লগ – নতুন মডেলের যা দরকার সব। কেবল পড়া হয়, কিছু বদলায় না। ফাইলটি মডেলের issue-তে সংযুক্ত করুন।", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "MAC ঠিকানা ও সিরিয়াল নম্বর দেখান (নইলে লুকানো – সর্বজনীন issue-তে দেবেন না)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "MAC ঠিকানা ও সিরিয়াল নম্বর দেখান (নইলে লুকানো – সর্বজনীন issue-তে দেবেন না)", + "STYLE": "স্টাইল", + "Glass": "গ্লাস", + "Glass shows the same pages with translucent panes over a soft background.": "গ্লাস একই পৃষ্ঠাগুলো নরম পটভূমির উপর স্বচ্ছাভ প্যানেলসহ দেখায়।" }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/de.json b/src/shareos-core/www/i18n/de.json index 7029cbf1..897fca4a 100644 --- a/src/shareos-core/www/i18n/de.json +++ b/src/shareos-core/www/i18n/de.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "Hardware-Angaben zum Hinzufügen eines Modells", "Copying is not allowed here – use Download.": "Kopieren ist hier nicht erlaubt – nimm Herunterladen.", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "Modell, Flash-Partitionen, CPU, Speicher, LEDs, Sensoren, Tasten, GPIOs, serielle Schnittstellen, Netzwerk, die U-Boot-Umgebung und das Kernel-Protokoll dieser Box – alles, was ein neues Modell braucht. Es wird nur gelesen, nichts geändert. Hänge die Datei an das Issue des Modells.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "MAC-Adressen und Seriennummern zeigen (sonst maskiert – nicht in öffentliche Issues)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "MAC-Adressen und Seriennummern zeigen (sonst maskiert – nicht in öffentliche Issues)", + "STYLE": "STIL", + "Glass": "Glas", + "Glass shows the same pages with translucent panes over a soft background.": "„Glas“ zeigt dieselben Seiten mit durchscheinenden Flächen über einem weichen Hintergrund." }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/es.json b/src/shareos-core/www/i18n/es.json index fa99e5bd..f1fc596c 100644 --- a/src/shareos-core/www/i18n/es.json +++ b/src/shareos-core/www/i18n/es.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "datos de hardware para añadir un modelo", "Copying is not allowed here – use Download.": "Aquí no se permite copiar – usa Descargar.", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "Modelo, particiones flash, CPU, memoria, LED, sensores, botones, GPIO, puertos serie, red, el entorno U-Boot y el registro del kernel de este equipo – todo lo que necesita un modelo nuevo. Solo se lee, no se cambia nada. Adjunta el archivo a la incidencia del modelo.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Mostrar direcciones MAC y números de serie (si no, ocultos – no los pongas en incidencias públicas)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Mostrar direcciones MAC y números de serie (si no, ocultos – no los pongas en incidencias públicas)", + "STYLE": "ESTILO", + "Glass": "Cristal", + "Glass shows the same pages with translucent panes over a soft background.": "Cristal muestra las mismas páginas con paneles translúcidos sobre un fondo suave." }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/fr.json b/src/shareos-core/www/i18n/fr.json index 603b0c97..adebbdc9 100644 --- a/src/shareos-core/www/i18n/fr.json +++ b/src/shareos-core/www/i18n/fr.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "données matérielles pour ajouter un modèle", "Copying is not allowed here – use Download.": "La copie n’est pas autorisée ici – utilisez Télécharger.", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "Modèle, partitions flash, CPU, mémoire, LED, capteurs, boutons, GPIO, ports série, réseau, environnement U-Boot et journal du noyau de ce boîtier – tout ce dont un nouveau modèle a besoin. Lecture seule, rien n’est modifié. Joignez le fichier au ticket du modèle.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Afficher les adresses MAC et numéros de série (sinon masqués – à garder hors des tickets publics)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Afficher les adresses MAC et numéros de série (sinon masqués – à garder hors des tickets publics)", + "STYLE": "STYLE", + "Glass": "Verre", + "Glass shows the same pages with translucent panes over a soft background.": "Verre affiche les mêmes pages avec des panneaux translucides sur un fond doux." }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/hi.json b/src/shareos-core/www/i18n/hi.json index b71e5543..80a15cc6 100644 --- a/src/shareos-core/www/i18n/hi.json +++ b/src/shareos-core/www/i18n/hi.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "मॉडल जोड़ने के लिए हार्डवेयर जानकारी", "Copying is not allowed here – use Download.": "यहाँ कॉपी करने की अनुमति नहीं है – डाउनलोड का उपयोग करें।", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "इस बॉक्स का मॉडल, फ़्लैश पार्टीशन, CPU, मेमोरी, LED, सेंसर, बटन, GPIO, सीरियल पोर्ट, नेटवर्क, U-Boot एनवायरनमेंट और कर्नेल लॉग – नए मॉडल के लिए आवश्यक सब कुछ। केवल पढ़ा जाता है, कुछ नहीं बदलता। फ़ाइल को मॉडल के issue में संलग्न करें।", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "MAC पते और सीरियल नंबर दिखाएँ (अन्यथा छिपे हुए – इन्हें सार्वजनिक issue में न डालें)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "MAC पते और सीरियल नंबर दिखाएँ (अन्यथा छिपे हुए – इन्हें सार्वजनिक issue में न डालें)", + "STYLE": "शैली", + "Glass": "ग्लास", + "Glass shows the same pages with translucent panes over a soft background.": "ग्लास वही पेज नरम पृष्ठभूमि पर पारभासी पैनलों के साथ दिखाता है।" }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/pt.json b/src/shareos-core/www/i18n/pt.json index 0e180924..2bd34e3b 100644 --- a/src/shareos-core/www/i18n/pt.json +++ b/src/shareos-core/www/i18n/pt.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "dados de hardware para adicionar um modelo", "Copying is not allowed here – use Download.": "Copiar não é permitido aqui – use Transferir.", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "Modelo, partições flash, CPU, memória, LEDs, sensores, botões, GPIOs, portas série, rede, o ambiente U-Boot e o registo do kernel desta caixa – tudo o que um novo modelo precisa. Só é lido, nada é alterado. Anexe o ficheiro ao issue do modelo.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Mostrar endereços MAC e números de série (caso contrário ocultos – não os coloque em issues públicos)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Mostrar endereços MAC e números de série (caso contrário ocultos – não os coloque em issues públicos)", + "STYLE": "ESTILO", + "Glass": "Vidro", + "Glass shows the same pages with translucent panes over a soft background.": "Vidro mostra as mesmas páginas com painéis translúcidos sobre um fundo suave." }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/ru.json b/src/shareos-core/www/i18n/ru.json index ad473fee..f21b7155 100644 --- a/src/shareos-core/www/i18n/ru.json +++ b/src/shareos-core/www/i18n/ru.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "данные оборудования для добавления модели", "Copying is not allowed here – use Download.": "Копирование здесь запрещено – используйте «Скачать».", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "Модель, разделы флеш-памяти, процессор, память, светодиоды, датчики, кнопки, GPIO, последовательные порты, сеть, окружение U-Boot и журнал ядра этого устройства – всё, что нужно для новой модели. Только чтение, ничего не меняется. Приложите файл к issue модели.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Показать MAC-адреса и серийные номера (иначе скрыты – не публикуйте их в открытых issue)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "Показать MAC-адреса и серийные номера (иначе скрыты – не публикуйте их в открытых issue)", + "STYLE": "СТИЛЬ", + "Glass": "Стекло", + "Glass shows the same pages with translucent panes over a soft background.": "«Стекло» показывает те же страницы с полупрозрачными панелями на мягком фоне." }, "patterns": [ [ diff --git a/src/shareos-core/www/i18n/zh.json b/src/shareos-core/www/i18n/zh.json index 1113457a..cfcdd66c 100644 --- a/src/shareos-core/www/i18n/zh.json +++ b/src/shareos-core/www/i18n/zh.json @@ -1792,7 +1792,10 @@ "hardware facts for adding a model": "用于添加型号的硬件信息", "Copying is not allowed here – use Download.": "此处不允许复制 – 请使用下载。", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.": "此设备的型号、闪存分区、CPU、内存、LED、传感器、按键、GPIO、串口、网络、U-Boot 环境和内核日志 – 新型号所需的一切。只读取,不做任何更改。请将文件附加到该型号的 issue。", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "显示 MAC 地址和序列号(否则已遮盖 – 请勿放入公开 issue)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)": "显示 MAC 地址和序列号(否则已遮盖 – 请勿放入公开 issue)", + "STYLE": "风格", + "Glass": "玻璃", + "Glass shows the same pages with translucent panes over a soft background.": "“玻璃”以半透明面板和柔和背景显示相同的页面。" }, "patterns": [ [ diff --git a/src/shareos-core/www/shareos.css b/src/shareos-core/www/shareos.css index 91236927..bcc90598 100644 --- a/src/shareos-core/www/shareos.css +++ b/src/shareos-core/www/shareos.css @@ -376,3 +376,57 @@ select.app-display{min-height:28px;padding:0 8px} .vbtn svg{width:22px;height:22px} .vbtn:hover{border-color:var(--dim);color:var(--text)} .vbtn.on{border-color:var(--accent);color:var(--accent);background:var(--ph);box-shadow:var(--glow)} + +/* --- style "Glass" (Appearance -> Style; class .glass on #app) ------------------------ + Same elements, sizes and radii as the classic style – only the material changes: + translucent, blurred panes over a soft aurora ground. Both themes are mid-tone + (slate dark, misty light). In this style --bg is the sunken "well" inside a pane + (inputs, log boxes, icon wells); the page ground is --ground and text on an accent + fill is --ink. Design system: "ShareOS Frosted Glass". */ +.sos.glass{--ground:#161e2d;--bg:rgba(12,18,28,.38);--panel:rgba(42,56,80,.55);--ph:rgba(52,68,96,.62);--pop:rgba(46,62,88,.8);--bar:rgba(30,42,62,.58); + --line:rgba(255,255,255,.12);--hi:rgba(255,255,255,.14);--text:#eef3fa;--muted:#b0bfd1;--ink:#08131f; + --ok:#4ee391;--amber:#ecc967;--red:#ff8f8f;--errt:#ffb3b3;--blur:blur(16px) saturate(160%);--blur2:blur(28px) saturate(160%); + --sh:inset 0 1px 0 var(--hi),0 10px 30px rgba(5,9,16,.3);--glow:0 0 0 1px rgba(var(--rgb),.45),0 0 18px rgba(var(--rgb),.32); + background:radial-gradient(ellipse 55% 60% at 85% 10%,rgba(58,212,245,.2),transparent 70%),radial-gradient(ellipse 50% 55% at 8% 95%,rgba(138,108,255,.2),transparent 70%),radial-gradient(ellipse 70% 50% at 45% 55%,rgba(var(--rgb),.14),transparent 75%),var(--ground); + background-attachment:fixed} +/* accents, raised so small accent text keeps 4.5:1 on the panes */ +.sos.glass.acc-green{--accent:#3dff8a;--soft:#2bcf6c;--dim:#2f8f55} +.sos.glass.acc-red{--accent:#ff8a95;--soft:#ee949e;--dim:#a8414c} +.sos.glass.acc-blue{--accent:#5cb3ff;--soft:#77b4e7;--dim:#3a73ad} +.sos.glass.acc-white{--accent:#f2f4f5;--soft:#c9cdd1;--dim:#7a8087} +.sos.glass.acc-grey{--accent:#a4aeb9;--soft:#a7adb6;--dim:#69717b} +.sos.glass.acc-violet{--accent:#b89fff;--soft:#b7a1f9;--dim:#6a4fb0} +.sos.glass.acc-orange{--accent:#ffa043;--soft:#e29f5d;--dim:#a86a2c} +.sos.glass.acc-teal{--accent:#38d9cf;--soft:#2ec1b9;--dim:#2a9e98} +.sos.glass.light{--ground:#cdd7e4;--bg:rgba(196,208,223,.55);--panel:rgba(241,245,251,.58);--ph:rgba(248,250,253,.78);--pop:rgba(244,247,252,.82);--bar:rgba(236,242,249,.55); + --line:rgba(15,26,40,.12);--hi:rgba(255,255,255,.85);--text:#0f1a28;--muted:#3d4b5d;--ink:#fff; + --ok:#0b6630;--amber:#654800;--red:#a32020;--errt:#a32020;--sh:inset 0 1px 0 var(--hi),0 10px 30px rgba(30,45,66,.1); + --glow:0 0 0 1px rgba(var(--rgb),.4),0 4px 16px rgba(var(--rgb),.2)} +.sos.glass.light.acc-green{--accent:#0a7336;--soft:#117338;--dim:#7fbf99} +.sos.glass.light.acc-red{--accent:#be2939;--soft:#b02434;--dim:#d98e96} +.sos.glass.light.acc-blue{--accent:#1c63bb;--soft:#1a5bab;--dim:#8fb2e0} +.sos.glass.light.acc-white{--accent:#1d2125;--soft:#3a4046;--dim:#9aa0a6} +.sos.glass.light.acc-grey{--accent:#56616e;--soft:#3d4651;--dim:#a9b0b8} +.sos.glass.light.acc-violet{--accent:#6a46d4;--soft:#501ea7;--dim:#b29ae3} +.sos.glass.light.acc-orange{--accent:#9b4e00;--soft:#955211;--dim:#d9b089} +.sos.glass.light.acc-teal{--accent:#096e69;--soft:#0b6e69;--dim:#8fd3cf} +.sos.glass .scan{display:none} +.sos.glass :is(.card,.tile,.panel,.tw,.chip,.tab,.subtabs,.search,.who,.ib,.btn,.favapp,.savebar,.banner,.step){-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur)} +.sos.glass :is(.card,.panel,.tw){box-shadow:var(--sh)} +.sos.glass :is(.tile,.chip,.btn,.tab){box-shadow:inset 0 1px 0 var(--hi)} +.sos.glass :is(.panel,.tile,.card) :is(.tile,.card,.panel,.tw){-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none} +.sos.glass .card:hover,.sos.glass .card.hi{box-shadow:var(--sh),var(--glow)} +.sos.glass .btn.ghost{-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none} +.sos.glass :is(.chippop,.toast div){background:var(--pop);-webkit-backdrop-filter:var(--blur2);backdrop-filter:var(--blur2)} +.sos.glass dialog.dlg{background:var(--pop);-webkit-backdrop-filter:var(--blur2);backdrop-filter:var(--blur2);box-shadow:var(--sh),var(--glow)} +.sos.glass dialog.dlg::backdrop{background:rgba(10,15,24,.45);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)} +.sos.glass.light dialog.dlg::backdrop{background:rgba(40,54,74,.3)} +.sos.glass .cover{background:color-mix(in srgb,var(--ground) 70%,transparent);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)} +.sos.glass .t th{background:var(--bar)} +.sos.glass .dot{border-color:var(--ground)} +.sos.glass .bar{background:var(--bg)} +/* text on an accent fill: --bg is a well in this style */ +.sos.glass a.tab.on,.sos.glass .btn.primary,.sos.glass a.btn.primary,.sos.glass a.btn.primary:hover,.sos.glass .tag.new{color:var(--ink)} +.sos.glass .tab.on .nb{border-color:var(--ink);color:var(--ink)} +@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.sos.glass{--panel:var(--pop)}} +@media (prefers-reduced-transparency:reduce){.sos.glass{--panel:var(--pop);--blur:none;--blur2:none}} diff --git a/tests/mock-ubus.py b/tests/mock-ubus.py index cbd43db8..302cf7e1 100644 --- a/tests/mock-ubus.py +++ b/tests/mock-ubus.py @@ -33,7 +33,7 @@ def mock_folder(fid): return en[fid] -STATE = {'setup_done': False, 'fan': {'preset': 'balanced', 'off_temp': 0, 'full_temp': 50, 'half_temp': 45}, 'led': {'status': 'heartbeat', 'power': 'on', 'disks': 'off', 'colours': {'status': 'blue', 'usb': 'orange', 'disks': 'red'}}, 'logo': True, 'lang': 'en', 'channel': 'beta', 'job': None, 'https': True, 'redirect': False, 'theme': 'dark', 'accent': 'blue', 'autostart_off': ['crond'], +STATE = {'setup_done': False, 'fan': {'preset': 'balanced', 'off_temp': 0, 'full_temp': 50, 'half_temp': 45}, 'led': {'status': 'heartbeat', 'power': 'on', 'disks': 'off', 'colours': {'status': 'blue', 'usb': 'orange', 'disks': 'red'}}, 'logo': True, 'lang': 'en', 'channel': 'beta', 'job': None, 'https': True, 'redirect': False, 'theme': 'dark', 'accent': 'blue', 'style': 'classic', 'autostart_off': ['crond'], 'users': {'jan': {'role': 'admin', 'fullname': 'Jan', 'groups': ['family'], 'home': 'data', 'quota': 0, 'web': True, 'pw': 'shareos'}, 'anna': {'role': 'user', 'fullname': 'Anna', 'groups': ['family'], 'home': 'data', 'quota': 200000, 'web': True, 'cloud': True, 'files': True, 'pw': 'anna123'}, 'tv': {'role': 'share', 'fullname': 'TV', 'groups': ['media'], 'home': '', 'quota': 0, 'web': True, 'pw': 'tv1234'}}, @@ -179,7 +179,7 @@ def me(user): 'usage': [{'volume': 'data', 'used': 61_500_000_000, 'limit': x['quota'] * 1000000}], 'shares': mine, 'host': 'skynet-nas', 'volumes': [{'name': 'data', 'size': 3_936_000_000_000, 'used': 1_412_000_000_000, 'avail': 2_524_000_000_000}], 'cloud': x.get('cloud', False), 'paperless': bool(x['home']), 'files': x.get('files', False) and x['role'] == 'user', - 'ui': x.get('ui', {'theme': None, 'accent': None}), + 'ui': x.get('ui', {'theme': None, 'accent': None, 'style': None}), 'apps': [{'id': a['id'], 'name': a['name'], 'entry': a['entry'], 'icon': a['icon'], 'description': a['description']} for a in APPS['installed'].values() if a.get('type') != 'system' and ('*' in a['users'] or user in a['users'])], 'apps_server': {'port': 8081, 'https_port': 8444, 'https': True}, @@ -513,8 +513,8 @@ def call(obj, method, args): f[k] = bool(args[k]) return f if method == 'ui_set': - ui = STATE['users'][u].setdefault('ui', {'theme': None, 'accent': None}) - for k in ('theme', 'accent'): + ui = STATE['users'][u].setdefault('ui', {'theme': None, 'accent': None, 'style': None}) + for k in ('theme', 'accent', 'style'): if k in args: ui[k] = args[k] or None return ui @@ -796,14 +796,14 @@ def call(obj, method, args): STATE['lang'] = args['lang'] if 'logo' in args: STATE['logo'] = bool(args['logo']) - for k in ('theme', 'accent'): + for k in ('theme', 'accent', 'style'): if args.get(k): STATE[k] = args[k] for k, v in (args.get('areas') or {}).items(): if k == 'apps': STATE.setdefault('areas', {'apps': True})[k] = bool(v) # modules (Paperless): on while the system app is installed - return {'lang': STATE['lang'], 'logo': STATE['logo'], 'theme': STATE['theme'], 'accent': STATE['accent'], + return {'lang': STATE['lang'], 'logo': STATE['logo'], 'theme': STATE['theme'], 'accent': STATE['accent'], 'style': STATE['style'], 'areas': {**STATE.get('areas', {'apps': True}), **{m: m in APPS['installed'] for m in ('paperless', 'cloud', 'dnsfilter', 'desktop')}}, 'default_password': True} if obj == 'shareos.net': if method == 'set': diff --git a/tests/run-stack-qemu.sh b/tests/run-stack-qemu.sh index 4d30bb61..31aabe29 100755 --- a/tests/run-stack-qemu.sh +++ b/tests/run-stack-qemu.sh @@ -134,6 +134,9 @@ if [ "$CHECK" = "--check" ]; then t "look is system-wide (theme, accent)" "$(rpc $SID shareos.ui set '{"theme":"system","accent":"green"}')" "d['result'][1]['theme']=='system' and d['result'][1]['accent']=='green'" t "look readable before login" "$(rpc 00000000000000000000000000000000 shareos.ui get)" "d['result'][1]['accent']=='green'" t "invalid accent rejected" "$(rpc $SID shareos.ui set '{"accent":"pink"}')" "'invalid' in d['result'][1]['error']" + t "style is system-wide (glass)" "$(rpc $SID shareos.ui set '{"style":"glass"}')" "d['result'][1]['style']=='glass'" + t "invalid style rejected" "$(rpc $SID shareos.ui set '{"style":"neon"}')" "'invalid' in d['result'][1]['error']" + t "style back to classic" "$(rpc $SID shareos.ui set '{"style":"classic"}')" "d['result'][1]['style']=='classic'" t "services report autostart" "$(rpc $SID shareos.service list)" "all('autostart' in x for x in d['result'][1]['services'])" t "autostart can be switched off" "$(rpc $SID shareos.service autostart '{"name":"crond","enabled":false}')" "d['result'][1]['autostart']==False" t "autostart stored in UCI" "$(chroot "$R" uci -q get shareos.autostart.disabled | python3 -c 'import json,sys; print(json.dumps({"v":sys.stdin.read().split()}))')" "d['v']==['crond']" diff --git a/tests/sdk-storage.js b/tests/sdk-storage.js index 2f8d6e9c..c7e440df 100644 --- a/tests/sdk-storage.js +++ b/tests/sdk-storage.js @@ -76,11 +76,12 @@ function check(name, ok) { console.log((ok ? 'PASS ' : 'FAIL ') + name); ok ? // ShareOS.openApp: a window (popup) named like the ShareOS one, with the account fs.mkdirSync(path.join(dir, 'other'), { recursive: true }); fs.writeFileSync(path.join(dir, 'other/index.html'), 'other'); - const opener = await open('?user=jan&theme=light&accent=green'); + const opener = await open('?user=jan&theme=light&accent=green&style=glass'); + check('the style is applied to (data-style)', await opener.evaluate(() => document.documentElement.dataset.style + ':' + ShareOS.theme.style) === 'glass:glass'); const [win] = await Promise.all([ctx.waitForEvent('page'), opener.evaluate(() => { window.__w = ShareOS.openApp('other', { width: 700, height: 500 }); })]); await win.waitForLoadState(); const u = new URL(win.url()); - check('openApp opens the app with account and look', u.pathname === '/other/index.html' && u.searchParams.get('user') === 'jan' && u.searchParams.get('theme') === 'light' && u.searchParams.get('accent') === 'green'); + check('openApp opens the app with account and look', u.pathname === '/other/index.html' && u.searchParams.get('user') === 'jan' && u.searchParams.get('theme') === 'light' && u.searchParams.get('accent') === 'green' && u.searchParams.get('style') === 'glass'); check('openApp: a window of its own, named sosapp-', await win.evaluate(() => window.name) === 'sosapp-other' && await opener.evaluate(() => !!window.__w)); check('openApp: the other app sees the same account', await win.evaluate(() => ShareOS.user) === 'jan'); check('openApp refuses invalid ids', await opener.evaluate(() => ShareOS.openApp('../x')) === null); diff --git a/tests/test-users.sh b/tests/test-users.sh index 10c1e742..e9ca4517 100755 --- a/tests/test-users.sh +++ b/tests/test-users.sh @@ -212,7 +212,7 @@ SL=$(echo "$L2" | python3 -c 'import json,sys; print(json.load(sys.stdin)["ubus_ rpc shareos.me bind "{\"username\":\"lisa\",\"password\":\"lisa1234\",\"ubus_rpc_session\":\"$SL\"}" >/dev/null fs() { rpc shareos.files "$1" "{\"ubus_rpc_session\":\"$SL\"${2:+,$2}}"; } check "files: users get the file browser in their ACL" "echo '$L2' | js \"'shareos.files' in d['acls']['ubus'] and 'ticket' in d['acls']['ubus']['shareos.files']\"" -check "files: allowed user sees the flag" "rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['files'] and d['ui']=={'theme':None,'accent':None}\"" +check "files: allowed user sees the flag" "rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['files'] and d['ui']=={'theme':None,'accent':None,'style':None}\"" check "files: the box has what a background job measures with (nice, du -sk --)" "run 'nice du -sk -- /etc | awk \"{ s += \\\$1 } END { print s + 0 }\"' | grep -Eq '^[1-9][0-9]*\$'" check "files: users may stop their background jobs (an unknown one is refused)" "fs job_cancel '\"id\":\"0123456789abcdef\"' | grep -q 'unknown job'" check "files: user without the right is refused" "rpc shareos.files roots '{\"ubus_rpc_session\":\"$SID\"}' | grep -q 'not allowed'" @@ -309,10 +309,12 @@ rpc shareos.shares set '{"name":"fotos","volume":"daten","path":"Fotos","comment aclwait /mnt/daten/Fotos/Neu 'group:familie:r-x'; sleep 1 check "Linux: a right taken away is gone everywhere" "! run 'getfacl -p -R /mnt/daten/Fotos' | grep -q 'user:lisa' && ! run 'su -s /bin/sh lisa -c \"ls /mnt/daten/Fotos\"' >/dev/null" check "files: right can be withdrawn" "run 'shareos-users set lisa --files=0' >/dev/null; fs roots '' | grep -q 'not allowed'" -check "look: own theme and accent" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"theme\":\"light\",\"accent\":\"green\"}' | js \"d=={'theme':'light','accent':'green'}\" && rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['ui']['theme']=='light'\"" +check "look: own theme and accent" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"theme\":\"light\",\"accent\":\"green\"}' | js \"d=={'theme':'light','accent':'green','style':None}\" && rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['ui']['theme']=='light'\"" check "look: invalid accent rejected" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"accent\":\"pink\"}' | grep -q 'invalid accent'" check "look: the new accents (grey, violet, orange, teal)" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"accent\":\"grey\"}' | js \"d['accent']=='grey'\" && rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"accent\":\"violet\"}' | js \"d['accent']=='violet'\" && rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"accent\":\"orange\"}' | js \"d['accent']=='orange'\" && rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"accent\":\"teal\"}' | js \"d['accent']=='teal'\"" -check "look: back to the look for everyone" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"theme\":\"\",\"accent\":\"\"}' | js \"d=={'theme':None,'accent':None}\"" +check "look: own style (glass)" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"style\":\"glass\"}' | js \"d['style']=='glass'\" && rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['ui']['style']=='glass'\"" +check "look: invalid style rejected" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"style\":\"neon\"}' | grep -q 'invalid style'" +check "look: back to the look for everyone" "rpc shareos.me ui_set '{\"ubus_rpc_session\":\"$SL\",\"theme\":\"\",\"accent\":\"\",\"style\":\"\"}' | js \"d=={'theme':None,'accent':None,'style':None}\"" check "fav: none at first, bar on" "rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['fav']=={'apps':[],'bar':True,'text':True}\"" check "fav: own favourites (doubles dropped) and bar off" "rpc shareos.me fav_set '{\"ubus_rpc_session\":\"$SL\",\"apps\":[\"notes\",\"webpad\",\"notes\"],\"bar\":false,\"text\":false}' | js \"d=={'apps':['notes','webpad'],'bar':False,'text':False}\" && rpc shareos.me get '{\"ubus_rpc_session\":\"$SL\"}' | js \"d['fav']['apps']==['notes','webpad'] and not d['fav']['bar']\"" check "fav: a missing key stays" "rpc shareos.me fav_set '{\"ubus_rpc_session\":\"$SL\",\"bar\":true}' | js \"d=={'apps':['notes','webpad'],'bar':True,'text':False}\"" diff --git a/tools/i18n/ar.tsv b/tools/i18n/ar.tsv index 1d426c9f..8e4634b5 100644 --- a/tools/i18n/ar.tsv +++ b/tools/i18n/ar.tsv @@ -2253,3 +2253,6 @@ E1806 بيانات العتاد لإضافة طراز E1807 النسخ غير مسموح هنا – استخدم التنزيل. E1808 الطراز وأقسام الذاكرة الوميضية والمعالج والذاكرة والمصابيح والمستشعرات والأزرار ومنافذ GPIO والمنافذ التسلسلية والشبكة وبيئة U-Boot وسجل النواة لهذا الجهاز – كل ما يحتاجه طراز جديد. قراءة فقط، لا يتغير شيء. أرفق الملف بتذكرة الطراز. E1809 إظهار عناوين MAC والأرقام التسلسلية (وإلا فهي مخفية – لا تضعها في التذاكر العامة) +E1810 النمط +E1811 زجاج +E1812 يعرض نمط الزجاج الصفحات نفسها بألواح شبه شفافة فوق خلفية ناعمة. diff --git a/tools/i18n/bn.tsv b/tools/i18n/bn.tsv index 51dc7cde..02ed3500 100644 --- a/tools/i18n/bn.tsv +++ b/tools/i18n/bn.tsv @@ -2253,3 +2253,6 @@ E1806 মডেল যোগ করার জন্য হার্ডওয় E1807 এখানে কপি করার অনুমতি নেই – ডাউনলোড ব্যবহার করুন। E1808 এই বক্সের মডেল, ফ্ল্যাশ পার্টিশন, CPU, মেমরি, LED, সেন্সর, বোতাম, GPIO, সিরিয়াল পোর্ট, নেটওয়ার্ক, U-Boot এনভায়রনমেন্ট ও কার্নেল লগ – নতুন মডেলের যা দরকার সব। কেবল পড়া হয়, কিছু বদলায় না। ফাইলটি মডেলের issue-তে সংযুক্ত করুন। E1809 MAC ঠিকানা ও সিরিয়াল নম্বর দেখান (নইলে লুকানো – সর্বজনীন issue-তে দেবেন না) +E1810 স্টাইল +E1811 গ্লাস +E1812 গ্লাস একই পৃষ্ঠাগুলো নরম পটভূমির উপর স্বচ্ছাভ প্যানেলসহ দেখায়। diff --git a/tools/i18n/catalog.json b/tools/i18n/catalog.json index 5c2981d3..d6a38809 100644 --- a/tools/i18n/catalog.json +++ b/tools/i18n/catalog.json @@ -1810,7 +1810,10 @@ "hardware facts for adding a model", "Copying is not allowed here – use Download.", "Model, flash partitions, CPU, memory, LEDs, sensors, buttons, GPIOs, serial ports, network, the U-Boot environment and the kernel log of this box – everything a new model needs. Only read, nothing is changed. Attach the file to the issue of the model.", - "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)" + "Show MAC addresses and serial numbers (otherwise masked – keep them out of public issues)", + "STYLE", + "Glass", + "Glass shows the same pages with translucent panes over a soft background." ], "patterns": [ [ diff --git a/tools/i18n/de.tsv b/tools/i18n/de.tsv index b60ac1b2..cf8d0605 100644 --- a/tools/i18n/de.tsv +++ b/tools/i18n/de.tsv @@ -2237,3 +2237,6 @@ E1806 Hardware-Angaben zum Hinzufügen eines Modells E1807 Kopieren ist hier nicht erlaubt – nimm Herunterladen. E1808 Modell, Flash-Partitionen, CPU, Speicher, LEDs, Sensoren, Tasten, GPIOs, serielle Schnittstellen, Netzwerk, die U-Boot-Umgebung und das Kernel-Protokoll dieser Box – alles, was ein neues Modell braucht. Es wird nur gelesen, nichts geändert. Hänge die Datei an das Issue des Modells. E1809 MAC-Adressen und Seriennummern zeigen (sonst maskiert – nicht in öffentliche Issues) +E1810 STIL +E1811 Glas +E1812 „Glas“ zeigt dieselben Seiten mit durchscheinenden Flächen über einem weichen Hintergrund. diff --git a/tools/i18n/es.tsv b/tools/i18n/es.tsv index c8fcae03..a20da65a 100644 --- a/tools/i18n/es.tsv +++ b/tools/i18n/es.tsv @@ -2253,3 +2253,6 @@ E1806 datos de hardware para añadir un modelo E1807 Aquí no se permite copiar – usa Descargar. E1808 Modelo, particiones flash, CPU, memoria, LED, sensores, botones, GPIO, puertos serie, red, el entorno U-Boot y el registro del kernel de este equipo – todo lo que necesita un modelo nuevo. Solo se lee, no se cambia nada. Adjunta el archivo a la incidencia del modelo. E1809 Mostrar direcciones MAC y números de serie (si no, ocultos – no los pongas en incidencias públicas) +E1810 ESTILO +E1811 Cristal +E1812 Cristal muestra las mismas páginas con paneles translúcidos sobre un fondo suave. diff --git a/tools/i18n/fr.tsv b/tools/i18n/fr.tsv index 71a10426..cb018fa1 100644 --- a/tools/i18n/fr.tsv +++ b/tools/i18n/fr.tsv @@ -2253,3 +2253,6 @@ E1806 données matérielles pour ajouter un modèle E1807 La copie n’est pas autorisée ici – utilisez Télécharger. E1808 Modèle, partitions flash, CPU, mémoire, LED, capteurs, boutons, GPIO, ports série, réseau, environnement U-Boot et journal du noyau de ce boîtier – tout ce dont un nouveau modèle a besoin. Lecture seule, rien n’est modifié. Joignez le fichier au ticket du modèle. E1809 Afficher les adresses MAC et numéros de série (sinon masqués – à garder hors des tickets publics) +E1810 STYLE +E1811 Verre +E1812 Verre affiche les mêmes pages avec des panneaux translucides sur un fond doux. diff --git a/tools/i18n/hi.tsv b/tools/i18n/hi.tsv index 834b644e..4fc5429f 100644 --- a/tools/i18n/hi.tsv +++ b/tools/i18n/hi.tsv @@ -2253,3 +2253,6 @@ E1806 मॉडल जोड़ने के लिए हार्डवेय E1807 यहाँ कॉपी करने की अनुमति नहीं है – डाउनलोड का उपयोग करें। E1808 इस बॉक्स का मॉडल, फ़्लैश पार्टीशन, CPU, मेमोरी, LED, सेंसर, बटन, GPIO, सीरियल पोर्ट, नेटवर्क, U-Boot एनवायरनमेंट और कर्नेल लॉग – नए मॉडल के लिए आवश्यक सब कुछ। केवल पढ़ा जाता है, कुछ नहीं बदलता। फ़ाइल को मॉडल के issue में संलग्न करें। E1809 MAC पते और सीरियल नंबर दिखाएँ (अन्यथा छिपे हुए – इन्हें सार्वजनिक issue में न डालें) +E1810 शैली +E1811 ग्लास +E1812 ग्लास वही पेज नरम पृष्ठभूमि पर पारभासी पैनलों के साथ दिखाता है। diff --git a/tools/i18n/pt.tsv b/tools/i18n/pt.tsv index 27968415..0cd648a7 100644 --- a/tools/i18n/pt.tsv +++ b/tools/i18n/pt.tsv @@ -2253,3 +2253,6 @@ E1806 dados de hardware para adicionar um modelo E1807 Copiar não é permitido aqui – use Transferir. E1808 Modelo, partições flash, CPU, memória, LEDs, sensores, botões, GPIOs, portas série, rede, o ambiente U-Boot e o registo do kernel desta caixa – tudo o que um novo modelo precisa. Só é lido, nada é alterado. Anexe o ficheiro ao issue do modelo. E1809 Mostrar endereços MAC e números de série (caso contrário ocultos – não os coloque em issues públicos) +E1810 ESTILO +E1811 Vidro +E1812 Vidro mostra as mesmas páginas com painéis translúcidos sobre um fundo suave. diff --git a/tools/i18n/ru.tsv b/tools/i18n/ru.tsv index 94ec13c8..1e67fef0 100644 --- a/tools/i18n/ru.tsv +++ b/tools/i18n/ru.tsv @@ -2253,3 +2253,6 @@ E1806 данные оборудования для добавления моде E1807 Копирование здесь запрещено – используйте «Скачать». E1808 Модель, разделы флеш-памяти, процессор, память, светодиоды, датчики, кнопки, GPIO, последовательные порты, сеть, окружение U-Boot и журнал ядра этого устройства – всё, что нужно для новой модели. Только чтение, ничего не меняется. Приложите файл к issue модели. E1809 Показать MAC-адреса и серийные номера (иначе скрыты – не публикуйте их в открытых issue) +E1810 СТИЛЬ +E1811 Стекло +E1812 «Стекло» показывает те же страницы с полупрозрачными панелями на мягком фоне. diff --git a/tools/i18n/zh.tsv b/tools/i18n/zh.tsv index 89661881..f330e16f 100644 --- a/tools/i18n/zh.tsv +++ b/tools/i18n/zh.tsv @@ -2253,3 +2253,6 @@ E1806 用于添加型号的硬件信息 E1807 此处不允许复制 – 请使用下载。 E1808 此设备的型号、闪存分区、CPU、内存、LED、传感器、按键、GPIO、串口、网络、U-Boot 环境和内核日志 – 新型号所需的一切。只读取,不做任何更改。请将文件附加到该型号的 issue。 E1809 显示 MAC 地址和序列号(否则已遮盖 – 请勿放入公开 issue) +E1810 风格 +E1811 玻璃 +E1812 “玻璃”以半透明面板和柔和背景显示相同的页面。