Skip to content

Commit

Permalink
Loading client css fixed. / clearFetchPwaCache function detector added.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasminDreasond committed Sep 23, 2024
1 parent 713691b commit 193a4cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions public/changelog/1/5/1.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Image atom support to `data:image` url added.
- Clear cache button tiny issue fixed.
4 changes: 2 additions & 2 deletions src/app/templates/client/Client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function Client({ isDevToolsOpen = false }) {
<ElectronSidebar isDevToolsOpen={isDevToolsOpen} />
<ProxyModal />
<div
className={`loading-display${__ENV_APP__.ELECTRON_MODE ? ' root-electron-style' : ''}${isDevToolsOpen ? ' devtools-open' : ''}`}
className={`loading-display${__ENV_APP__.ELECTRON_MODE ? ' root-electron-style' : ''}${isDevToolsOpen ? ' devtools-open' : ''} noselect`}
>
<div className="loading__menu">
<ContextMenu
Expand Down Expand Up @@ -471,7 +471,7 @@ function Client({ isDevToolsOpen = false }) {
<ElectronSidebar isDevToolsOpen={isDevToolsOpen} />
<ProxyModal />
<div
className={`loading-display${__ENV_APP__.ELECTRON_MODE ? ' root-electron-style' : ''}${isDevToolsOpen ? ' devtools-open' : ''}`}
className={`loading-display${__ENV_APP__.ELECTRON_MODE ? ' root-electron-style' : ''}${isDevToolsOpen ? ' devtools-open' : ''} noselect`}
>
<div className="loading__menu">
<ContextMenu
Expand Down
6 changes: 5 additions & 1 deletion src/util/pwa/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export function isUsingPWA() {
}

export function clearFetchPwaCache() {
if ('serviceWorker' in navigator || 'ServiceWorker' in navigator) {
if (
('serviceWorker' in navigator || 'ServiceWorker' in navigator) &&
navigator.serviceWorker.controller &&
navigator.serviceWorker.controller.postMessage
) {
navigator.serviceWorker.controller.postMessage({
type: 'CLEAR_FETCH_CACHE',
});
Expand Down

0 comments on commit 193a4cf

Please sign in to comment.