All working nicely

This commit is contained in:
2026-04-16 21:29:31 -07:00
parent 3fef295b59
commit eb4dbb2448
9 changed files with 139 additions and 184 deletions

View File

@@ -39,7 +39,7 @@ async function serveFile(filename: string) {
const newResponse = await new Response(compressed);
// const newResponse = await new Response(file);
newResponse.headers.set('Cache-Control', 'no-transform');
newResponse.headers.set('Cache-Control', 'no-cache, no-transform');
newResponse.headers.set('Content-Encoding', 'br');
@@ -301,6 +301,7 @@ async function devServerWatchFiles() {
const cachedPath = path.replace(parentDir, '');
filepathResponseCache.delete(cachedPath);
console.log('Purging updated file:', cachedPath)
console.log(filepathResponseCache);
}
}

View File

@@ -1114,7 +1114,7 @@ export class App {
document.getElementById("compose-reply-area")!.style.display = "block";
}
document.getElementById('compose')!.style.display = 'block';
document.getElementById('compose')!.style.display = 'flex';
document.getElementById('textarea_post')?.focus();
document.getElementById('compose-dimmer')?.classList.add("compose-dimmer-dimmed");
document.body.classList.add("no-scroll");
@@ -1594,6 +1594,11 @@ export class App {
if (!record) return;
const postData = record.data;
const authorDiv = document.createElement('div');
authorDiv.className = 'compose-reply-author';
authorDiv.textContent = `@${postData.author}`;
composeReplyArea.appendChild(authorDiv);
const previewDiv = document.createElement('div');
previewDiv.className = 'compose-reply-preview';

104
src/sw.ts
View File

@@ -38,102 +38,44 @@ self.addEventListener("install", (e: any) => {
});
async function staleWhileRevalidate(event: any) {
let cache = await caches.open(cacheName);
let response = await cache.match(event.request);
if (response) {
debugLog ? console.log('Service Worker: Cache hit', event.request.url) : null;
}
const fetchPromise = (async () => {
debugLog ? console.log('Service Worker: Fetching', event.request.url) : null;
let networkResponse = null;
async function fetchAndUpdateCache(request: Request): Promise<Response> {
debugLog && console.log('Service Worker: Fetching', request.url);
let networkResponse: Response;
try {
networkResponse = await fetch(event.request);
networkResponse = await fetch(request);
} catch (e) {
debugLog ? console.log('Service Worker: Failed to fetch', e) : null;
debugLog && console.log('Service Worker: Failed to fetch', e);
return new Response('Network error occurred', {
status: 404,
statusText: 'Cache miss and fetch failed',
headers: { 'Content-Type': 'text/plain' }
});
}
debugLog ? console.log('Service Worker: Updating cache', event.request.url) : null;
debugLog && console.log('Service Worker: Updating cache', request.url);
const cache = await caches.open(cacheName);
try {
await cache.put(event.request, networkResponse.clone());
await cache.put(request, networkResponse.clone());
} catch (e) {
debugLog ? console.log('Service Worker: failed to update cache', event.request.url, e) : null;
debugLog && console.log('Service Worker: failed to update cache', request.url, e);
}
debugLog ? console.log('Service Worker: Returning networkResponse', event.request.url) : null;
return networkResponse;
})();
debugLog ? console.log('Service Worker: Returning return response || fetchPromise', event.request.url) : null;
return response || fetchPromise;
// if (networkResponse) {
// cache.put(event.request, networkResponse.clone())
// return networkResponse;
// }
// caches.open(cacheName)
// .then(function (cache) {
// return cache.match(event.request)
// .then(function (response) {
// var fetchPromise = fetch(event.request)
// .then(function (networkResponse) {
// cache.put(event.request, networkResponse.clone());
// return networkResponse;
// });
// return response || fetchPromise;
// });
// })
}
// async function responder(event: any) {
// debugLog ? console.log('Fetching', event.request.url) : null;
// let response = await fetch(event.request);
// if (!response) {
// debugLog ? console.log('Fetch failed, falling back to cache', event.request.url) : null;
// let cacheMatch = await caches.match(event.request);
// if (!cacheMatch) {
// // DUnno what to return here!
// }
// return cacheMatch;
// }
// if (response.status === 206) {
// debugLog ? console.log('Not caching partial content') : null;
// return response;
// }
// debugLog ? console.log('Fetch successful, updating cache', event.request.url) : null;
// const cache = await caches.open(cacheName);
// try {
// cache.put(event.request, response.clone()).catch((error) => debugLog ? console.log('failed to cache', event.request, error)) : null;
// } catch (e) {
// console.log('failed to cache', event.request)
// }
// return response;
// }
self.addEventListener('fetch', function (event: any) {
event.respondWith(staleWhileRevalidate(event));
// event.respondWith(responder(event));
const networkFetch = fetchAndUpdateCache(event.request);
event.respondWith(async function () {
const cache = await caches.open(cacheName);
const cached = await cache.match(event.request);
if (cached) {
debugLog && console.log('Service Worker: Cache hit', event.request.url);
return cached;
}
return networkFetch;
}());
// Keep the SW alive until the background cache update finishes
event.waitUntil(networkFetch);
});
addEventListener("message", async (e) => {

View File

@@ -832,7 +832,7 @@ export class App {
this.renderComposeReplyArea(replyToID);
document.getElementById("compose-reply-area").style.display = "block";
}
document.getElementById('compose').style.display = 'block';
document.getElementById('compose').style.display = 'flex';
document.getElementById('textarea_post')?.focus();
document.getElementById('compose-dimmer')?.classList.add("compose-dimmer-dimmed");
document.body.classList.add("no-scroll");
@@ -1184,6 +1184,10 @@ export class App {
if (!record)
return;
const postData = record.data;
const authorDiv = document.createElement('div');
authorDiv.className = 'compose-reply-author';
authorDiv.textContent = `@${postData.author}`;
composeReplyArea.appendChild(authorDiv);
const previewDiv = document.createElement('div');
previewDiv.className = 'compose-reply-preview';
const textDiv = document.createElement('div');

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1, interactive-widget=resizes-content">
<title>Dandelion</title>
@@ -131,7 +131,10 @@
<div id="compose">
<div id="compose-header">
<div id="button_cancel_post" class="link">Cancel</div>
<button id="button_post" class="button button-big">post</button>
</div>
<div id="compose-reply-area"></div>
<textarea cols="60" rows="6" id="textarea_post"></textarea>
@@ -140,11 +143,6 @@
<label for="file-input" id="file-input-label" class="button button-big">photo</label>
<input type="file" id="file-input" accept="image/*" multiple style="display:none">
</div>
<div class="compose-right-buttons">
<!-- <button id="button_add_pic" >🏞️</button> -->
<button id="button_post" class="button button-big">post</button>
</div>
</div>
</div>

View File

@@ -297,6 +297,7 @@ iframe {
#compose {
display: none;
flex-direction: column;
position: fixed;
top: 5%;
left: 50%;
@@ -316,14 +317,58 @@ iframe {
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
#compose-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 8px;
}
@media (pointer: coarse) {
#compose {
top: 0;
width: 100%;
height: 100dvh;
max-height: 100dvh;
box-sizing: border-box;
overflow-y: hidden;
border: none;
border-radius: 0;
box-shadow: none;
}
#textarea_post {
flex: 1;
min-height: 0;
height: auto;
max-height: none;
resize: none;
border: none;
}
#textarea_post:focus {
outline: none;
}
#compose-reply-area {
border-bottom: 1px solid var(--border-color);
margin-bottom: 0;
}
}
#compose-reply-area {
display: none;
padding: 8px 10px;
margin-bottom: 8px;
border-left: 3px solid var(--highlight-fg-color);
font-size: 0.85em;
}
.compose-reply-author {
font-weight: bold;
font-size: 0.85em;
margin-bottom: 2px;
}
.compose-reply-preview {
display: flex;
gap: 10px;
@@ -337,16 +382,15 @@ iframe {
}
.compose-reply-preview-text iframe {
width: 120px;
height: 68px;
pointer-events: none;
}
.compose-reply-preview-image {
width: 48px;
height: 48px;
max-width: 48px;
max-height: 48px;
width: 96px;
height: 96px;
max-width: 96px;
max-height: 96px;
object-fit: cover;
border-radius: 4px;
flex-shrink: 0;

View File

@@ -30,82 +30,43 @@ self.addEventListener("install", (e) => {
}
})());
});
async function staleWhileRevalidate(event) {
let cache = await caches.open(cacheName);
let response = await cache.match(event.request);
if (response) {
debugLog ? console.log('Service Worker: Cache hit', event.request.url) : null;
}
const fetchPromise = (async () => {
debugLog ? console.log('Service Worker: Fetching', event.request.url) : null;
let networkResponse = null;
async function fetchAndUpdateCache(request) {
debugLog && console.log('Service Worker: Fetching', request.url);
let networkResponse;
try {
networkResponse = await fetch(event.request);
networkResponse = await fetch(request);
}
catch (e) {
debugLog ? console.log('Service Worker: Failed to fetch', e) : null;
debugLog && console.log('Service Worker: Failed to fetch', e);
return new Response('Network error occurred', {
status: 404,
statusText: 'Cache miss and fetch failed',
headers: { 'Content-Type': 'text/plain' }
});
}
debugLog ? console.log('Service Worker: Updating cache', event.request.url) : null;
debugLog && console.log('Service Worker: Updating cache', request.url);
const cache = await caches.open(cacheName);
try {
await cache.put(event.request, networkResponse.clone());
await cache.put(request, networkResponse.clone());
}
catch (e) {
debugLog ? console.log('Service Worker: failed to update cache', event.request.url, e) : null;
debugLog && console.log('Service Worker: failed to update cache', request.url, e);
}
debugLog ? console.log('Service Worker: Returning networkResponse', event.request.url) : null;
return networkResponse;
})();
debugLog ? console.log('Service Worker: Returning return response || fetchPromise', event.request.url) : null;
return response || fetchPromise;
// if (networkResponse) {
// cache.put(event.request, networkResponse.clone())
// return networkResponse;
// }
// caches.open(cacheName)
// .then(function (cache) {
// return cache.match(event.request)
// .then(function (response) {
// var fetchPromise = fetch(event.request)
// .then(function (networkResponse) {
// cache.put(event.request, networkResponse.clone());
// return networkResponse;
// });
// return response || fetchPromise;
// });
// })
}
// async function responder(event: any) {
// debugLog ? console.log('Fetching', event.request.url) : null;
// let response = await fetch(event.request);
// if (!response) {
// debugLog ? console.log('Fetch failed, falling back to cache', event.request.url) : null;
// let cacheMatch = await caches.match(event.request);
// if (!cacheMatch) {
// // DUnno what to return here!
// }
// return cacheMatch;
// }
// if (response.status === 206) {
// debugLog ? console.log('Not caching partial content') : null;
// return response;
// }
// debugLog ? console.log('Fetch successful, updating cache', event.request.url) : null;
// const cache = await caches.open(cacheName);
// try {
// cache.put(event.request, response.clone()).catch((error) => debugLog ? console.log('failed to cache', event.request, error)) : null;
// } catch (e) {
// console.log('failed to cache', event.request)
// }
// return response;
// }
self.addEventListener('fetch', function (event) {
event.respondWith(staleWhileRevalidate(event));
// event.respondWith(responder(event));
const networkFetch = fetchAndUpdateCache(event.request);
event.respondWith(async function () {
const cache = await caches.open(cacheName);
const cached = await cache.match(event.request);
if (cached) {
debugLog && console.log('Service Worker: Cache hit', event.request.url);
return cached;
}
return networkFetch;
}());
// Keep the SW alive until the background cache update finishes
event.waitUntil(networkFetch);
});
addEventListener("message", async (e) => {
debugLog ? console.log(`Message received:`, e.data) : null;

View File

@@ -1 +1 @@
{"version":3,"file":"sw.js","sourceRoot":"","sources":["../src/sw.ts"],"names":[],"mappings":";AAAA,MAAM,QAAQ,GAAG,KAAK,CAAC;AACvB,yBAAyB;AACzB,MAAM,SAAS,G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