feat: add device firmware update instructions

resolves #89
This commit is contained in:
2024-02-05 20:08:50 +01:00
parent fbc5303690
commit 046595b51f
3 changed files with 8 additions and 0 deletions

1
src/env.d.ts vendored
View File

@@ -12,6 +12,7 @@ interface ImportMetaEnv {
readonly VITE_BUGS_URL: string
readonly VITE_DOCS_URL: string
readonly VIET_LEARN_URL: string
readonly VITE_LATEST_FIRMWARE: string
}
interface ImportMeta {

View File

@@ -4,6 +4,7 @@
import {slide, fade} from "svelte/transition"
import {preference} from "$lib/preferences"
import LL from "../i18n/i18n-svelte"
import Tooltip from "$lib/components/Tooltip.svelte"
function reboot() {
$serialPort?.reboot()
@@ -51,6 +52,11 @@
<br />
Version {$serialPort.version}
</p>
{#if $serialPort.version.toString() !== import.meta.env.VITE_LATEST_FIRMWARE}
<a href="https://docs.charachorder.com/CharaChorder%20One.html#updating-the-firmware"
>Firmware Update Instructions</a
>
{/if}
<!--<button on:click={updateFirmware}>Update</button>-->
{/if}

View File

@@ -17,6 +17,7 @@ process.env.VITE_HOMEPAGE_URL = repository.url.replace(/\.git$/, "")
process.env.VITE_DOCS_URL = homepage
process.env.VITE_BUGS_URL = bugs.url
process.env.VITE_LEARN_URL = "https://www.iq-eq.io/"
process.env.VITE_LATEST_FIRMWARE = "1.1.3"
export default defineConfig({
build: {