mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 15:14:35 +01:00
Remove offline mode check
Forgot offline mode wasn't merged
This commit is contained in:
@@ -182,35 +182,33 @@ export class Main extends React.Component<IProps, IState> {
|
|||||||
// Update launch args to allow launching when updating from old versions
|
// Update launch args to allow launching when updating from old versions
|
||||||
await setConfigOption('launch_args', await getConfigOption('launch_args'))
|
await setConfigOption('launch_args', await getConfigOption('launch_args'))
|
||||||
|
|
||||||
if (!(await getConfigOption('offline_mode'))) {
|
// Get latest version and compare to this version
|
||||||
// Get latest version and compare to this version
|
const latestVersion: {
|
||||||
const latestVersion: {
|
tag_name: string
|
||||||
tag_name: string
|
link: string
|
||||||
link: string
|
} = await invoke('get_latest_release')
|
||||||
} = await invoke('get_latest_release')
|
const tagName = latestVersion?.tag_name.replace(/[^\d.]/g, '')
|
||||||
const tagName = latestVersion?.tag_name.replace(/[^\d.]/g, '')
|
|
||||||
|
|
||||||
// Check if tagName is different than current version
|
// Check if tagName is different than current version
|
||||||
if (tagName && tagName !== (await getVersion())) {
|
if (tagName && tagName !== (await getVersion())) {
|
||||||
// Display notification of new release
|
// Display notification of new release
|
||||||
|
this.setState({
|
||||||
|
notification: (
|
||||||
|
<>
|
||||||
|
Cultivation{' '}
|
||||||
|
<a href="#" onClick={() => invoke('open_in_browser', { url: latestVersion.link })}>
|
||||||
|
{latestVersion?.tag_name}
|
||||||
|
</a>{' '}
|
||||||
|
is now available!
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
})
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
notification: (
|
notification: null,
|
||||||
<>
|
|
||||||
Cultivation{' '}
|
|
||||||
<a href="#" onClick={() => invoke('open_in_browser', { url: latestVersion.link })}>
|
|
||||||
{latestVersion?.tag_name}
|
|
||||||
</a>{' '}
|
|
||||||
is now available!
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
})
|
})
|
||||||
|
}, 6000)
|
||||||
setTimeout(() => {
|
|
||||||
this.setState({
|
|
||||||
notification: null,
|
|
||||||
})
|
|
||||||
}, 6000)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Period check to only show progress bar when downloading files
|
// Period check to only show progress bar when downloading files
|
||||||
|
|||||||
Reference in New Issue
Block a user