Rename to Remora

This commit is contained in:
Veillax committed 2026-10-27 17:18:16 -06:00
1 parent ad165ef6a5
commit 69933f37e5
7 files changed
+17 -17

No files matched your search

+5 -5
View File
@@ -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)))));