Skip to content

Commit 5c41040

Browse files
committed
make installable as PWA
1 parent 97d0ecb commit 5c41040

File tree

9 files changed

+41
-2
lines changed

9 files changed

+41
-2
lines changed

dist/webpage/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<title>Web RARS</title>
55
<link rel="stylesheet" href="./style.css" />
66
<script type="module" src="./index.js"></script>
7+
<link rel="manifest" href="/manifest.json" />
78
</head>
89
<body>
910
<div class="flexttb" style="height: 100%">

dist/webpage/logo.webp

1 KB
Loading

dist/webpage/manifest.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "WebRARS",
3+
"icons": [
4+
{
5+
"src": "/logo.webp",
6+
"sizes": "512x512"
7+
}
8+
],
9+
"categories": ["devtools", "education"],
10+
"description": "A web Risc-V assembler, linker, editor, and emulator.",
11+
"launch_handler": {
12+
"client_mode": "focus-existing"
13+
},
14+
"start_url": "/",
15+
"display": "standalone",
16+
"theme_color": "#05050a",
17+
"offline_enabled": true
18+
}

dist/webpage/utils/utils.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/webpage/utils/utils.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/webpage/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<title>Web RARS</title>
55
<link rel="stylesheet" href="./style.css" />
66
<script type="module" src="./index.js"></script>
7+
<link rel="manifest" href="/manifest.json" />
78
</head>
89
<body>
910
<div class="flexttb" style="height: 100%">

src/webpage/logo.webp

1 KB
Loading

src/webpage/manifest.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "WebRARS",
3+
"icons": [
4+
{
5+
"src": "/logo.webp",
6+
"sizes": "512x512"
7+
}
8+
],
9+
"categories": ["devtools", "education"],
10+
"description": "A web Risc-V assembler, linker, editor, and emulator.",
11+
"launch_handler": {
12+
"client_mode": "focus-existing"
13+
},
14+
"start_url": "/",
15+
"display": "standalone",
16+
"theme_color": "#05050a",
17+
"offline_enabled": true
18+
}

src/webpage/utils/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class Directory {
1818
static async createHome(): Promise<Directory> {
1919
navigator.storage.persist();
2020
const home = new Directory(await navigator.storage.getDirectory());
21+
navigator.storage.persist().then(console.log);
2122
return home;
2223
}
2324
async *getAllInDir() {

0 commit comments

Comments
 (0)