mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-19 08:22:53 +00:00
feat: version and issue url
This commit is contained in:
3
src/env.d.ts
vendored
3
src/env.d.ts
vendored
@@ -12,3 +12,6 @@ interface ImportMetaEnv {
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
|
||||
declare const HOMEPAGE_URL: string
|
||||
declare const BUGS_URL: string
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
import {loadLocale} from "../i18n/i18n-util.sync"
|
||||
import {detectLocale} from "../i18n/i18n-util"
|
||||
import type {Locales} from "../i18n/i18n-types"
|
||||
import Footer from "./Footer.svelte"
|
||||
|
||||
const locale = ((browser && localStorage.getItem("locale")) as Locales) || detectLocale()
|
||||
loadLocale(locale)
|
||||
@@ -68,6 +69,8 @@
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
<Footer />
|
||||
|
||||
{#if import.meta.env.TAURI_FAMILY === undefined && browser && !("serial" in navigator)}
|
||||
<BrowserWarning />
|
||||
{/if}
|
||||
|
||||
43
src/routes/Footer.svelte
Normal file
43
src/routes/Footer.svelte
Normal file
@@ -0,0 +1,43 @@
|
||||
<script>
|
||||
import {version} from "$app/environment"
|
||||
</script>
|
||||
|
||||
<footer>
|
||||
<ul>
|
||||
<li>
|
||||
<a href={HOMEPAGE_URL} rel="noreferrer" target="_blank"><span class="icon">commit</span> v{version}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={BUGS_URL} rel="noreferrer" target="_blank"
|
||||
><span class="icon">bug_report</span> File an issue</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
|
||||
<style>
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
font-size: 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user