openvibers/openvibe.network Commits
The icon style follows the account: display 'icons' (auto, line or solid) (#476)
Changes
@@@ -178,7 +178,9 @@ router.get('/me/active', (req, res, next) => {// font: use the readable typeface across sites.// colors: choose colors designed to be safe for color blindness.// oled: use pure black backgrounds on OLED displays.--const DISPLAY = { motion: ['auto', 'reduced'], text: ['100', '112', '125'], seasonal: ['on', 'off'], scheme: ['manual', 'auto'], contrast: ['normal', 'more'], font: ['default', 'readable'], colors: ['default', 'cb-safe'], oled: ['off', 'on'] };++// icons: the person's icon style (openvibe-shared 4.71.0, plan L56): auto (line; solid when small or for the tab you are++// on), line or solid, on every OpenVibe site.++const DISPLAY = { motion: ['auto', 'reduced'], text: ['100', '112', '125'], seasonal: ['on', 'off'], scheme: ['manual', 'auto'], contrast: ['normal', 'more'], font: ['default', 'readable'], colors: ['default', 'cb-safe'], oled: ['off', 'on'], icons: ['auto', 'line', 'solid'] };function cleanDisplay(d) {if (!d || typeof d !== 'object') return null;const out = {};@@@ -114,6 +114,11 @@ const token = async (id) => signToken(await db.prepare('SELECT * FROM users WHERr = await call('PUT', '/api/themes/me/display', { as: 2, body: { scheme: 'auto' } });assert.strictEqual(r.body.display.scheme, 'auto', 'Auto (light or dark by the device) follows the account');assert.strictEqual((await call('PUT', '/api/themes/me/display', { as: 2, body: { scheme: 'sepia' } })).body.display.scheme, undefined, 'only manual or auto');++ // Icons (openvibe-shared 4.71.0, plan L56): auto, line or solid follows the account.++ r = await call('PUT', '/api/themes/me/display', { as: 2, body: { icons: 'solid' } });++ assert.strictEqual(r.body.display.icons, 'solid', 'a person who prefers solid icons keeps that on every site');++ assert.strictEqual((await call('GET', '/api/themes/me/active', { as: 2 })).body.display.icons, 'solid');++ assert.strictEqual((await call('PUT', '/api/themes/me/display', { as: 2, body: { icons: 'outline' } })).body.display.icons, undefined, 'only auto, line or solid');// ── The site switcher's pinned and recent sites follow the account (migration 0029) ──r = await call('GET', '/api/themes/me/sites', { as: 2 });
@@ -178,7 +178,9 @@ router.get('/me/active', (req, res, next) => {
@@ -178,7 +178,9 @@ router.get('/me/active', (req, res, next) => {
// font: use the readable typeface across sites.
// font: use the readable typeface across sites.
// colors: choose colors designed to be safe for color blindness.
// colors: choose colors designed to be safe for color blindness.
// oled: use pure black backgrounds on OLED displays.
// oled: use pure black backgrounds on OLED displays.
-const DISPLAY = { motion: ['auto', 'reduced'], text: ['100', '112', '125'], seasonal: ['on', 'off'], scheme: ['manual', 'auto'], contrast: ['normal', 'more'], font: ['default', 'readable'], colors: ['default', 'cb-safe'], oled: ['off', 'on'] };
+// icons: the person's icon style (openvibe-shared 4.71.0, plan L56): auto (line; solid when small or for the tab you are
+// on), line or solid, on every OpenVibe site.
+const DISPLAY = { motion: ['auto', 'reduced'], text: ['100', '112', '125'], seasonal: ['on', 'off'], scheme: ['manual', 'auto'], contrast: ['normal', 'more'], font: ['default', 'readable'], colors: ['default', 'cb-safe'], oled: ['off', 'on'], icons: ['auto', 'line', 'solid'] };
function cleanDisplay(d) {
function cleanDisplay(d) {
if (!d || typeof d !== 'object') return null;
if (!d || typeof d !== 'object') return null;
const out = {};
const out = {};
@@ -114,6 +114,11 @@ const token = async (id) => signToken(await db.prepare('SELECT * FROM users WHER
@@ -114,6 +114,11 @@ const token = async (id) => signToken(await db.prepare('SELECT * FROM users WHER
r = await call('PUT', '/api/themes/me/display', { as: 2, body: { scheme: 'auto' } });
r = await call('PUT', '/api/themes/me/display', { as: 2, body: { scheme: 'auto' } });
assert.strictEqual(r.body.display.scheme, 'auto', 'Auto (light or dark by the device) follows the account');
assert.strictEqual(r.body.display.scheme, 'auto', 'Auto (light or dark by the device) follows the account');
assert.strictEqual((await call('PUT', '/api/themes/me/display', { as: 2, body: { scheme: 'sepia' } })).body.display.scheme, undefined, 'only manual or auto');
assert.strictEqual((await call('PUT', '/api/themes/me/display', { as: 2, body: { scheme: 'sepia' } })).body.display.scheme, undefined, 'only manual or auto');
+ // Icons (openvibe-shared 4.71.0, plan L56): auto, line or solid follows the account.
+ r = await call('PUT', '/api/themes/me/display', { as: 2, body: { icons: 'solid' } });
+ assert.strictEqual(r.body.display.icons, 'solid', 'a person who prefers solid icons keeps that on every site');
+ assert.strictEqual((await call('GET', '/api/themes/me/active', { as: 2 })).body.display.icons, 'solid');
+ assert.strictEqual((await call('PUT', '/api/themes/me/display', { as: 2, body: { icons: 'outline' } })).body.display.icons, undefined, 'only auto, line or solid');
// ── The site switcher's pinned and recent sites follow the account (migration 0029) ──
// ── The site switcher's pinned and recent sites follow the account (migration 0029) ──
r = await call('GET', '/api/themes/me/sites', { as: 2 });
r = await call('GET', '/api/themes/me/sites', { as: 2 });