Compare commits

..

No commits in common. "8568a8a8cead4bccacb54b89f6fa4cb41df41142" and "8fbcc67230b9eda83e06763f55e3949a1e9b2a5f" have entirely different histories.

3 changed files with 15 additions and 7 deletions

View File

@ -112,7 +112,7 @@ const UpdateStage = ({ stage, status, percent, detail }) => {
const resolvedStatus = const resolvedStatus =
status !== 'error' && resolvedPercent === 100 ? 'complete' : status status !== 'error' && resolvedPercent === 100 ? 'complete' : status
const color = getStageColor(resolvedStatus, token) const color = getStageColor(resolvedStatus, token)
const showProgress = resolvedStatus === 'active' && stage !== 'restart' const showProgress = resolvedStatus === 'active'
const StatusIcon = const StatusIcon =
resolvedStatus === 'complete' resolvedStatus === 'complete'
@ -179,6 +179,8 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
const installDetail = installStatus === 'active' ? message : null const installDetail = installStatus === 'active' ? message : null
const restartDetail = restartStatus === 'active' ? message : null
return ( return (
<Flex vertical gap='middle'> <Flex vertical gap='middle'>
<Text> <Text>
@ -201,7 +203,11 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
percent={installPercent} percent={installPercent}
detail={installDetail} detail={installDetail}
/> />
<UpdateStage stage='restart' status={restartStatus} /> <UpdateStage
stage='restart'
status={restartStatus}
detail={restartDetail}
/>
</Flex> </Flex>
<Modal <Modal

View File

@ -225,7 +225,7 @@ const DashboardNavigation = () => {
align='center' align='center'
style={{ marginTop: '-2px', marginRight: '6px' }} style={{ marginTop: '-2px', marginRight: '6px' }}
> >
<Space style={{ paddingTop: '2px' }}> <Space>
<WebAppSwitcher /> <WebAppSwitcher />
<KeyboardShortcut <KeyboardShortcut
shortcut='alt+q' shortcut='alt+q'

View File

@ -1,11 +1,10 @@
import { useContext } from 'react' import { useContext } from 'react'
import { useLocation, useNavigate } from 'react-router-dom' import { useLocation, useNavigate } from 'react-router-dom'
import { Button } from 'antd' import { Button, Tooltip } from 'antd'
import { ElectronContext } from '../context/ElectronContext' import { ElectronContext } from '../context/ElectronContext'
import OpenInAppIcon from '../../Icons/OpenInAppIcon' import OpenInAppIcon from '../../Icons/OpenInAppIcon'
import OpenInBrowserIcon from '../../Icons/OpenInBrowserIcon' import OpenInBrowserIcon from '../../Icons/OpenInBrowserIcon'
import config from '../../../config' import config from '../../../config'
import KeyboardShortcut from './KeyboardShortcut'
const WebAppSwitcher = () => { const WebAppSwitcher = () => {
const { isElectron, openExternalUrl } = useContext(ElectronContext) const { isElectron, openExternalUrl } = useContext(ElectronContext)
@ -43,14 +42,17 @@ const WebAppSwitcher = () => {
} }
return ( return (
<KeyboardShortcut shortcut='alt+w' hint='ALT W' onTrigger={handleClick}> <Tooltip
title={isElectron ? 'Open in browser' : 'Open in app'}
arrow={false}
>
<Button <Button
icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />} icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />}
type='text' type='text'
style={{ marginTop: '4px' }} style={{ marginTop: '4px' }}
onClick={handleClick} onClick={handleClick}
/> />
</KeyboardShortcut> </Tooltip>
) )
} }