From 69933f37e5c507b7b993759194da630247651983 Mon Sep 17 00:00:00 2001 From: Veillax <126523099+Veillax@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:18:16 -0600 Subject: [PATCH] Rename to Remora --- README.md | 4 ++-- package.json | 4 ++-- public/app.js | 10 +++++----- public/index.html | 2 +- public/manifest.webmanifest | 4 ++-- public/store.js | 2 +- public/sw.js | 8 ++++---- 7 files changed, 17 insertions(+), 17 deletions(-) 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 @@ -Sandbar +Remora diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest index 9572cbb..b75dc4b 100644 --- a/public/manifest.webmanifest +++ b/public/manifest.webmanifest @@ -1,6 +1,6 @@ { - "name": "Sandbar", - "short_name": "Sandbar", + "name": "Remora", + "short_name": "Remora", "description": "Alerts, on-call and monitors from your Sandbar server.", "start_url": "./", "scope": "./", diff --git a/public/store.js b/public/store.js index 413f2af..c1c62f4 100644 --- a/public/store.js +++ b/public/store.js @@ -2,7 +2,7 @@ // localStorage, so the sign-in lives in IndexedDB; the page keeps a copy in localStorage // only for quick startup and falls back to IndexedDB. -const DB = 'sandbar-mobile'; +const DB = 'remora'; function open() { return new Promise((resolve, reject) => { diff --git a/public/sw.js b/public/sw.js index 4f5b19d..c0d7057 100644 --- a/public/sw.js +++ b/public/sw.js @@ -4,7 +4,7 @@ function kvGet(key) { return new Promise((resolve, reject) => { - const r = indexedDB.open('sandbar-mobile', 1); + const r = indexedDB.open('remora', 1); r.onupgradeneeded = () => r.result.createObjectStore('kv'); r.onerror = () => reject(r.error); r.onsuccess = () => { @@ -60,7 +60,7 @@ self.addEventListener('fetch', (e) => { self.addEventListener('push', (e) => { let p; - try { p = e.data.json(); } catch { p = { title: 'Sandbar', message: e.data ? e.data.text() : '' }; } + try { p = e.data.json(); } catch { p = { title: 'Remora', message: e.data ? e.data.text() : '' }; } e.waitUntil(show(p)); }); @@ -85,7 +85,7 @@ async function show(p) { timestamp: (p.time || Date.now() / 1000) * 1000, actions: firing ? [{ action: 'ack', title: 'Acknowledge' }, { action: 'snooze', title: 'Snooze 30 min' }] : [], }; - await self.registration.showNotification(p.title || 'Sandbar', options); + await self.registration.showNotification(p.title || 'Remora', options); } self.addEventListener('notificationclick', (e) => { @@ -103,7 +103,7 @@ self.addEventListener('notificationclick', (e) => { return; } catch (err) { await self.registration.showNotification('Could not ' + (e.action === 'ack' ? 'acknowledge' : 'snooze') + ' the alert', { - body: err.message + ' Open Sandbar to try again.', tag: 'err-' + alert, data: { alert }, + body: err.message + ' Open Remora to try again.', tag: 'err-' + alert, data: { alert }, }); return; }