show version & bump

This commit is contained in:
Will Chen
2025-04-15 00:22:19 -07:00
parent caa9a1566e
commit 6b0df21a05
5 changed files with 40 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ export default function SettingsPage() {
const [nodeVersion, setNodeVersion] = useState<string | null>(null);
const [npmVersion, setNpmVersion] = useState<string | null>(null);
const [downloadClicked, setDownloadClicked] = useState(false);
const [appVersion, setAppVersion] = useState<string | null>(null);
useEffect(() => {
const checkNode = async () => {
@@ -40,6 +41,17 @@ export default function SettingsPage() {
}
};
checkNode();
// Fetch app version
const fetchVersion = async () => {
try {
const version = await IpcClient.getInstance().getAppVersion();
setAppVersion(version);
} catch (error) {
setAppVersion(null);
}
};
fetchVersion();
}, []);
const handleResetEverything = async () => {
@@ -123,6 +135,14 @@ export default function SettingsPage() {
Settings
</h1>
{/* App Version Section */}
<div className="mb-6 flex items-center text-sm text-gray-500 dark:text-gray-400">
<span className="mr-2 font-medium">App Version:</span>
<span className="bg-gray-100 dark:bg-gray-700 px-2 py-0.5 rounded text-gray-800 dark:text-gray-200 font-mono">
{appVersion ? appVersion : "-"}
</span>
</div>
<div className="space-y-6">
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-sm p-6">
<h2 className="text-lg font-medium text-gray-900 dark:text-white mb-4">