feat: progressive web app support #48
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 108 KiB |
BIN
assets/images/icon.png
Normal file
After Width: | Height: | Size: 22 KiB |
203
assets/images/icon.svg
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 512 512"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
sodipodi:docname="icon.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#eeeeee"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#505050"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:zoom="1.1020922"
|
||||||
|
inkscape:cx="188.27826"
|
||||||
|
inkscape:cy="204.15715"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1011"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" />
|
||||||
|
<defs
|
||||||
|
id="defs1">
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="fillet_chamfer"
|
||||||
|
id="path-effect2"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
||||||
|
radius="0"
|
||||||
|
unit="px"
|
||||||
|
method="auto"
|
||||||
|
mode="F"
|
||||||
|
chamfer_steps="1"
|
||||||
|
flexible="false"
|
||||||
|
use_knot_distance="true"
|
||||||
|
apply_no_radius="true"
|
||||||
|
apply_with_radius="true"
|
||||||
|
only_selected="false"
|
||||||
|
hide_knots="false" />
|
||||||
|
<inkscape:path-effect
|
||||||
|
effect="fillet_chamfer"
|
||||||
|
id="path-effect1"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
||||||
|
radius="0"
|
||||||
|
unit="px"
|
||||||
|
method="auto"
|
||||||
|
mode="F"
|
||||||
|
chamfer_steps="1"
|
||||||
|
flexible="false"
|
||||||
|
use_knot_distance="true"
|
||||||
|
apply_no_radius="true"
|
||||||
|
apply_with_radius="true"
|
||||||
|
only_selected="false"
|
||||||
|
hide_knots="false" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:#27272a;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect1"
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
sodipodi:insensitive="true"
|
||||||
|
inkscape:label="background"
|
||||||
|
ry="128.00018"
|
||||||
|
sodipodi:type="rect"
|
||||||
|
rx="129.98714" />
|
||||||
|
<g
|
||||||
|
id="g17"
|
||||||
|
inkscape:label="logo"
|
||||||
|
transform="translate(8)">
|
||||||
|
<g
|
||||||
|
id="g8"
|
||||||
|
inkscape:label="ring">
|
||||||
|
<g
|
||||||
|
id="g7"
|
||||||
|
inkscape:label="back">
|
||||||
|
<circle
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:#d97706;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path1"
|
||||||
|
cx="224"
|
||||||
|
cy="256"
|
||||||
|
r="128"
|
||||||
|
inkscape:label="ring back" />
|
||||||
|
<rect
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-width:21.8936;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect2"
|
||||||
|
width="48"
|
||||||
|
height="288"
|
||||||
|
x="224"
|
||||||
|
y="112"
|
||||||
|
inkscape:label="rect2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g1"
|
||||||
|
transform="translate(-4.163147,-0.69235229)"
|
||||||
|
inkscape:label="front">
|
||||||
|
<circle
|
||||||
|
style="fill:#27272a;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path1-5-2"
|
||||||
|
cx="276.16315"
|
||||||
|
cy="256.69235"
|
||||||
|
r="128" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#fbbf24;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path1-5"
|
||||||
|
cx="276.16315"
|
||||||
|
cy="256.69235"
|
||||||
|
r="128" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g16"
|
||||||
|
inkscape:label="tick"
|
||||||
|
transform="translate(16.000231,-8.3918418e-5)">
|
||||||
|
<g
|
||||||
|
id="g6"
|
||||||
|
transform="rotate(45,-57.96574,415.4208)"
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||||
|
inkscape:label="back">
|
||||||
|
<rect
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect9"
|
||||||
|
width="32.000458"
|
||||||
|
height="32"
|
||||||
|
x="273.94067"
|
||||||
|
y="210.74516"
|
||||||
|
transform="rotate(-45,-57.96574,415.4208)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect8"
|
||||||
|
width="32.000458"
|
||||||
|
height="32"
|
||||||
|
x="206.05841"
|
||||||
|
y="233.37257"
|
||||||
|
transform="rotate(-45,-57.96574,415.4208)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect7"
|
||||||
|
height="16"
|
||||||
|
x="228.686"
|
||||||
|
y="285.255"
|
||||||
|
width="32"
|
||||||
|
transform="rotate(-45,-57.96574,415.4208)" />
|
||||||
|
<rect
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect5"
|
||||||
|
width="64"
|
||||||
|
height="32"
|
||||||
|
x="0"
|
||||||
|
y="100" />
|
||||||
|
<rect
|
||||||
|
style="fill:#d97706;fill-opacity:1;stroke:none;stroke-width:39.1918;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect6"
|
||||||
|
width="32"
|
||||||
|
height="96"
|
||||||
|
x="32"
|
||||||
|
y="36" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g4"
|
||||||
|
transform="rotate(45,-41.965512,454.04877)"
|
||||||
|
style="fill:#fbbf24;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||||
|
inkscape:label="front">
|
||||||
|
<rect
|
||||||
|
style="fill:#fbbf24;fill-opacity:1;stroke:none;stroke-width:32;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect3"
|
||||||
|
width="64"
|
||||||
|
height="32"
|
||||||
|
x="0"
|
||||||
|
y="100" />
|
||||||
|
<rect
|
||||||
|
style="fill:#fbbf24;fill-opacity:1;stroke:none;stroke-width:39.1918;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4"
|
||||||
|
width="32"
|
||||||
|
height="96"
|
||||||
|
x="32"
|
||||||
|
y="36" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.4 KiB |
15
assets/manifest.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|||||||
|
{
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"name": "Todo Baggins",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"short_name": "Todo Baggins",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"start_url": "/",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"display": "standalone",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"background_color": "#27272a",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"theme_color": "#27272a",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"icons": [
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
{
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"src": "/images/icon.png",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"sizes": "any",
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
"type": "image/png"
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
}
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
]
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
}
|
||||||
![]() LGTM! The web app manifest looks good. The manifest file is syntactically correct and includes the key properties. Great job! Consider adding these optional improvements:
**LGTM! The web app manifest looks good.**
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
1. Add a `description` property to provide a general description of what the web app does.
2. Instead of one icon with the `any` size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:
```json
"icons": [
{
"src": "/images/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
```
<!-- This is an auto-generated comment by CodeRabbit -->
|
@ -11,6 +11,7 @@ services:
|
|||||||
- ./Cargo.toml:/srv/app/Cargo.toml
|
- ./Cargo.toml:/srv/app/Cargo.toml
|
||||||
- ./diesel.toml:/srv/app/diesel.toml
|
- ./diesel.toml:/srv/app/diesel.toml
|
||||||
- ./Dioxus.toml:/srv/app/Dioxus.toml
|
- ./Dioxus.toml:/srv/app/Dioxus.toml
|
||||||
|
- ./index.html:/srv/app/index.html
|
||||||
- ./package.json:/srv/app/package.json
|
- ./package.json:/srv/app/package.json
|
||||||
- ./package-lock.json:/srv/app/package-lock.json
|
- ./package-lock.json:/srv/app/package-lock.json
|
||||||
restart: always
|
restart: always
|
||||||
|
24
index.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="min-h-screen">
|
||||||
|
<head>
|
||||||
|
<title>{app_title}</title>
|
||||||
|
<link rel="manifest" href="manifest.json">
|
||||||
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
{style_include}
|
||||||
|
</head>
|
||||||
|
<body class="min-h-screen">
|
||||||
|
<div id="main" class="min-h-screen"></div>
|
||||||
|
<script type="module">
|
||||||
|
import init from "/{base_path}/assets/dioxus/{app_name}.js";
|
||||||
|
|
||||||
|
init("/{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
|
||||||
|
if (wasm.__wbindgen_start == undefined) {
|
||||||
|
wasm.main();
|
||||||
|
}
|
||||||
|
});
|
||||||
![]()
Dioxus application initialization may fail due to missing build artifacts The verification process has revealed potential issues with the Dioxus application initialization:
To resolve this:
Analysis chainVerify the Dioxus application initialization. The script block on lines 16-20 initializes the Dioxus application by importing the To ensure that the Dioxus application is initialized correctly, run the following script: If the generated files are not found or the Scripts executedThe following scripts were executed for the analysis: Script:
Length of output: 267 Script:
Length of output: 745 > [!TIP]
> Codebase Verification
**Dioxus application initialization may fail due to missing build artifacts**
The verification process has revealed potential issues with the Dioxus application initialization:
1. The WebAssembly (.wasm) and JavaScript files referenced in the initialization code were not found in the project.
2. The 'assets/dioxus' directory referenced in the initialization code does not exist.
To resolve this:
- Check the Dioxus build process and ensure it's generating the required .wasm and .js files.
- Review the 'Dioxus.toml' configuration file to verify the output directory for build artifacts.
- Once the build issues are resolved, update the initialization code in 'index.html' to match the actual project structure.
<details>
<summary>Analysis chain</summary>
**Verify the Dioxus application initialization.**
The script block on lines 16-20 initializes the Dioxus application by importing the `init` function from the generated JavaScript file and calling it with the path to the WebAssembly file.
To ensure that the Dioxus application is initialized correctly, run the following script:
If the generated files are not found or the `main` function is not exported, there might be an issue with the Dioxus build process. Double-check the Dioxus configuration and ensure that the application is built correctly.
</details>
<details>
<summary>Scripts executed</summary>
The following scripts were executed for the analysis:
Script:
```shell
#!/bin/bash
# Description: Verify the Dioxus application initialization.
# Test: Search for the generated JavaScript and WebAssembly files.
# Expect: The files should exist in the `assets/dioxus` directory.
fd --type file --regex '.*\.js$|.*\.wasm$' assets/dioxus
# Test: Search for the `main` function in the generated JavaScript file.
# Expect: The `main` function should be exported from the generated JavaScript file.
rg --type js $'export function main\(' assets/dioxus
```
Length of output: 267
---
Script:
```shell
#!/bin/bash
# Description: Verify the Dioxus application structure and asset locations
# Check if 'assets' directory exists at the root level
echo "Checking for 'assets' directory:"
ls -d assets 2>/dev/null || echo "No 'assets' directory found at root level"
# Search for .js and .wasm files in the entire project
echo -e "\nSearching for .js and .wasm files:"
fd -e js -e wasm
# Look for Dioxus configuration files
echo -e "\nSearching for Dioxus configuration files:"
fd -g '*dioxus*.toml'
# Search for 'init' function call in HTML files
echo -e "\nSearching for 'init' function call in HTML files:"
rg --type html 'init\s*\(' -A 3 -B 1
```
Length of output: 745
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
</script>
|
||||||
|
{script_include}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
![]() The HTML structure looks good overall, but there are a few areas for improvement.
Here's an updated version of the code with the suggested improvements:
Make sure to replace the placeholders with actual values and include the necessary CSS and JavaScript files for the application to work as expected. Committable suggestion
**The HTML structure looks good overall, but there are a few areas for improvement.**
1. The `<html>` tag is missing the `lang` attribute, which is important for accessibility. Consider adding `lang="en"` (or the appropriate language) to the `<html>` tag.
2. The `<meta charset="UTF-8"/>` tag on line 8 is redundant since the character encoding is already specified in the `<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>` tag on line 6. Remove the redundant tag for cleaner code.
3. The script block on lines 13-21 uses placeholders like `{base_path}` and `{app_name}`. Ensure that these placeholders are properly replaced with actual values during the build process or server-side rendering.
4. The `{style_include}` and `{script_include}` placeholders on lines 9 and 22 suggest that additional styles and scripts will be included. Make sure to include the necessary CSS and JavaScript files for the application to function properly.
5. Consider adding a `<noscript>` tag to provide fallback content for users who have JavaScript disabled in their browsers.
Here's an updated version of the code with the suggested improvements:
```diff
<!DOCTYPE html>
-<html class="min-h-screen">
+<html lang="en" class="min-h-screen">
<head>
<title>{app_title}</title>
<link rel="manifest" href="manifest.json">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta charset="UTF-8"/>
{style_include}
</head>
<body class="min-h-screen">
<div id="main" class="min-h-screen"></div>
+<noscript>
+ <p>Please enable JavaScript to use this application.</p>
+</noscript>
<script type="module">
import init from "/{base_path}/assets/dioxus/{app_name}.js";
init("/{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
if (wasm.__wbindgen_start == undefined) {
wasm.main();
}
});
</script>
{script_include}
</body>
</html>
```
Make sure to replace the placeholders with actual values and include the necessary CSS and JavaScript files for the application to work as expected.
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
<!DOCTYPE html>
<html lang="en" class="min-h-screen">
<head>
<title>{app_title}</title>
<link rel="manifest" href="manifest.json">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
{style_include}
</head>
<body class="min-h-screen">
<div id="main" class="min-h-screen"></div>
<noscript>
<p>Please enable JavaScript to use this application.</p>
</noscript>
<script type="module">
import init from "/{base_path}/assets/dioxus/{app_name}.js";
init("/{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
if (wasm.__wbindgen_start == undefined) {
wasm.main();
}
});
</script>
{script_include}
</body>
</html>
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
@ -7,9 +7,4 @@
|
|||||||
/* noinspection CssInvalidAtRule */
|
/* noinspection CssInvalidAtRule */
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
html, body, #main {
|
|
||||||
/* noinspection CssInvalidAtRule */
|
|
||||||
@apply min-h-screen;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stylelint-enable */
|
/* stylelint-enable */
|
||||||
|
LGTM! The web app manifest looks good.
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
description
property to provide a general description of what the web app does.any
size value, provide multiple fixed size icon images for optimal clarity on various devices. For example:LGTM! The web app manifest looks good.
The manifest file is syntactically correct and includes the key properties. Great job!
Consider adding these optional improvements:
description
property to provide a general description of what the web app does.any
size value, provide multiple fixed size icon images for optimal clarity on various devices. For example: