Enhance documentation, update release process, and improve UI elements
This commit is contained in:
+1
-2
@@ -4,7 +4,7 @@ const MAX_RECORDING_MS = 30 * 60 * 1000;
|
||||
const elements = Object.fromEntries([
|
||||
'record-button', 'record-title', 'record-help', 'record-time', 'record-meter-fill', 'capture-message',
|
||||
'queue-list', 'queue-empty', 'queue-count', 'sync-button', 'archive-list', 'archive-empty',
|
||||
'network-state', 'date-label', 'storage-status',
|
||||
'network-state', 'storage-status',
|
||||
].map((id) => [id, document.getElementById(id)]));
|
||||
|
||||
let databasePromise;
|
||||
@@ -304,7 +304,6 @@ window.addEventListener('offline', updateNetwork);
|
||||
window.addEventListener('focus', () => { updateNetwork(); syncQueue(); loadAwaitingNotes(); });
|
||||
document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible') syncQueue(); });
|
||||
|
||||
elements['date-label'].textContent = new Intl.DateTimeFormat(undefined, { weekday: 'short', month: 'short', day: 'numeric' }).format(new Date()).toUpperCase();
|
||||
updateNetwork();
|
||||
renderQueue().then(syncQueue).catch(() => setMessage('Browser storage is unavailable. Check Safari storage settings.', true));
|
||||
loadAwaitingNotes();
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<circle cx="32" cy="32" r="32" fill="#355a43" />
|
||||
<text x="32" y="45" fill="#fffefa" font-family="Georgia, serif" font-size="40" text-anchor="middle">V</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 229 B |
+3
-3
@@ -7,24 +7,24 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<title>Faerro KB</title>
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
<link rel="stylesheet" href="/styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<a class="brand" href="/" aria-label="Faerro KB"><span class="brand-mark">V</span><span>voice <b>kb</b></span></a>
|
||||
<a class="brand" href="/" aria-label="Faerro KB"><span class="brand-mark">V</span><span>Faerro <b>KB</b></span></a>
|
||||
<span id="network-state" class="network-state"><i></i> Checking</span>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="capture" aria-labelledby="capture-title">
|
||||
<div class="section-kicker"><span>PERSONAL ARCHIVE</span><span id="date-label"></span></div>
|
||||
<div class="recorder-row">
|
||||
<button id="record-button" class="record-button" type="button" aria-label="Start recording">
|
||||
<span class="record-dot"></span>
|
||||
</button>
|
||||
<div class="record-copy">
|
||||
<strong id="record-title">Ready when you are</strong>
|
||||
<strong id="record-title">Ready</strong>
|
||||
<span id="record-help">Tap to record a voice note</span>
|
||||
</div>
|
||||
<time id="record-time">00:00</time>
|
||||
|
||||
@@ -5,5 +5,12 @@
|
||||
"display": "standalone",
|
||||
"background_color": "#f5f3ed",
|
||||
"theme_color": "#f5f3ed",
|
||||
"icons": []
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-6
@@ -28,7 +28,7 @@ main { max-width: 1040px; margin: auto; padding: 0 24px; }
|
||||
h1 { margin: 24px 0 11px; font: 500 clamp(42px, 7vw, 72px)/0.99 var(--serif); letter-spacing: 0; }
|
||||
h1 em { color: var(--moss); font-weight: 500; }
|
||||
.intro { color: #606b63; margin: 0 0 28px; font-size: 14px; }
|
||||
.recorder-row { max-width: 590px; min-height: 78px; padding: 14px 18px 14px 14px; display: flex; align-items: center; gap: 16px; background: #fffefa; border: 1px solid var(--line); }
|
||||
.recorder-row { max-width: 590px; min-height: 78px; margin-inline: auto; padding: 14px 18px 14px 14px; display: flex; align-items: center; gap: 16px; background: #fffefa; border: 1px solid var(--line); }
|
||||
.record-button { width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--coral); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; transition: background .2s ease, transform .2s ease; }
|
||||
.record-button:hover { transform: scale(1.04); }
|
||||
.record-button.recording { background: var(--ink); }
|
||||
@@ -38,15 +38,15 @@ h1 em { color: var(--moss); font-weight: 500; }
|
||||
.record-copy strong { font-size: 14px; font-weight: 600; }
|
||||
.record-copy span { color: var(--muted); font-size: 12px; }
|
||||
#record-time { color: var(--muted); font: 12px var(--mono); font-variant-numeric: tabular-nums; }
|
||||
.record-meter { height: 2px; max-width: 590px; background: #e4e3dc; }
|
||||
.record-meter { height: 2px; max-width: 590px; margin-inline: auto; background: #e4e3dc; }
|
||||
.record-meter span { display: block; height: 100%; width: 0; background: var(--coral); transition: width .25s linear; }
|
||||
.capture-message { height: 20px; max-width: 590px; padding-top: 6px; color: var(--muted); font-size: 11px; }
|
||||
.capture-message { height: 20px; max-width: 590px; margin-inline: auto; padding-top: 6px; color: var(--muted); font-size: 11px; text-align: center; }
|
||||
.queue-section, .archive-section { padding: 30px 0 34px; border-bottom: 1px solid var(--line); }
|
||||
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
|
||||
.section-heading .section-kicker { justify-content: flex-start; }
|
||||
.section-heading { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; }
|
||||
.section-heading .section-kicker { justify-content: center; }
|
||||
h2 { margin: 8px 0 0; font: 500 25px/1.1 var(--serif); }
|
||||
#queue-count { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-left: 5px; border-radius: 50%; background: #e6e7df; color: var(--moss-dark); font: 11px var(--mono); vertical-align: 3px; }
|
||||
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; color: var(--moss-dark); font-size: 22px; cursor: pointer; }
|
||||
.icon-button { position: absolute; right: 0; width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; color: var(--moss-dark); font-size: 22px; cursor: pointer; }
|
||||
.icon-button:disabled { opacity: .4; cursor: wait; }
|
||||
.queue-list, .archive-list { list-style: none; margin: 16px 0 0; padding: 0; }
|
||||
.queue-item, .archive-item { display: flex; align-items: flex-start; gap: 15px; padding: 14px 0; border-top: 1px solid #e3e4dd; animation: reveal .35s ease both; }
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
const CACHE_NAME = 'faerro-kb-shell-v1';
|
||||
const APP_SHELL = ['/', '/styles.css', '/app.js', '/manifest.webmanifest'];
|
||||
const CACHE_NAME = 'faerro-kb-shell-v2';
|
||||
const APP_SHELL = ['/', '/styles.css', '/app.js', '/manifest.webmanifest', '/favicon.svg'];
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)));
|
||||
|
||||
Reference in New Issue
Block a user