Skip to content

Commit

Permalink
enable PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-3 committed Aug 23, 2024
1 parent 596e420 commit 08ecc55
Show file tree
Hide file tree
Showing 20 changed files with 200 additions and 65 deletions.
1 change: 1 addition & 0 deletions dist/icons/leptos_sphere.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/scrt-black-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/scrt-black-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions dist/icons/scrt-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/images/screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/images/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />


<script type="module" nonce="wqUNuuG7dQnIzB46WPcqvA==">
import init, * as bindings from 'https://kent-3.github.io/secret-leptos/secret-leptos-b67d04ba96eed35a.js';
const wasm = await init('https://kent-3.github.io/secret-leptos/secret-leptos-b67d04ba96eed35a_bg.wasm');



<script type="module" nonce="i7PTRZqDP/P2tMlMEgI5vA==">
import init, * as bindings from 'https://kent-3.github.io/secret-leptos/secret-leptos-be051fb97ba0dfaf.js';
const wasm = await init('https://kent-3.github.io/secret-leptos/secret-leptos-be051fb97ba0dfaf_bg.wasm');


window.wasmBindings = bindings;
Expand All @@ -20,6 +23,8 @@
<link rel="icon" href="https://kent-3.github.io/secret-leptos/favicon-e9cbd8f50cc65bf2.ico" integrity="sha384&#x2D;YobgLXwtz0GhXVUTHml49p32guapVFlEG8UpQdDVN3kekOqkQi&#x2B;qSXEpwp&#x2B;yM4BW"/>
<link rel="stylesheet" href="https://kent-3.github.io/secret-leptos/input-19d3d6031e6224f1.css" integrity="sha384&#x2D;Llf&#x2F;1z3pS30ykImra&#x2F;t6OnhoWltBvHrJog4vWANEoBZhLszMWX24fL&#x2B;f9mlg3zE3"/>

<link rel="manifest" href="/manifest.json" />

<script>
function checkResourcesLoaded() {
if (window.myWasmIsReady) {
Expand All @@ -39,8 +44,8 @@
});
</script>

<link rel="modulepreload" href="https://kent-3.github.io/secret-leptos/secret-leptos-b67d04ba96eed35a.js" crossorigin=anonymous integrity="sha384-65Nv+GmXllwlTYiUtevqIUxk+ChiYpJNCL36g+394KBFQoX1pwzHhdRcbex7GJIy">
<link rel="preload" href="https://kent-3.github.io/secret-leptos/secret-leptos-b67d04ba96eed35a_bg.wasm" crossorigin=anonymous integrity="sha384-CRTsd5Rln6mwJu3Fg0PKYsLB1PbwI5y1NJ6Ph/7VKD2dnOxY64Dw/z3NVL0Aixx7" as="fetch" type="application/wasm"></head>
<link rel="modulepreload" href="https://kent-3.github.io/secret-leptos/secret-leptos-be051fb97ba0dfaf.js" crossorigin=anonymous integrity="sha384-85BjiUovOdevNgPeFoB/b00Tl3k5BjEO8BVxGK8idAk1lt0cis1enjXPbvToeVQO">
<link rel="preload" href="https://kent-3.github.io/secret-leptos/secret-leptos-be051fb97ba0dfaf_bg.wasm" crossorigin=anonymous integrity="sha384-UmRJ2zLzXJ7WAUyzE1evfQ/Z4xwxHdhes33hg9uaDxd6zxmwDdfc7xGKRaPTP6IZ" as="fetch" type="application/wasm"></head>

<style>
.spinner {
Expand Down
43 changes: 43 additions & 0 deletions dist/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"short_name": "sLeptos",
"name": "Secret Leptos",
"icons": [
{
"src": "/icons/scrt-black.svg",
"type": "image/svg+xml",
"sizes": "148x148",
"purpose": "any"
},
{
"src": "/icons/scrt-black-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/icons/scrt-black-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"id": "/secret-leptos",
"start_url": "/",
"background_color": "#171717",
"display": "standalone",
"scope": "/",
"theme_color": "#000000",
"description": "ho ho ho",
"screenshots": [
{
"src": "/images/screenshot2.png",
"type": "image/png",
"sizes": "540x720",
"form_factor": "narrow"
},
{
"src": "/images/screenshot1.png",
"type": "image/png",
"sizes": "720x540",
"form_factor": "wide"
}
]
}
Binary file removed dist/secret-leptos-b67d04ba96eed35a_bg.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ function addHeapObject(obj) {
return idx;
}

function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}

function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}

const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );

if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
Expand All @@ -35,18 +47,6 @@ function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
}

function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}

function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}

let WASM_VECTOR_LEN = 0;

const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
Expand Down Expand Up @@ -257,7 +257,7 @@ function getArrayJsValueFromWasm0(ptr, len) {
}
return result;
}
function __wbg_adapter_134(arg0, arg1, arg2, arg3) {
function __wbg_adapter_136(arg0, arg1, arg2, arg3) {
wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}

Expand Down Expand Up @@ -447,6 +447,9 @@ function __wbg_get_imports() {
imports.wbg.__wbg_remove_5b68b70c39041e2a = function(arg0) {
getObject(arg0).remove();
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
Expand Down Expand Up @@ -476,6 +479,13 @@ function __wbg_get_imports() {
imports.wbg.__wbg_close_1a7c6f85879ea3c4 = function(arg0) {
getObject(arg0).close();
};
imports.wbg.__wbg_getEnigmaUtils_43f42e9235e0913c = function(arg0, arg1) {
const ret = window.keplr.getEnigmaUtils(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_log_b103404cc5920657 = function(arg0) {
console.log(getObject(arg0));
};
imports.wbg.__wbg_preventDefault_c55d86c27b2dfa6e = function(arg0) {
getObject(arg0).preventDefault();
};
Expand All @@ -486,13 +496,6 @@ function __wbg_get_imports() {
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
imports.wbg.__wbg_getEnigmaUtils_43f42e9235e0913c = function(arg0, arg1) {
const ret = window.keplr.getEnigmaUtils(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_log_b103404cc5920657 = function(arg0) {
console.log(getObject(arg0));
};
imports.wbg.__wbg_body_b3bb488e8e54bf4b = function(arg0) {
const ret = getObject(arg0).body;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
Expand All @@ -519,9 +522,6 @@ function __wbg_get_imports() {
wasm.__wbindgen_export_5(deferred0_0, deferred0_1, 1);
}
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbindgen_is_object = function(arg0) {
const val = getObject(arg0);
const ret = typeof(val) === 'object' && val !== null;
Expand Down Expand Up @@ -830,22 +830,6 @@ function __wbg_get_imports() {
imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {
getObject(arg0).randomFillSync(takeObject(arg1));
}, arguments) };
imports.wbg.__wbg_getSecret20ViewingKey_ebe9329eaba1f61c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = window.keplr.getSecret20ViewingKey(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_message_e18bae0a0e2c097a = function(arg0) {
const ret = getObject(arg0).message;
return addHeapObject(ret);
};
imports.wbg.__wbg_getKey_8255541c6425d853 = function() { return handleError(function (arg0, arg1) {
const ret = window.keplr.getKey(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
const ret = getObject(arg0)[getObject(arg1)];
return addHeapObject(ret);
};
imports.wbg.__wbg_isSafeInteger_7f1ed56200d90674 = function(arg0) {
const ret = Number.isSafeInteger(getObject(arg0));
return ret;
Expand All @@ -858,6 +842,22 @@ function __wbg_get_imports() {
const ret = getObject(arg0) in getObject(arg1);
return ret;
};
imports.wbg.__wbg_getKey_8255541c6425d853 = function() { return handleError(function (arg0, arg1) {
const ret = window.keplr.getKey(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
const ret = getObject(arg0)[getObject(arg1)];
return addHeapObject(ret);
};
imports.wbg.__wbg_message_e18bae0a0e2c097a = function(arg0) {
const ret = getObject(arg0).message;
return addHeapObject(ret);
};
imports.wbg.__wbg_getSecret20ViewingKey_ebe9329eaba1f61c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = window.keplr.getSecret20ViewingKey(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_enable_70f888566a8088b5 = function() { return handleError(function (arg0, arg1) {
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
wasm.__wbindgen_export_5(arg0, arg1 * 4, 4);
Expand Down Expand Up @@ -902,6 +902,10 @@ function __wbg_get_imports() {
const ret = Array.from(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_entries_7a0e06255456ebcd = function(arg0) {
const ret = Object.entries(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbindgen_is_null = function(arg0) {
const ret = getObject(arg0) === null;
return ret;
Expand Down Expand Up @@ -1176,7 +1180,7 @@ function __wbg_get_imports() {
const a = state0.a;
state0.a = 0;
try {
return __wbg_adapter_134(a, state0.b, arg0, arg1);
return __wbg_adapter_136(a, state0.b, arg0, arg1);
} finally {
state0.a = a;
}
Expand Down Expand Up @@ -1259,16 +1263,16 @@ function __wbg_get_imports() {
imports.wbg.__wbg_alert_c1d5ffe256491b29 = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).alert(getStringFromWasm0(arg1, arg2));
}, arguments) };
imports.wbg.__wbindgen_closure_wrapper2658 = function(arg0, arg1, arg2) {
const ret = makeClosure(arg0, arg1, 173, __wbg_adapter_46);
imports.wbg.__wbindgen_closure_wrapper2667 = function(arg0, arg1, arg2) {
const ret = makeClosure(arg0, arg1, 174, __wbg_adapter_46);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper2664 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_49);
imports.wbg.__wbindgen_closure_wrapper2673 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 390, __wbg_adapter_49);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper4258 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 416, __wbg_adapter_49);
imports.wbg.__wbindgen_closure_wrapper4276 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 419, __wbg_adapter_49);
return addHeapObject(ret);
};

Expand Down
Binary file added dist/secret-leptos-be051fb97ba0dfaf_bg.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions icons/leptos_sphere.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/scrt-black-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/scrt-black-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions icons/scrt-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link data-trunk rel="copy-dir" href="/icons" />
<link data-trunk rel="copy-dir" href="/images" />
<link data-trunk rel="copy-file" href="/manifest.json" />
<link data-trunk rel="rust" data-wasm-opt="z" />
<link data-trunk rel="icon" type="image/ico" href="public/favicon.ico" />
<link data-trunk rel="tailwind-css" href="input.css" />

<link rel="manifest" href="/manifest.json" />

<script>
function checkResourcesLoaded() {
if (window.myWasmIsReady) {
Expand Down
43 changes: 43 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"short_name": "sLeptos",
"name": "Secret Leptos",
"icons": [
{
"src": "/icons/scrt-black.svg",
"type": "image/svg+xml",
"sizes": "148x148",
"purpose": "any"
},
{
"src": "/icons/scrt-black-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/icons/scrt-black-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"id": "/secret-leptos",
"start_url": "/",
"background_color": "#171717",
"display": "standalone",
"scope": "/",
"theme_color": "#000000",
"description": "ho ho ho",
"screenshots": [
{
"src": "/images/screenshot2.png",
"type": "image/png",
"sizes": "540x720",
"form_factor": "narrow"
},
{
"src": "/images/screenshot1.png",
"type": "image/png",
"sizes": "720x540",
"form_factor": "wide"
}
]
}
Loading

0 comments on commit 08ecc55

Please sign in to comment.