mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-01 11:06:13 -04:00
feat(gui): Refer to external Github release page when download is ready (#169)
This commit is contained in:
parent
79bc8c08f1
commit
3540a029bd
1 changed files with 20 additions and 16 deletions
|
@ -11,12 +11,16 @@ import {
|
||||||
makeStyles,
|
makeStyles,
|
||||||
LinearProgressProps,
|
LinearProgressProps,
|
||||||
Box,
|
Box,
|
||||||
|
Link,
|
||||||
} from '@material-ui/core';
|
} from '@material-ui/core';
|
||||||
import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
|
import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
|
||||||
import { check, Update, DownloadEvent } from '@tauri-apps/plugin-updater';
|
import { check, Update, DownloadEvent } from '@tauri-apps/plugin-updater';
|
||||||
import { useSnackbar } from 'notistack';
|
import { useSnackbar } from 'notistack';
|
||||||
import { relaunch } from '@tauri-apps/plugin-process';
|
import { relaunch } from '@tauri-apps/plugin-process';
|
||||||
|
|
||||||
|
const GITHUB_RELEASES_URL = "https://github.com/UnstoppableSwap/core/releases";
|
||||||
|
const HOMEPAGE_URL = "https://unstoppableswap.net/";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
progress: {
|
progress: {
|
||||||
marginTop: theme.spacing(2)
|
marginTop: theme.spacing(2)
|
||||||
|
@ -116,7 +120,8 @@ export default function UpdaterDialog() {
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogContentText>
|
<DialogContentText>
|
||||||
A new version (v{availableUpdate.version}) is available. Your current version is {availableUpdate.currentVersion}.
|
A new version (v{availableUpdate.version}) is available. Your current version is {availableUpdate.currentVersion}.
|
||||||
The update will be verified using PGP signature verification to ensure authenticity.
|
The update will be verified using PGP signature verification to ensure authenticity. Alternatively, you can download the
|
||||||
|
update from <Link href={GITHUB_RELEASES_URL} target="_blank">GitHub</Link> or visit the <Link href={HOMEPAGE_URL} target="_blank">download page</Link>.
|
||||||
{availableUpdate.body && (
|
{availableUpdate.body && (
|
||||||
<>
|
<>
|
||||||
<Typography variant="h6" className={classes.releaseNotes}>
|
<Typography variant="h6" className={classes.releaseNotes}>
|
||||||
|
@ -133,8 +138,7 @@ export default function UpdaterDialog() {
|
||||||
<Box className={classes.progress}>
|
<Box className={classes.progress}>
|
||||||
<LinearProgressWithLabel
|
<LinearProgressWithLabel
|
||||||
value={progress}
|
value={progress}
|
||||||
label={`${(downloadProgress.downloadedBytes / 1024 / 1024).toFixed(1)} MB${
|
label={`${(downloadProgress.downloadedBytes / 1024 / 1024).toFixed(1)} MB${downloadProgress.contentLength
|
||||||
downloadProgress.contentLength
|
|
||||||
? ` / ${(downloadProgress.contentLength / 1024 / 1024).toFixed(1)} MB`
|
? ` / ${(downloadProgress.contentLength / 1024 / 1024).toFixed(1)} MB`
|
||||||
: ''
|
: ''
|
||||||
}`}
|
}`}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue