general: snapshot

This commit is contained in:
k
2024-09-17 10:57:21 +02:00
parent 62edee0860
commit da7c114d41
6 changed files with 357 additions and 324 deletions
+14 -5
View File
@@ -8,6 +8,18 @@
![Image of the Satonomics Web App version 0.4.0](./assets/v0.4.0.jpg)
### Brand
- **Satonomics** is now **kibō** 🎉
### Website
- Complete redesign of the website
- Ditched the whole `node` ecosystem in favor for pure `HTML`/`CSS`/`Javacript`
- Website is now served by the server
- Added Trading View attribution link to the settings frame and file in the lightweight charts folder
- Many other changes
### Parser
- Changed the block iterator from a custom version of [bitcoin-explorer](https://crates.io/crates/bitcoin-explorer) to the homemade [biter](https://crates.io/crates/biter) which allows the parser to run alongside `bitcoind`
@@ -23,14 +35,11 @@
- Various first run fixes
- Added to `-h` which arguments are saved, which is all of them at the time of writing
### App
- Made the app runable without needing to run the server first to generate `types.d.ts`
- Added Trading View attribution link to the settings frame and file in the lightweight charts folder
### Server
- Updated the code to support compressed binaries
- Added serving of the website
- Improved `Cache-Control` behavior
## v. 0.3.0 | [853930](https://mempool.space/block/00000000000000000002eb5e9a7950ca2d5d98bd1ed28fc9098aa630d417985d) - 2024/07/26
+7 -1
View File
@@ -149,7 +149,13 @@ The orange background is a wink to Bitcoin and when in a circle, it also represe
## Infrastructure
Here's the very easy the reproduce infrastructure of the main instances and its backup
Here's the current infrastructure of the main instance and its backup.
It uses 2 servers, a full and a light one without the parser running but with still datasets syncronized via Syncthing.
Cloudflare is used for their tunnel + CDN services.
> Though it's recommended to change to default **Browser Cache TTL** configuration from `4 Hours` to `Respect Existing Headers` (in `Websites / YOUR_DOMAIN / Caching / Configuration / Browser Cache TTL`)
<p align="center">
<picture>
+302 -310
View File
@@ -4,30 +4,30 @@
"source": "https://excalidraw.com",
"elements": [
{
"id": "4l5Cnq81N-N8HWbMPgOfm",
"type": "rectangle",
"x": 365.86486603966756,
"y": 534.9494905328866,
"width": 184.9297887916521,
"height": 85.19094049738938,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 351,
"versionNonce": 642218538,
"index": "a1",
"isDeleted": false,
"id": "4l5Cnq81N-N8HWbMPgOfm",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 365.86486603966756,
"y": 534.9494905328866,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 184.9297887916521,
"height": 85.19094049738938,
"seed": 350356010,
"groupIds": [],
"frameId": null,
"index": "a1",
"roundness": {
"type": 3
},
"seed": 350356010,
"version": 351,
"versionNonce": 642218538,
"isDeleted": false,
"boundElements": [
{
"type": "text",
@@ -47,35 +47,35 @@
"locked": false
},
{
"id": "LfdDNULnkLxM4LrR-Ey2y",
"type": "text",
"x": 388.80980193939985,
"y": 552.5449607815813,
"width": 139.0399169921875,
"height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 360,
"versionNonce": 1888531050,
"index": "a1V",
"isDeleted": false,
"id": "LfdDNULnkLxM4LrR-Ey2y",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 388.80980193939985,
"y": 552.5449607815813,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 139.0399169921875,
"height": 50,
"seed": 218559926,
"groupIds": [],
"frameId": null,
"index": "a1V",
"roundness": null,
"seed": 218559926,
"version": 360,
"versionNonce": 1888531050,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726495547033,
"link": null,
"locked": false,
"text": "Main instance\n(MBP M3 Pro)",
"fontSize": 20,
"fontFamily": 5,
"text": "Main instance\n(MBP M3 Pro)",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "4l5Cnq81N-N8HWbMPgOfm",
@@ -164,30 +164,30 @@
"lineHeight": 1.25
},
{
"id": "CbJ4u9h-uaIrTzsEExVo7",
"type": "arrow",
"x": 551.7946548313197,
"y": 577.8108949212098,
"width": 374.2744229755049,
"height": 0.5318682792568552,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 554,
"versionNonce": 1113225130,
"index": "a7",
"isDeleted": false,
"id": "CbJ4u9h-uaIrTzsEExVo7",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 551.7946548313197,
"y": 577.8108949212098,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 374.2744229755049,
"height": 0.5318682792568552,
"seed": 1412467498,
"groupIds": [],
"frameId": null,
"index": "a7",
"roundness": {
"type": 2
},
"seed": 1412467498,
"version": 554,
"versionNonce": 1113225130,
"isDeleted": false,
"boundElements": [
{
"type": "text",
@@ -197,17 +197,6 @@
"updated": 1726489097527,
"link": null,
"locked": false,
"points": [
[
0,
0
],
[
374.2744229755049,
-0.5318682792568552
]
],
"lastCommittedPoint": null,
"startBinding": {
"elementId": "4l5Cnq81N-N8HWbMPgOfm",
"focus": 0.053987925025335816,
@@ -220,40 +209,51 @@
"gap": 1.9594774360632248,
"fixedPoint": null
},
"lastCommittedPoint": null,
"startArrowhead": null,
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
374.2744229755049,
-0.5318682792568552
]
],
"elbowed": false
},
{
"id": "-xyotiDxrIvGpHihaNTMw",
"type": "text",
"x": 663.5995146712901,
"y": 553.6137138980424,
"width": 152.0398712158203,
"height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 24,
"versionNonce": 1622013622,
"index": "a7V",
"isDeleted": false,
"id": "-xyotiDxrIvGpHihaNTMw",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 663.5995146712901,
"y": 553.6137138980424,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 152.0398712158203,
"height": 50,
"seed": 1240678698,
"groupIds": [],
"frameId": null,
"index": "a7V",
"roundness": null,
"seed": 1240678698,
"version": 24,
"versionNonce": 1622013622,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726489097527,
"link": null,
"locked": false,
"text": "Synchronization\n(Syncthing)",
"fontSize": 20,
"fontFamily": 5,
"text": "Synchronization\n(Syncthing)",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "CbJ4u9h-uaIrTzsEExVo7",
@@ -262,39 +262,39 @@
"lineHeight": 1.25
},
{
"id": "4Kf-4nPmAC4H6JYuOWgKz",
"type": "ellipse",
"x": 674.688026887862,
"y": -113.87511038919328,
"width": 114.13321104184153,
"height": 83.7807552220783,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 889,
"versionNonce": 1695926463,
"index": "a9",
"isDeleted": false,
"id": "4Kf-4nPmAC4H6JYuOWgKz",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 674.688026887862,
"y": -113.87511038919328,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 114.13321104184153,
"height": 83.7807552220783,
"seed": 1864324918,
"groupIds": [],
"frameId": null,
"index": "a9",
"roundness": {
"type": 2
},
"seed": 1864324918,
"version": 818,
"versionNonce": 2002389878,
"isDeleted": false,
"boundElements": null,
"updated": 1726489120258,
"boundElements": [],
"updated": 1726523088164,
"link": null,
"locked": false
},
{
"type": "ellipse",
"version": 885,
"versionNonce": 1270288106,
"version": 956,
"versionNonce": 1989633713,
"index": "aA",
"isDeleted": false,
"id": "R4QUoIsp_Y1_gsH3uowyA",
@@ -322,14 +322,14 @@
"type": "arrow"
}
],
"updated": 1726489120258,
"updated": 1726523088164,
"link": null,
"locked": false
},
{
"type": "ellipse",
"version": 1074,
"versionNonce": 976563382,
"version": 1145,
"versionNonce": 1845254367,
"index": "aB",
"isDeleted": false,
"id": "sCBhvSDPsRkhW05eEeRy5",
@@ -361,14 +361,14 @@
"type": "arrow"
}
],
"updated": 1726489120258,
"updated": 1726523088164,
"link": null,
"locked": false
},
{
"type": "ellipse",
"version": 1077,
"versionNonce": 277455274,
"version": 1148,
"versionNonce": 1094281361,
"index": "aC",
"isDeleted": false,
"id": "XkaKAKq7arG2a4-xuVxc_",
@@ -391,7 +391,7 @@
"type": 2
},
"boundElements": [],
"updated": 1726489120258,
"updated": 1726523088164,
"link": null,
"locked": false
},
@@ -425,14 +425,6 @@
"type": "text",
"id": "rqWH83jhOa4ihfEdsTYEt"
},
{
"id": "h7FiB9aboy7Fv7NgvJ9pR",
"type": "arrow"
},
{
"id": "NFH-Fk8W9vYhpSgVkY7Kq",
"type": "arrow"
},
{
"id": "gaJmg3DF-UOKWKTiDcUQS",
"type": "arrow"
@@ -484,45 +476,34 @@
"lineHeight": 1.25
},
{
"id": "Xp-UFM8oBcOEj_8Scy4Ma",
"type": "arrow",
"x": 459.16617750823536,
"y": 246.47593943435749,
"width": 199.39664159505958,
"height": 244.9843279773636,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 960,
"versionNonce": 1215820095,
"index": "aN",
"isDeleted": false,
"id": "Xp-UFM8oBcOEj_8Scy4Ma",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 459.16617750823536,
"y": 246.47593943435749,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 199.39664159505958,
"height": 244.9843279773636,
"seed": 1968881974,
"groupIds": [],
"frameId": null,
"index": "aN",
"roundness": {
"type": 2
},
"seed": 1968881974,
"version": 887,
"versionNonce": 2022569782,
"isDeleted": false,
"boundElements": [],
"updated": 1726489120258,
"updated": 1726523088164,
"link": null,
"locked": false,
"points": [
[
0,
0
],
[
199.39664159505958,
-244.9843279773636
]
],
"lastCommittedPoint": null,
"startBinding": {
"elementId": "q5zgtaduyEFWvWtLqdo4u",
"focus": -0.29520668458161897,
@@ -535,50 +516,50 @@
"gap": 2.4489688039538677,
"fixedPoint": null
},
"lastCommittedPoint": null,
"startArrowhead": "arrow",
"endArrowhead": "arrow",
"elbowed": false
},
{
"id": "5dcU1IErPCDiUG3gflg8R",
"type": "arrow",
"x": 830.1001802364694,
"y": -0.5385166255382927,
"width": 188.17952290562857,
"height": 239.22427486491006,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"frameId": null,
"index": "aO",
"roundness": {
"type": 2
},
"seed": 2106058986,
"version": 921,
"versionNonce": 1335502326,
"isDeleted": false,
"boundElements": null,
"updated": 1726489120258,
"link": null,
"locked": false,
"points": [
[
0,
0
],
[
188.17952290562857,
239.22427486491006
199.39664159505958,
-244.9843279773636
]
],
"lastCommittedPoint": null,
"elbowed": false
},
{
"type": "arrow",
"version": 994,
"versionNonce": 1236482129,
"index": "aO",
"isDeleted": false,
"id": "5dcU1IErPCDiUG3gflg8R",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 830.1001802364694,
"y": -0.5385166255382927,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 188.17952290562857,
"height": 239.22427486491006,
"seed": 2106058986,
"groupIds": [],
"frameId": null,
"roundness": {
"type": 2
},
"boundElements": [],
"updated": 1726523088164,
"link": null,
"locked": false,
"startBinding": {
"elementId": "R4QUoIsp_Y1_gsH3uowyA",
"focus": 0.23329021524550242,
@@ -591,40 +572,51 @@
"gap": 9.491520721779693,
"fixedPoint": null
},
"lastCommittedPoint": null,
"startArrowhead": "arrow",
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
188.17952290562857,
239.22427486491006
]
],
"elbowed": false
},
{
"id": "lS9tbqIzGDn_EHnkA1-z9",
"type": "text",
"x": 980.6673500907636,
"y": 625.9948603740997,
"width": 83.75991821289062,
"height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 201,
"versionNonce": 1806017514,
"index": "aP",
"isDeleted": false,
"id": "lS9tbqIzGDn_EHnkA1-z9",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 980.6673500907636,
"y": 625.9948603740997,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 83.75991821289062,
"height": 50,
"seed": 1098959798,
"groupIds": [],
"frameId": null,
"index": "aP",
"roundness": null,
"seed": 1098959798,
"version": 201,
"versionNonce": 1806017514,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726489102346,
"link": null,
"locked": false,
"text": "Services:\n- Server",
"fontSize": 20,
"fontFamily": 5,
"text": "Services:\n- Server",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
@@ -670,30 +662,30 @@
"lineHeight": 1.25
},
{
"id": "pglywLWx0DKRfK57PIrUI",
"type": "ellipse",
"x": 880.0025282056731,
"y": 249.22675692415476,
"width": 285.84476989684487,
"height": 58.423940951345934,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 793,
"versionNonce": 569869290,
"index": "aS",
"isDeleted": false,
"id": "pglywLWx0DKRfK57PIrUI",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 880.0025282056731,
"y": 249.22675692415476,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 285.84476989684487,
"height": 58.423940951345934,
"seed": 1773150518,
"groupIds": [],
"frameId": null,
"index": "aS",
"roundness": {
"type": 2
},
"seed": 1773150518,
"version": 793,
"versionNonce": 569869290,
"isDeleted": false,
"boundElements": [
{
"type": "text",
@@ -713,35 +705,35 @@
"locked": false
},
{
"id": "-iVMi_RkcWUQIt6Z2Mlrh",
"type": "text",
"x": 936.4035939616971,
"y": 265.78274498465817,
"width": 172.91986322402954,
"height": 25,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 752,
"versionNonce": 748078710,
"index": "aSV",
"isDeleted": false,
"id": "-iVMi_RkcWUQIt6Z2Mlrh",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 936.4035939616971,
"y": 265.78274498465817,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 172.91986322402954,
"height": 25,
"seed": 1414430634,
"groupIds": [],
"frameId": null,
"index": "aSV",
"roundness": null,
"seed": 1414430634,
"version": 752,
"versionNonce": 748078710,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726489062551,
"link": null,
"locked": false,
"text": "backup.kibo.money",
"fontSize": 20,
"fontFamily": 5,
"text": "backup.kibo.money",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "pglywLWx0DKRfK57PIrUI",
@@ -793,35 +785,35 @@
"locked": false
},
{
"id": "L2XYk3PmFoutUXTAiwF_e",
"type": "text",
"x": 407.4253380048505,
"y": 266.11890019829514,
"width": 102.21993869543076,
"height": 25,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 450,
"versionNonce": 1042450358,
"index": "aUV",
"isDeleted": false,
"id": "L2XYk3PmFoutUXTAiwF_e",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 407.4253380048505,
"y": 266.11890019829514,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 102.21993869543076,
"height": 25,
"seed": 1196969142,
"groupIds": [],
"frameId": null,
"index": "aUV",
"roundness": null,
"seed": 1196969142,
"version": 450,
"versionNonce": 1042450358,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726489062551,
"link": null,
"locked": false,
"text": "kibo.money",
"fontSize": 20,
"fontFamily": 5,
"text": "kibo.money",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "q5zgtaduyEFWvWtLqdo4u",
@@ -830,28 +822,28 @@
"lineHeight": 1.25
},
{
"id": "-1w44Xvh1ZmtarGuufckU",
"type": "arrow",
"x": 458.32304516667847,
"y": 354.8010802865273,
"width": 0.17852313722704594,
"height": 175.64875971698473,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 446,
"versionNonce": 716143722,
"index": "aW",
"isDeleted": false,
"id": "-1w44Xvh1ZmtarGuufckU",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 458.32304516667847,
"y": 354.8010802865273,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 0.17852313722704594,
"height": 175.64875971698473,
"seed": 1204452650,
"groupIds": [],
"frameId": null,
"index": "aW",
"roundness": null,
"seed": 1204452650,
"version": 446,
"versionNonce": 716143722,
"isDeleted": false,
"boundElements": [
{
"type": "text",
@@ -861,17 +853,6 @@
"updated": 1726495617857,
"link": null,
"locked": false,
"points": [
[
0,
0
],
[
-0.17852313722704594,
175.64875971698473
]
],
"lastCommittedPoint": null,
"startBinding": {
"elementId": "KDdwlG7bsCvMQxoGRy8Xc",
"focus": 0.6301546827835128,
@@ -884,40 +865,51 @@
"gap": 2.8605229475869627,
"fixedPoint": null
},
"lastCommittedPoint": null,
"startArrowhead": "arrow",
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
-0.17852313722704594,
175.64875971698473
]
],
"elbowed": false
},
{
"id": "6sYDgHoTWAbEIl_FWrDuW",
"type": "text",
"x": 399.3979196785064,
"y": 417.0359387414294,
"width": 123.13990783691406,
"height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 5,
"versionNonce": 412947894,
"index": "aX",
"isDeleted": false,
"id": "6sYDgHoTWAbEIl_FWrDuW",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 399.3979196785064,
"y": 417.0359387414294,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 123.13990783691406,
"height": 50,
"seed": 655331882,
"groupIds": [],
"frameId": null,
"index": "aX",
"roundness": null,
"seed": 655331882,
"version": 5,
"versionNonce": 412947894,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726489073730,
"link": null,
"locked": false,
"text": "Tunnel\n(cloudflared)",
"fontSize": 20,
"fontFamily": 5,
"text": "Tunnel\n(cloudflared)",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "-1w44Xvh1ZmtarGuufckU",
@@ -926,28 +918,28 @@
"lineHeight": 1.25
},
{
"id": "gaJmg3DF-UOKWKTiDcUQS",
"type": "arrow",
"x": 1023.4143216413406,
"y": 356.5618164758373,
"width": 0.6658822477554622,
"height": 160.10179451385454,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 594,
"versionNonce": 1714504106,
"index": "aY",
"isDeleted": false,
"id": "gaJmg3DF-UOKWKTiDcUQS",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 1023.4143216413406,
"y": 356.5618164758373,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 0.6658822477554622,
"height": 160.10179451385454,
"seed": 818854890,
"groupIds": [],
"frameId": null,
"index": "aY",
"roundness": null,
"seed": 818854890,
"version": 594,
"versionNonce": 1714504106,
"isDeleted": false,
"boundElements": [
{
"type": "text",
@@ -957,17 +949,6 @@
"updated": 1726495617857,
"link": null,
"locked": false,
"points": [
[
0,
0
],
[
-0.6658822477554622,
160.10179451385454
]
],
"lastCommittedPoint": null,
"startBinding": {
"elementId": "KDdwlG7bsCvMQxoGRy8Xc",
"focus": -0.6340885693917432,
@@ -980,40 +961,51 @@
"gap": 16.71544096114612,
"fixedPoint": null
},
"lastCommittedPoint": null,
"startArrowhead": "arrow",
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
-0.6658822477554622,
160.10179451385454
]
],
"elbowed": false
},
{
"id": "uTkD7W1DyHBhxilhBEtJv",
"type": "text",
"x": 949.6087413031642,
"y": 419.85938650996854,
"width": 123.13990783691406,
"height": 50,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 5,
"versionNonce": 1065203830,
"index": "aZ",
"isDeleted": false,
"id": "uTkD7W1DyHBhxilhBEtJv",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 949.6087413031642,
"y": 419.85938650996854,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 123.13990783691406,
"height": 50,
"seed": 477996650,
"groupIds": [],
"frameId": null,
"index": "aZ",
"roundness": null,
"seed": 477996650,
"version": 5,
"versionNonce": 1065203830,
"isDeleted": false,
"boundElements": null,
"boundElements": [],
"updated": 1726489079014,
"link": null,
"locked": false,
"text": "Tunnel\n(cloudflared)",
"fontSize": 20,
"fontFamily": 5,
"text": "Tunnel\n(cloudflared)",
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "gaJmg3DF-UOKWKTiDcUQS",
@@ -1022,35 +1014,35 @@
"lineHeight": 1.25
},
{
"id": "l00BoaAvHhgy_wRaOndRf",
"type": "text",
"x": 698.1576166043603,
"y": 12.645887676558857,
"width": 83.77993774414062,
"height": 25,
"angle": 0,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"version": 166,
"versionNonce": 1379200287,
"index": "aa",
"isDeleted": false,
"id": "l00BoaAvHhgy_wRaOndRf",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": 698.1576166043603,
"y": 12.645887676558857,
"strokeColor": "#1e1e1e",
"backgroundColor": "transparent",
"width": 83.77993774414062,
"height": 25,
"seed": 1234467574,
"groupIds": [],
"frameId": null,
"index": "aa",
"roundness": null,
"seed": 1234467574,
"version": 95,
"versionNonce": 1587610794,
"isDeleted": false,
"boundElements": null,
"updated": 1726489133658,
"boundElements": [],
"updated": 1726523088164,
"link": null,
"locked": false,
"text": "Internet",
"fontSize": 20,
"fontFamily": 5,
"text": "Internet",
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

+31 -5
View File
@@ -19,8 +19,30 @@ self.addEventListener("install", (_event) => {
]);
})
);
// @ts-ignore
self.skipWaiting();
});
/**
* @param {Response | undefined} cachedResponse
* @param {Response | undefined} badResponse
*/
function pickCorrectResponse(cachedResponse, badResponse) {
if (cachedResponse) {
return cachedResponse;
} else {
return caches
.match("/")
.then((response) => {
return response ?? badResponse;
})
.catch(() => {
return badResponse;
});
}
}
self.addEventListener("fetch", (_event) => {
const event = /** @type {any} */ (_event);
@@ -29,22 +51,26 @@ self.addEventListener("fetch", (_event) => {
const { url, method } = request;
event.respondWith(
caches.match(request).then((cache) => {
caches.match(request).then((cachedResponse) => {
return fetch(request)
.then((response) => {
// @ts-ignore
if (url.includes("/api/")) {
return response;
}
return caches.open(version).then((cache) => {
if (method === "GET" && response.status === 200) {
cache.put(request, response.clone());
if (response.status === 200) {
if (method === "GET") {
cache.put(request, response.clone());
}
return response;
}
return response;
return pickCorrectResponse(cachedResponse, response);
});
})
.catch(() => {
return cache;
return pickCorrectResponse(cachedResponse, undefined);
});
})
);
+3 -3
View File
File diff suppressed because one or more lines are too long