mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-24 22:50:22 +09:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
f8b3d014d7
@ -754,7 +754,7 @@ export function Settings() {
|
|||||||
title={`${config.fontSize ?? 14}px`}
|
title={`${config.fontSize ?? 14}px`}
|
||||||
value={config.fontSize}
|
value={config.fontSize}
|
||||||
min="12"
|
min="12"
|
||||||
max="18"
|
max="40"
|
||||||
step="1"
|
step="1"
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
updateConfig(
|
updateConfig(
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache";
|
const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache";
|
||||||
|
|
||||||
|
importScripts('https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-sw.js');
|
||||||
|
|
||||||
self.addEventListener("activate", function (event) {
|
self.addEventListener("activate", function (event) {
|
||||||
console.log("ServiceWorker activated.");
|
console.log("ServiceWorker activated.");
|
||||||
});
|
});
|
||||||
|
|
||||||
self.addEventListener("install", function (event) {
|
workbox.core.clientsClaim();
|
||||||
event.waitUntil(
|
self.addEventListener("message", (event) => {
|
||||||
caches.open(CHATGPT_NEXT_WEB_CACHE).then(function (cache) {
|
if (event.data && event.data.type === "SKIP_WAITING") {
|
||||||
return cache.addAll([]);
|
self.skipWaiting();
|
||||||
}),
|
}
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
self.addEventListener("fetch", (e) => {});
|
workbox.routing.registerRoute(
|
||||||
|
new RegExp('/*'),
|
||||||
|
new workbox.strategies.StaleWhileRevalidate({
|
||||||
|
cacheName: CHATGPT_NEXT_WEB_CACHE
|
||||||
|
})
|
||||||
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user