Compare commits
2 Commits
8fbcc67230
...
8568a8a8ce
| Author | SHA1 | Date | |
|---|---|---|---|
| 8568a8a8ce | |||
| 991c10d48a |
@ -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'
|
const showProgress = resolvedStatus === 'active' && stage !== 'restart'
|
||||||
|
|
||||||
const StatusIcon =
|
const StatusIcon =
|
||||||
resolvedStatus === 'complete'
|
resolvedStatus === 'complete'
|
||||||
@ -179,8 +179,6 @@ 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>
|
||||||
@ -203,11 +201,7 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
|
|||||||
percent={installPercent}
|
percent={installPercent}
|
||||||
detail={installDetail}
|
detail={installDetail}
|
||||||
/>
|
/>
|
||||||
<UpdateStage
|
<UpdateStage stage='restart' status={restartStatus} />
|
||||||
stage='restart'
|
|
||||||
status={restartStatus}
|
|
||||||
detail={restartDetail}
|
|
||||||
/>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
|||||||
@ -225,7 +225,7 @@ const DashboardNavigation = () => {
|
|||||||
align='center'
|
align='center'
|
||||||
style={{ marginTop: '-2px', marginRight: '6px' }}
|
style={{ marginTop: '-2px', marginRight: '6px' }}
|
||||||
>
|
>
|
||||||
<Space>
|
<Space style={{ paddingTop: '2px' }}>
|
||||||
<WebAppSwitcher />
|
<WebAppSwitcher />
|
||||||
<KeyboardShortcut
|
<KeyboardShortcut
|
||||||
shortcut='alt+q'
|
shortcut='alt+q'
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation, useNavigate } from 'react-router-dom'
|
||||||
import { Button, Tooltip } from 'antd'
|
import { Button } 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)
|
||||||
@ -42,17 +43,14 @@ const WebAppSwitcher = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<KeyboardShortcut shortcut='alt+w' hint='ALT W' onTrigger={handleClick}>
|
||||||
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}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</KeyboardShortcut>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user