From 0dcbfd746e00b722d5b378f760684428f022e5ff Mon Sep 17 00:00:00 2001 From: Jesse <43443357+jessegpt@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:41:00 +0400 Subject: [PATCH 1/3] fix serviceWorker cache --- public/serviceWorker.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/public/serviceWorker.js b/public/serviceWorker.js index f5a24b70176..2e1d60b98d2 100644 --- a/public/serviceWorker.js +++ b/public/serviceWorker.js @@ -1,15 +1,21 @@ 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) { console.log("ServiceWorker activated."); }); -self.addEventListener("install", function (event) { - event.waitUntil( - caches.open(CHATGPT_NEXT_WEB_CACHE).then(function (cache) { - return cache.addAll([]); - }), - ); +workbox.core.clientsClaim(); +self.addEventListener("message", (event) => { + if (event.data && event.data.type === "SKIP_WAITING") { + self.skipWaiting(); + } }); -self.addEventListener("fetch", (e) => {}); +workbox.routing.registerRoute( + new RegExp('/*'), + new workbox.strategies.StaleWhileRevalidate({ + cacheName: CHATGPT_NEXT_WEB_CACHE + }) +); From f5a2ce52aa1cdbf0c6fe8f9b1e053e0cd75651c2 Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Sat, 14 Oct 2023 15:22:41 +0900 Subject: [PATCH 2/3] Fix typo in README.md passsword -> password --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fe76f4f06f..fbb87a5ce64 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ Your openai api key. ### `CODE` (optional) -Access passsword, separated by comma. +Access password, separated by comma. ### `BASE_URL` (optional) From 65c4a0c319c2264dcd5236d944fe7f541ef16441 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Mon, 16 Oct 2023 11:52:45 +0800 Subject: [PATCH 3/3] feat: close #3031 user can set larger font size --- app/components/settings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 8ed6b77383c..795469a9681 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -753,7 +753,7 @@ export function Settings() { title={`${config.fontSize ?? 14}px`} value={config.fontSize} min="12" - max="18" + max="40" step="1" onChange={(e) => updateConfig(