mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Fix the client version in the about modal (#315)
The client version in the about modal was hard-coded. Now, it will use the same values that powered the Electron about modal.
This commit is contained in:
@@ -6,12 +6,16 @@ import { LinkButton } from "@/app/element/linkbutton";
|
||||
import { modalsModel } from "@/app/store/modalmodel";
|
||||
import { Modal } from "./modal";
|
||||
|
||||
import { isDev } from "@/util/isdev";
|
||||
import { useState } from "react";
|
||||
import { getApi } from "../store/global";
|
||||
import "./about.less";
|
||||
|
||||
interface AboutModalProps {}
|
||||
|
||||
const AboutModal = ({}: AboutModalProps) => {
|
||||
const currentDate = new Date();
|
||||
const [details] = useState(() => getApi().getAboutModalDetails());
|
||||
|
||||
return (
|
||||
<Modal className="about-modal" onClose={() => modalsModel.popModal()}>
|
||||
@@ -25,7 +29,10 @@ const AboutModal = ({}: AboutModalProps) => {
|
||||
Built for Seamless Workflows
|
||||
</div>
|
||||
</div>
|
||||
<div className="section text-standard">Client Version 0.1.8 (20240615-002636)</div>
|
||||
<div className="section text-standard">
|
||||
Client Version {details.version} ({isDev() ? "dev-" : ""}
|
||||
{details.buildTime})
|
||||
</div>
|
||||
<div className="section">
|
||||
<LinkButton
|
||||
className="secondary solid"
|
||||
|
||||
Vendored
+6
@@ -54,6 +54,7 @@ declare global {
|
||||
getPlatform: () => NodeJS.Platform;
|
||||
getEnv: (varName: string) => string;
|
||||
getUserName: () => string;
|
||||
getAboutModalDetails: () => AboutModalDetails;
|
||||
showContextMenu: (menu?: ElectronContextMenuItem[]) => void;
|
||||
onContextMenuClick: (callback: (id: string) => void) => void;
|
||||
onNavigate: (callback: (url: string) => void) => void;
|
||||
@@ -234,6 +235,11 @@ declare global {
|
||||
}
|
||||
|
||||
type TypeAheadModalType = { [key: string]: boolean };
|
||||
|
||||
interface AboutModalDetails {
|
||||
version: string;
|
||||
buildTime: number;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user