Release link and updater toast touchups on Nightly (#6881)

pierremtb/adhoc/clean-up-nightly-on-merge-more
This commit is contained in:
Pierre Jacquier
2025-05-12 16:20:12 -04:00
committed by GitHub
parent 1a8f80a7dc
commit 818d9a0d77
3 changed files with 29 additions and 22 deletions

View File

@ -12,11 +12,11 @@ import { NetworkHealthIndicator } from '@src/components/NetworkHealthIndicator'
import { NetworkMachineIndicator } from '@src/components/NetworkMachineIndicator'
import Tooltip from '@src/components/Tooltip'
import { useAbsoluteFilePath } from '@src/hooks/useAbsoluteFilePath'
import { openExternalBrowserIfDesktop } from '@src/lib/openWindow'
import { PATHS } from '@src/lib/paths'
import { APP_VERSION, getReleaseUrl } from '@src/routes/utils'
import { billingActor } from '@src/lib/singletons'
import { ActionButton } from '@src/components/ActionButton'
export function LowerRightControls({
children,
@ -52,15 +52,16 @@ export function LowerRightControls({
<BillingDialog billingActor={billingActor} />
</Popover.Panel>
</Popover>
<a
onClick={openExternalBrowserIfDesktop(getReleaseUrl())}
href={getReleaseUrl()}
target="_blank"
rel="noopener noreferrer"
className={'!no-underline font-mono text-xs ' + linkOverrideClassName}
<ActionButton
Element="externalLink"
to={getReleaseUrl()}
className={
'!no-underline !border-none font-mono text-xs' +
linkOverrideClassName
}
>
v{APP_VERSION}
</a>
</ActionButton>
<Link
to={
location.pathname.includes(PATHS.FILE)

View File

@ -5,7 +5,7 @@ import toast from 'react-hot-toast'
import { ActionButton } from '@src/components/ActionButton'
import { SafeRenderer } from '@src/lib/markdown'
import { openExternalBrowserIfDesktop } from '@src/lib/openWindow'
import { getReleaseUrl } from '@src/routes/utils'
import { getReleaseUrl, IS_NIGHTLY_OR_DEBUG } from '@src/routes/utils'
export function ToastUpdate({
version,
@ -41,16 +41,20 @@ export function ToastUpdate({
v{version}
</span>
<p className="ml-4 text-md text-bold">
A new update has downloaded and will be available next time you
start the app. You can view the release notes{' '}
<a
onClick={openExternalBrowserIfDesktop(getReleaseUrl(version))}
href={getReleaseUrl(version)}
target="_blank"
rel="noreferrer"
>
here on GitHub.
</a>
A new update is available.
{!IS_NIGHTLY_OR_DEBUG && (
<span>
You can view the release notes{' '}
<a
onClick={openExternalBrowserIfDesktop(getReleaseUrl(version))}
href={getReleaseUrl(version)}
target="_blank"
rel="noreferrer"
>
here on GitHub.
</a>
</span>
)}
</p>
</div>
{releaseNotes && (