mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2025-12-19 22:32:58 +05:30
refactor: improved update popup
This commit is contained in:
@@ -154,11 +154,11 @@ export function AppSidebar() {
|
|||||||
{appUpdate && open && showUpdateCard && (
|
{appUpdate && open && showUpdateCard && (
|
||||||
<Card className="gap-4 py-0">
|
<Card className="gap-4 py-0">
|
||||||
<CardHeader className="p-4 pb-0">
|
<CardHeader className="p-4 pb-0">
|
||||||
<CardTitle className="text-sm">Update Available (v{appUpdate.version})</CardTitle>
|
<CardTitle className="text-sm">Update Available (v{appUpdate?.version || '0.0.0'})</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
A newer version of {config.appName} is available. Please update to the latest version for the best experience.
|
A newer version of {config.appName} is available. Please update to the latest version for the best experience.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
<a className="text-xs font-semibold cursor-pointer mt-1" href={`https://github.com/neosubhamoy/neodlp/releases/tag/v${appUpdate.version}`} target="_blank">✨ Read Changelog</a>
|
<a className="text-xs font-semibold cursor-pointer mt-1" href={`https://github.com/neosubhamoy/neodlp/releases/tag/v${appUpdate?.version || '0.0.0'}`} target="_blank">✨ Read Changelog</a>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="grid gap-2.5 p-4">
|
<CardContent className="grid gap-2.5 p-4">
|
||||||
<AlertDialog>
|
<AlertDialog>
|
||||||
@@ -169,13 +169,14 @@ export function AppSidebar() {
|
|||||||
disabled={ongoingDownloads.length > 0 || isUpdatingApp}
|
disabled={ongoingDownloads.length > 0 || isUpdatingApp}
|
||||||
onClick={() => downloadAndInstallAppUpdate(appUpdate)}
|
onClick={() => downloadAndInstallAppUpdate(appUpdate)}
|
||||||
>
|
>
|
||||||
Download and Install
|
Update Now
|
||||||
</Button>
|
</Button>
|
||||||
</AlertDialogTrigger>
|
</AlertDialogTrigger>
|
||||||
<AlertDialogContent>
|
<AlertDialogContent>
|
||||||
<AlertDialogHeader className="flex flex-col items-center text-center gap-2">
|
<AlertDialogHeader className="flex flex-col items-center text-center gap-2">
|
||||||
|
<CircleArrowUp className="size-7 stroke-muted-foreground" />
|
||||||
<AlertDialogTitle>Updating {config.appName}</AlertDialogTitle>
|
<AlertDialogTitle>Updating {config.appName}</AlertDialogTitle>
|
||||||
<AlertDialogDescription className="text-center">Updating {config.appName} to v{appUpdate.version}, Please be patience! Do not quit the app untill the update finishes. The app will auto re-launch to complete the update, Please allow all system prompts from {config.appName} if asked.</AlertDialogDescription>
|
<AlertDialogDescription className="text-center text-xs mb-2">Updating {config.appName} to v{appUpdate?.version || '0.0.0'}, Please be patience! Do not quit the app untill the update finishes. The app will auto re-launch to complete the update, Please allow all system prompts from {config.appName} if asked.</AlertDialogDescription>
|
||||||
<Progress value={appUpdateDownloadProgress} className="w-full" />
|
<Progress value={appUpdateDownloadProgress} className="w-full" />
|
||||||
<AlertDialogDescription className="text-center">Downloading update... {appUpdateDownloadProgress}%</AlertDialogDescription>
|
<AlertDialogDescription className="text-center">Downloading update... {appUpdateDownloadProgress}%</AlertDialogDescription>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
|
|||||||
Reference in New Issue
Block a user