fix: VPS text update, SW clients.claim fix

This commit is contained in:
posimai 2026-03-29 21:25:42 +09:00
parent 4ee2c7eccb
commit 3eb72c7706
2 changed files with 4 additions and 4 deletions

View File

@ -474,7 +474,7 @@
<div style="margin-top:20px"> <div style="margin-top:20px">
<div class="settings-group-label">Posimai API Key</div> <div class="settings-group-label">Posimai API Key</div>
<p class="settings-field-label"> <p class="settings-field-label">
設定すると Synology 経由でずんだもん音声が使えます(未設定時はブラウザ音声)。 設定すると VPS 経由でずんだもん音声が使えます(未設定時はブラウザ音声)。
</p> </p>
<input class="settings-text-input" id="apiKeyInput" type="password" <input class="settings-text-input" id="apiKeyInput" type="password"
placeholder="posimai_api_key" autocomplete="off"> placeholder="posimai_api_key" autocomplete="off">

6
sw.js
View File

@ -1,4 +1,4 @@
const CACHE = 'posimai-brief-v4'; const CACHE = 'posimai-brief-v5';
const ASSETS = ['/', '/index.html', '/manifest.json']; const ASSETS = ['/', '/index.html', '/manifest.json'];
const ORIGIN = self.location.origin; const ORIGIN = self.location.origin;
@ -11,9 +11,9 @@ self.addEventListener('activate', e => {
e.waitUntil( e.waitUntil(
caches.keys().then(keys => caches.keys().then(keys =>
Promise.all(keys.filter(k => k !== CACHE).map(k => caches.delete(k))) Promise.all(keys.filter(k => k !== CACHE).map(k => caches.delete(k)))
).catch(err => console.warn('[SW] activate error', err)) ).then(() => self.clients.claim())
.catch(err => console.warn('[SW] activate error', err))
); );
self.clients.claim();
}); });
self.addEventListener('fetch', e => { self.addEventListener('fetch', e => {