about summary refs log tree commit diff
path: root/MatrixUtils.Web/wwwroot/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixUtils.Web/wwwroot/index.html')
-rw-r--r--MatrixUtils.Web/wwwroot/index.html51
1 files changed, 30 insertions, 21 deletions
diff --git a/MatrixUtils.Web/wwwroot/index.html b/MatrixUtils.Web/wwwroot/index.html

index 5182193..fa233b3 100644 --- a/MatrixUtils.Web/wwwroot/index.html +++ b/MatrixUtils.Web/wwwroot/index.html
@@ -3,42 +3,35 @@ <head> <meta charset="utf-8"/> - <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <title>MatrixUtils.Web</title> <base href="/"/> - <link href="css/bootstrap/bootstrap.min.css" rel="stylesheet"/> - <link href="css/app.css" rel="stylesheet"/> + <link rel="preload" id="webassembly"/> + <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css"/> + <link rel="stylesheet" href="css/app.css"/> + <link rel="icon" type="image/png" href="favicon.png"/> + <link href="MatrixUtils.Web.styles.css" rel="stylesheet"/> <link rel="manifest" href="rmu.webmanifest"/> <link rel="apple-touch-icon" sizes="512x512" href="icon-512.png"/> - <link href="favicon.png" rel="icon" type="image/png"/> - <link href="MatrixUtils.Web.styles.css" rel="stylesheet"/> + <link rel="apple-touch-icon" sizes="192x192" href="icon-192.png"/> + <script type="importmap"></script> </head> <body> <div id="app"> <svg class="loading-progress"> - <circle cx="50%" cy="50%" r="40%"/> - <circle cx="50%" cy="50%" r="40%"/> + <circle r="40%" cx="50%" cy="50%"/> + <circle r="40%" cx="50%" cy="50%"/> </svg> <div class="loading-progress-text"></div> </div> <div id="blazor-error-ui"> An unhandled error has occurred. - <a class="reload" href="">Reload</a> - <a class="dismiss">🗙</a> + <a href="." class="reload">Reload</a> + <span class="dismiss">🗙</span> </div> <script> - function BlazorFocusElement(element) { - if (element == null) return; - if (element instanceof HTMLElement) { - console.log(element); - element.focus(); - } else if (element.hasOwnProperty("__internalId")) { - console.log("Element is not an HTMLElement", element); - } - } - function getWidth(element) { console.log("getWidth", element); if (element == null) return 0; @@ -57,9 +50,25 @@ height: window.innerHeight }; } + + setImageStream = async (element, imageStream) => { + if (!(element instanceof HTMLElement)) { + console.error("Element is not an HTMLElement", element); + return; + } + + const arrayBuffer = await imageStream.arrayBuffer(); + const blob = new Blob([arrayBuffer]); + const url = URL.createObjectURL(blob); + const image = document.getElementById(imageElementId); + image.onload = () => { + URL.revokeObjectURL(url); + } + image.src = url; + } </script> - <script src="_framework/blazor.webassembly.js"></script> -<!-- <script>navigator.serviceWorker.register('service-worker.js');</script>--> + <script src="_framework/blazor.webassembly#[.{fingerprint}].js"></script> + <!-- <script>navigator.serviceWorker.register('service-worker.js');</script>--> <script src="sw-registrator.js"></script> </body>