mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-14 06:58:00 +00:00
test release
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "life-trinket",
|
"name": "life-trinket",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.5.4",
|
"version": "0.5.41",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=18",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type SettingsModalProps = {
|
|||||||
export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
||||||
const { settings, setSettings, isPWA } = useGlobalSettings();
|
const { settings, setSettings, isPWA } = useGlobalSettings();
|
||||||
const [isLatestVersion, setIsLatestVersion] = useState(false);
|
const [isLatestVersion, setIsLatestVersion] = useState(false);
|
||||||
const newVersion = useRef<string | undefined>(undefined);
|
const [newVersion, setNewVersion] = useState<string | undefined>(undefined);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
@@ -45,13 +45,13 @@ export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
|||||||
|
|
||||||
if (!data.name) {
|
if (!data.name) {
|
||||||
setIsLatestVersion(false);
|
setIsLatestVersion(false);
|
||||||
newVersion.current = undefined;
|
setNewVersion(undefined);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @ts-expect-error is defined in vite.config.ts*/
|
/* @ts-expect-error is defined in vite.config.ts*/
|
||||||
if (data.name === APP_VERSION) {
|
if (data.name === APP_VERSION) {
|
||||||
newVersion.current = data.name;
|
setNewVersion(data.name);
|
||||||
setIsLatestVersion(true);
|
setIsLatestVersion(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -147,13 +147,13 @@ export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => {
|
|||||||
<span className="text-sm text-text-secondary">(latest)</span>
|
<span className="text-sm text-text-secondary">(latest)</span>
|
||||||
)}
|
)}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
{!isLatestVersion && newVersion.current && (
|
{!isLatestVersion && newVersion && (
|
||||||
<Paragraph className="text-text-secondary text-lg text-center">
|
<Paragraph className="text-text-secondary text-lg text-center">
|
||||||
New version ({newVersion.current}) is available!{' '}
|
New version ({newVersion}) is available!{' '}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
)}
|
)}
|
||||||
</SettingContainer>
|
</SettingContainer>
|
||||||
{!isLatestVersion && newVersion.current && (
|
{!isLatestVersion && newVersion && (
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
style={{ marginTop: '0.25rem', marginBottom: '0.25rem' }}
|
style={{ marginTop: '0.25rem', marginBottom: '0.25rem' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user