openvibers/openvibe.bot Commits
Bot: readable accent fills, and /favicon.ico is the app icon (#58)
Changes
@@@ -32,7 +32,7 @@.docs-main .field-label { font-size: 13px; font-weight: 700; color: var(--text-secondary, #96a7c2); }.docs-main textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; color: var(--text-primary, #e6edf7); background: var(--bg-primary, #0a0f1c); border: 1px solid var(--border, #1f2d47); border-radius: 10px; padding: 12px 14px; resize: vertical; }.docs-main textarea:focus { outline: 2px solid var(--accent, #3b82f6); outline-offset: 1px; }--.docs-main button.primary { justify-self: start; font: inherit; font-weight: 700; font-size: 14px; color: #fff; background: var(--accent, #3b82f6); border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; }++.docs-main button.primary { justify-self: start; font: inherit; font-weight: 700; font-size: 14px; color: var(--on-accent-strong, var(--on-accent, #fff)); background: var(--accent-strong, var(--accent, #3472d8)); border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; }.docs-main button.primary:hover { filter: brightness(1.08); }.docs-main .error { border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); border-radius: 10px; padding: 12px 14px; }.docs-main [role="status"] strong { color: #22c55e; }@@@ -71,6 +71,8 @@ function createWebRoutes(config, { domain = null, sim = null, onvif = null, limir.get('/sitemap.xml', (req, res) => {res.type('application/xml').send(seo.sitemapXml(PUBLIC_PAGES.map((p) => ({ loc: `${config.baseUrl}${p}` }))));});++ // Browsers ask for /favicon.ico on their own (a 404 page links no icon): the app icon, as SVG.++ r.get('/favicon.ico', (req, res) => res.type('image/svg+xml').set('Cache-Control', 'public, max-age=86400').send(appIcon.favicon({ site: 'bot' })));// The web app manifest (openvibe-shared/app-icon): the same icon design and start URL every OpenVibe site ships.r.get('/manifest.webmanifest', (req, res) => {res.type('application/manifest+json').send(JSON.stringify(appIcon.manifest({@@@ -36,6 +36,13 @@ const { boot, check, done } = require('./helpers/app');}});++ await check('GET /favicon.ico: the app icon as SVG (browsers ask for it even on a 404 page)', async () => {++ const r = await get('/favicon.ico');++ assert.strictEqual(r.status, 200);++ assert.match(r.headers.get('content-type'), /^image\/svg\+xml/);++ assert.match(await r.text(), /<svg/);++ });++await check('GET /manifest.webmanifest: JSON, OpenVibe.Bot / Bot', async () => {const r = await get('/manifest.webmanifest');assert.strictEqual(r.status, 200);
@@ -32,7 +32,7 @@
@@ -32,7 +32,7 @@
.docs-main .field-label { font-size: 13px; font-weight: 700; color: var(--text-secondary, #96a7c2); }
.docs-main .field-label { font-size: 13px; font-weight: 700; color: var(--text-secondary, #96a7c2); }
.docs-main textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; color: var(--text-primary, #e6edf7); background: var(--bg-primary, #0a0f1c); border: 1px solid var(--border, #1f2d47); border-radius: 10px; padding: 12px 14px; resize: vertical; }
.docs-main textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; color: var(--text-primary, #e6edf7); background: var(--bg-primary, #0a0f1c); border: 1px solid var(--border, #1f2d47); border-radius: 10px; padding: 12px 14px; resize: vertical; }
.docs-main textarea:focus { outline: 2px solid var(--accent, #3b82f6); outline-offset: 1px; }
.docs-main textarea:focus { outline: 2px solid var(--accent, #3b82f6); outline-offset: 1px; }
-.docs-main button.primary { justify-self: start; font: inherit; font-weight: 700; font-size: 14px; color: #fff; background: var(--accent, #3b82f6); border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; }
+.docs-main button.primary { justify-self: start; font: inherit; font-weight: 700; font-size: 14px; color: var(--on-accent-strong, var(--on-accent, #fff)); background: var(--accent-strong, var(--accent, #3472d8)); border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; }
.docs-main button.primary:hover { filter: brightness(1.08); }
.docs-main button.primary:hover { filter: brightness(1.08); }
.docs-main .error { border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); border-radius: 10px; padding: 12px 14px; }
.docs-main .error { border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); border-radius: 10px; padding: 12px 14px; }
.docs-main [role="status"] strong { color: #22c55e; }
.docs-main [role="status"] strong { color: #22c55e; }
@@ -71,6 +71,8 @@ function createWebRoutes(config, { domain = null, sim = null, onvif = null, limi
@@ -71,6 +71,8 @@ function createWebRoutes(config, { domain = null, sim = null, onvif = null, limi
r.get('/sitemap.xml', (req, res) => {
r.get('/sitemap.xml', (req, res) => {
res.type('application/xml').send(seo.sitemapXml(PUBLIC_PAGES.map((p) => ({ loc: `${config.baseUrl}${p}` }))));
res.type('application/xml').send(seo.sitemapXml(PUBLIC_PAGES.map((p) => ({ loc: `${config.baseUrl}${p}` }))));
});
});
+ // Browsers ask for /favicon.ico on their own (a 404 page links no icon): the app icon, as SVG.
+ r.get('/favicon.ico', (req, res) => res.type('image/svg+xml').set('Cache-Control', 'public, max-age=86400').send(appIcon.favicon({ site: 'bot' })));
// The web app manifest (openvibe-shared/app-icon): the same icon design and start URL every OpenVibe site ships.
// The web app manifest (openvibe-shared/app-icon): the same icon design and start URL every OpenVibe site ships.
r.get('/manifest.webmanifest', (req, res) => {
r.get('/manifest.webmanifest', (req, res) => {
res.type('application/manifest+json').send(JSON.stringify(appIcon.manifest({
res.type('application/manifest+json').send(JSON.stringify(appIcon.manifest({
@@ -36,6 +36,13 @@ const { boot, check, done } = require('./helpers/app');
@@ -36,6 +36,13 @@ const { boot, check, done } = require('./helpers/app');
}
}
});
});
+ await check('GET /favicon.ico: the app icon as SVG (browsers ask for it even on a 404 page)', async () => {
+ const r = await get('/favicon.ico');
+ assert.strictEqual(r.status, 200);
+ assert.match(r.headers.get('content-type'), /^image\/svg\+xml/);
+ assert.match(await r.text(), /<svg/);
+ });
+
await check('GET /manifest.webmanifest: JSON, OpenVibe.Bot / Bot', async () => {
await check('GET /manifest.webmanifest: JSON, OpenVibe.Bot / Bot', async () => {
const r = await get('/manifest.webmanifest');
const r = await get('/manifest.webmanifest');
assert.strictEqual(r.status, 200);
assert.strictEqual(r.status, 200);