diff --git a/README.md b/README.md index 9d3689f..2c619ac 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Sandbar mobile +# Remora An installable companion for [Sandbar](https://git.veillax.com/Veillax/sandbar): push notifications, on-call actions (acknowledge, snooze, escalate, resolve), topics, monitors and Hammerhead tunnel status. @@ -17,7 +17,7 @@ Start Sandbar and let it serve this folder: ``` cd ../sandbar SANDBAR_ADMIN_EMAIL=dev@example.com SANDBAR_ADMIN_PASSWORD=choose-a-password \ -SANDBAR_APP_DIR=../sandbar-mobile/public SANDBAR_PUSH_DEV=1 \ +SANDBAR_APP_DIR=../remora/public SANDBAR_PUSH_DEV=1 \ go run ./cmd/sandbar -listen 127.0.0.1:8090 -url http://127.0.0.1:8090 ``` diff --git a/package.json b/package.json index 811505e..eb24dc9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "sandbar-mobile", + "name": "remora", "version": "0.1.0", - "description": "Installable companion app for Sandbar: push notifications, on-call actions, monitors and tunnel status.", + "description": "Remora: installable companion app for Sandbar: push notifications, on-call actions, monitors and tunnel status.", "private": true, "type": "module", "scripts": { diff --git a/public/app.js b/public/app.js index 858215d..1781059 100644 --- a/public/app.js +++ b/public/app.js @@ -76,7 +76,7 @@ function onWorkerMessage(m) { if (!m) return; if (m.type === 'push') { const p = m.payload || {}; - if (document.visibilityState === 'visible') toast((p.title || 'Sandbar') + (p.message ? ': ' + p.message.slice(0, 80) : '')); + if (document.visibilityState === 'visible') toast((p.title || 'Remora') + (p.message ? ': ' + p.message.slice(0, 80) : '')); load(); } else if (m.type === 'open') { location.hash = m.alert ? 'alerts' : 'topics'; @@ -172,7 +172,7 @@ async function signOut(expired) { // Turns push on for this device: asks permission, subscribes, and tells the server which topics to send. async function enablePush() { - if (!('serviceWorker' in navigator) || !('PushManager' in window)) throw new Error('This browser cannot receive push notifications. On iPhone, add Sandbar to the Home Screen first.'); + if (!('serviceWorker' in navigator) || !('PushManager' in window)) throw new Error('This browser cannot receive push notifications. On iPhone, add Remora to the Home Screen first.'); const perm = await Notification.requestPermission(); if (perm !== 'granted') throw new Error('Notifications are blocked. Allow them for this site in your browser settings, then try again.'); const reg = await navigator.serviceWorker.ready; @@ -209,7 +209,7 @@ function loginView() { const pw = h('input', { id: 'pw', type: 'password', autocomplete: 'current-password', required: true }); const btn = h('button', { class: 'primary', type: 'submit' }, 'Sign in'); const form = h('form', { class: 'login' }, - h('h1', {}, 'Sandbar'), + h('h1', {}, 'Remora'), h('p', { class: 'hint' }, 'Alerts, on-call and monitors from your own server.'), err, h('label', { for: 'server' }, 'Server address'), server, @@ -349,7 +349,7 @@ function statusView() { function settingsView() { const box = h('div', { id: 'pushbox' }, h('p', { class: 'hint' }, 'Checking')); pushState().then(async (st) => { - const msg = { unsupported: 'This browser cannot receive push notifications. On iPhone and iPad, add Sandbar to the Home Screen (Share, then Add to Home Screen) and open it from there.', + const msg = { unsupported: 'This browser cannot receive push notifications. On iPhone and iPad, add Remora to the Home Screen (Share, then Add to Home Screen) and open it from there.', blocked: 'Notifications are blocked for this site. Allow them in your browser settings, then come back.', on: 'Push notifications are on for this device.', off: 'Push notifications are off for this device.' }[st]; box.replaceChildren(...[h('p', {}, msg), @@ -377,7 +377,7 @@ function render() { const focus = document.activeElement && document.activeElement.id; const keep = focus && ['newtopic', 'pub'].includes(focus) ? document.activeElement.value : null; app.replaceChildren( - h('header', { class: 'top' }, h('h1', {}, 'Sandbar'), h('span', { class: 'sub' }, session.server.replace(/^https?:\/\//, ''))), + h('header', { class: 'top' }, h('h1', {}, 'Remora'), h('span', { class: 'sub' }, session.server.replace(/^https?:\/\//, ''))), h('main', {}, data.error ? h('div', { class: 'error', role: 'alert' }, data.error) : null, view()), h('nav', { class: 'tabs', 'aria-label': 'Sections' }, TABS.map(([id, label, d]) => h('a', { href: '#' + id, 'aria-current': tab === id ? 'page' : null }, svg(d), h('span', {}, label, id === 'alerts' && firing ? h('span', { class: 'badge-count' }, String(firing)) : null))))); diff --git a/public/index.html b/public/index.html index 5e9a7aa..03c54e0 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ -