Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changes per release (newest first). The section of a version is added to its
GitHub release automatically when the release is built. Test versions are
pre-releases for test devices only.

## 0.3.0-beta.18

- **Disk change: the wizard did not start.** `shareos-migrate` was not installed into the firmware (0.3.0-beta.16 and beta.17), so *Storage → DISK CHANGE* only showed "shareos-migrate: not found" and kept loading. It is installed now; the page shows an error instead of loading forever, and the static analysis checks that every program of `shareos-core` is installed.

## 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 `<html>`, a glass variant of `/_shareos/theme.css`). UCI: `shareos.ui.style` (`classic` | `glass`).
Expand Down
1 change: 1 addition & 0 deletions package/shareos-core/shareos-core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ define SHAREOS_CORE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/www-apps/_shareos/cgi/media $(TARGET_DIR)/www-apps/_shareos/cgi/media
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-media $(TARGET_DIR)/usr/sbin/shareos-media
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-snapshot $(TARGET_DIR)/usr/sbin/shareos-snapshot
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-migrate $(TARGET_DIR)/usr/sbin/shareos-migrate
$(INSTALL) -D -m 0644 $(@D)/etc/config/snapshots $(TARGET_DIR)/etc/config/snapshots
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-transmission $(TARGET_DIR)/usr/sbin/shareos-transmission
$(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-syncthing $(TARGET_DIR)/usr/sbin/shareos-syncthing
Expand Down
8 changes: 7 additions & 1 deletion src/shareos-core/parts/web/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function migProgress(st) {

function migrateView() {
const m = S.mig || (S.mig = {}), st = m.st;
if (!st && m.err) return html`<div class="banner">${svg(I.warn)}<span>${m.err}</span></div>
<div class="acts" style="margin-top:10px"><button class="btn sm ghost" type="button" data-act="mig-reload">Read again</button></div>`;
if (!st) return html`<div class="panel"><div class="empty"><div class="spin" style="margin:0"></div><span>Loading …</span></div></div>`;
let body;
if (migBusy(st)) body = migProgress(st);
Expand Down Expand Up @@ -81,12 +83,15 @@ async function loadMigrate() {
const m = S.mig || (S.mig = {});
try {
m.st = await rpc('shareos.migrate', 'state');
m.err = null;
if (!m.vols) m.vols = (await rpc('shareos.storage', 'volumes')).volumes || [];
if (!document.activeElement?.matches('select')) renderMain();
if (S.route.tab === 'storage' && S.route.sub === 'move' && (migBusy(m.st) || m.switching)) S.migTimer = setTimeout(loadMigrate, 3000);
if (m.st.state !== 'copied') m.switching = false;
} catch (e) {
if (e.code !== 'auth') toast('Move: ' + e.message, true);
if (e.code === 'auth') return;
// without a state the page would wait forever: show why instead
if (!m.st) { m.err = e.message; renderMain(); } else toast('Move: ' + e.message, true);
}
}

Expand All @@ -99,6 +104,7 @@ function migrateAfter() {
}

Object.assign(ACTIONS, {
'mig-reload'() { S.mig.err = null; S.mig.t = 0; renderMain(); },
async 'mig-plan'() {
try { S.mig.plan = await rpc('shareos.migrate', 'plan', { from: S.mig.from, to: S.mig.to }); renderMain(); }
catch (e) { toast(e.message, true); }
Expand Down
9 changes: 9 additions & 0 deletions tests/static-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ WEB="src/shareos-core/www src/shareos-core/www-apps/_shareos/app.js"
# shellcheck disable=SC2086
node_modules/.bin/eslint --max-warnings 0 $WEB || fail=1

echo "== Installed programs"
# every program of shareos-core is listed in its package (the install lines are
# explicit – a forgotten one passes the host tests and is missing on the box)
for f in src/shareos-core/usr/sbin/* src/shareos-core/usr/bin/*; do
[ -f "$f" ] || continue
grep -q "(@D)/${f#src/shareos-core/} " package/shareos-core/shareos-core.mk ||
{ echo "$f is not installed by package/shareos-core/shareos-core.mk"; fail=1; }
done

echo "== Dead code"
python3 tests/check-dead-code.py || fail=1

Expand Down
Loading