mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-07-31 10:38:51 -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,
|
||||
LinearProgressProps,
|
||||
Box,
|
||||
Link,
|
||||
} from '@material-ui/core';
|
||||
import SystemUpdateIcon from '@material-ui/icons/SystemUpdate';
|
||||
import { check, Update, DownloadEvent } from '@tauri-apps/plugin-updater';
|
||||
import { useSnackbar } from 'notistack';
|
||||
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) => ({
|
||||
progress: {
|
||||
marginTop: theme.spacing(2)
|
||||
|
@ -116,7 +120,8 @@ export default function UpdaterDialog() {
|
|||
<DialogContent>
|
||||
<DialogContentText>
|
||||
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 && (
|
||||
<>
|
||||
<Typography variant="h6" className={classes.releaseNotes}>
|
||||
|
@ -133,8 +138,7 @@ export default function UpdaterDialog() {
|
|||
<Box className={classes.progress}>
|
||||
<LinearProgressWithLabel
|
||||
value={progress}
|
||||
label={`${(downloadProgress.downloadedBytes / 1024 / 1024).toFixed(1)} MB${
|
||||
downloadProgress.contentLength
|
||||
label={`${(downloadProgress.downloadedBytes / 1024 / 1024).toFixed(1)} MB${downloadProgress.contentLength
|
||||
? ` / ${(downloadProgress.contentLength / 1024 / 1024).toFixed(1)} MB`
|
||||
: ''
|
||||
}`}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue