Add short commit hash in about popup for macOS build

This commit is contained in:
Sebastian Martinez
2025-05-05 11:21:53 +02:00
parent f0ef087203
commit 865497ce38
5 changed files with 61 additions and 2 deletions
+18
View File
@@ -1,8 +1,12 @@
<script lang="ts">
import type { ComponentProps } from "svelte";
import { onMount } from "svelte";
import { invoke } from "@app/lib/invoke";
import AnnounceSwitch from "./AnnounceSwitch.svelte";
import Border from "./Border.svelte";
import CopyableId from "./CopyableId.svelte";
import FontSizeSwitch from "./FontSizeSwitch.svelte";
import Icon from "./Icon.svelte";
import NakedButton from "./NakedButton.svelte";
@@ -15,6 +19,12 @@
popoverProps: Partial<ComponentProps<typeof Popover>>;
}
let version = $state("");
onMount(async () => {
version = await invoke<string>("version");
});
const {
compact = true,
styleHeight = "2.5rem",
@@ -39,6 +49,14 @@
style:align-items="flex-start"
style:gap="1rem"
style:width="100%">
<div
class="global-flex"
style:justify-content="space-between"
style:width="100%"
style:min-height="2rem">
Version <CopyableId id={version} />
</div>
<div
class="global-flex"
style:justify-content="space-between"