mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-20 15:38:11 -07:00
general: fixes
This commit is contained in:
+5
-5
@@ -1,4 +1,4 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@@ -1308,7 +1308,7 @@
|
||||
localStorage.getItem(settingsThemeLocalStorageKey)
|
||||
);
|
||||
const preferredColorSchemeMatchMedia = window.matchMedia(
|
||||
"(prefers-color-scheme: dark)",
|
||||
"(prefers-color-scheme: dark)"
|
||||
);
|
||||
if (
|
||||
theme === "dark" ||
|
||||
@@ -1320,7 +1320,7 @@
|
||||
}
|
||||
|
||||
const backgroundColor = getComputedStyle(
|
||||
window.document.documentElement,
|
||||
window.document.documentElement
|
||||
).getPropertyValue("--background-color");
|
||||
const meta = window.document.createElement("meta");
|
||||
meta.name = "theme-color";
|
||||
@@ -1676,7 +1676,7 @@
|
||||
<a
|
||||
id="anchor-git"
|
||||
title="Git"
|
||||
href="https://github.com/kibo-money"
|
||||
href="https://github.com/kibo-money/kibo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@@ -2015,7 +2015,7 @@
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
0.4.0
|
||||
0.4.1
|
||||
</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
+6
-4
@@ -8431,6 +8431,7 @@ lazySignals.then((importedSignals) => {
|
||||
const head = history.at(0);
|
||||
if (
|
||||
head &&
|
||||
head.preset === preset &&
|
||||
dateToTestedString(new Date()) === dateToTestedString(head.date)
|
||||
) {
|
||||
return;
|
||||
@@ -8452,10 +8453,11 @@ lazySignals.then((importedSignals) => {
|
||||
serializedHistory.length = MAX_HISTORY_LENGTH;
|
||||
}
|
||||
|
||||
localStorage.setItem(
|
||||
LOCAL_STORAGE_HISTORY_KEY,
|
||||
JSON.stringify(serializedHistory)
|
||||
);
|
||||
const jsonHistory = JSON.stringify(serializedHistory);
|
||||
|
||||
console.log(jsonHistory);
|
||||
|
||||
localStorage.setItem(LOCAL_STORAGE_HISTORY_KEY, jsonHistory);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,18 +50,22 @@ self.addEventListener("fetch", (_event) => {
|
||||
const request = event.request;
|
||||
const { url, method } = request;
|
||||
|
||||
console.log(`service-worker: fetching: ${url}`);
|
||||
|
||||
event.respondWith(
|
||||
caches.match(request).then((cachedResponse) => {
|
||||
return fetch(request)
|
||||
.then((response) => {
|
||||
const { status } = response;
|
||||
|
||||
// @ts-ignore
|
||||
if (url.includes("/api/")) {
|
||||
return response;
|
||||
}
|
||||
|
||||
return caches.open(version).then((cache) => {
|
||||
if (response.status === 200) {
|
||||
if (method === "GET") {
|
||||
if (status === 200 || status === 304) {
|
||||
if (status === 200 && method === "GET") {
|
||||
cache.put(request, response.clone());
|
||||
}
|
||||
return response;
|
||||
|
||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user