fix env, sw, pwa

This commit is contained in:
Tom (plebeius.eth)
2025-05-22 17:42:04 +02:00
parent facd20d4c2
commit 0a5f868747
11 changed files with 56 additions and 8 deletions
+3 -4
View File
@@ -2,12 +2,11 @@ import { useTranslation } from 'react-i18next';
import packageJson from '../../../package.json';
const { version } = packageJson;
const commitRef = process.env.VITE_COMMIT_REF;
const isElectron = window.isElectron === true;
const commitRef = import.meta.env.VITE_COMMIT_REF;
const isElectron = window.electronApi?.isElectron === true;
const Version = () => {
const { t } = useTranslation();
return (
<>
<a
@@ -15,7 +14,7 @@ const Version = () => {
target='_blank'
rel='noopener noreferrer'
>
plebchan v{commitRef ? `${version}-dev (#${commitRef.slice(0, 7)})` : version}
v{commitRef ? `${version}#${commitRef.slice(0, 7)}` : version}
</a>
{isElectron && (
<>