Added software update menu tag.
This commit is contained in:
parent
8a0bc22124
commit
8109b8dce2
@ -44,6 +44,8 @@ import {
|
|||||||
getSidebarMenuSections
|
getSidebarMenuSections
|
||||||
} from '../../../database/Sidebars'
|
} from '../../../database/Sidebars'
|
||||||
|
|
||||||
|
import { useAppUpdateContext } from '../context/AppUpdateContext'
|
||||||
|
|
||||||
const { Text } = Typography
|
const { Text } = Typography
|
||||||
|
|
||||||
const DashboardNavigation = () => {
|
const DashboardNavigation = () => {
|
||||||
@ -64,7 +66,7 @@ const DashboardNavigation = () => {
|
|||||||
const isMobile = useMediaQuery({ maxWidth: 768 })
|
const isMobile = useMediaQuery({ maxWidth: 768 })
|
||||||
const { platform, isElectron, isFullScreen, setSidebarViewMenu } =
|
const { platform, isElectron, isFullScreen, setSidebarViewMenu } =
|
||||||
useContext(ElectronContext)
|
useContext(ElectronContext)
|
||||||
|
const { availableUpdate, checkForUpdates } = useAppUpdateContext()
|
||||||
const mainMenuItems = useMemo(
|
const mainMenuItems = useMemo(
|
||||||
() => [
|
() => [
|
||||||
{
|
{
|
||||||
@ -314,6 +316,16 @@ const DashboardNavigation = () => {
|
|||||||
</Popover>
|
</Popover>
|
||||||
</Space>
|
</Space>
|
||||||
) : null}
|
) : null}
|
||||||
|
{isElectron && availableUpdate ? (
|
||||||
|
<Tag
|
||||||
|
icon={<CloudIcon />}
|
||||||
|
style={{ cursor: 'pointer', margin: '2px 0 0 0' }}
|
||||||
|
color='cyan'
|
||||||
|
onClick={() => checkForUpdates()}
|
||||||
|
>
|
||||||
|
Update Available
|
||||||
|
</Tag>
|
||||||
|
) : null}
|
||||||
</Flex>
|
</Flex>
|
||||||
{isOtherApp ? <DashboardWindowButtons /> : null}
|
{isOtherApp ? <DashboardWindowButtons /> : null}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user