feat(webui): add per-route titles & favicon (#245)

This commit is contained in:
Sainan 2024-05-30 13:32:58 +02:00 committed by GitHub
parent bc21a4d282
commit ef96946fe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -28,4 +28,9 @@ webuiRouter.get("/webui/mods", (_req, res) => {
// Serve static files
webuiRouter.use("/webui", express.static(path.join(rootDir, "static/webui")));
// Serve favicon
webuiRouter.get("/favicon.ico", (_req, res) => {
res.sendFile(path.join(rootDir, "static/fixed_responses/favicon.ico"));
});
export { webuiRouter };

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -65,7 +65,7 @@
Note: Changes made here will only be reflected in-game when the game re-downloads your inventory.
Visiting the navigation should be the easiest way to trigger that.
</p>
<div data-route="/webui/">
<div data-route="/webui/" data-title="Login | OpenWF WebUI">
<p>Login using your OpenWF account credentials.</p>
<form onsubmit="doLogin();return false;">
<label for="email">Email address</label>
@ -77,7 +77,7 @@
<button class="btn btn-primary" type="submit">Login</button>
</form>
</div>
<div data-route="/webui/inventory">
<div data-route="/webui/inventory" data-title="Inventory | OpenWF WebUI">
<div class="card mb-4">
<h5 class="card-header">Add Items</h5>
<form class="card-body input-group" onsubmit="doAcquireMiscItems();return false;">
@ -121,7 +121,7 @@
</div>
</div>
</div>
<div data-route="/webui/mods">
<div data-route="/webui/mods" data-title="Mods | OpenWF WebUI">
<div class="card mb-4">
<h5 class="card-header">Add Riven</h5>
<form class="card-body" onsubmit="doAcquireRiven();return false;">