Compare commits

..

No commits in common. "c7189a21c56d3030fd88104261e3331e51aaef20" and "619df83ddde900e5c2f5d254529dd896e0022655" have entirely different histories.

5 changed files with 34 additions and 38 deletions

View File

@ -32,7 +32,7 @@ const STAGE_CONFIG = {
icon: CloudIcon, icon: CloudIcon,
labels: { labels: {
pending: 'Download', pending: 'Download',
active: 'Downloading...', active: 'Downloading',
complete: 'Downloaded', complete: 'Downloaded',
error: 'Download failed' error: 'Download failed'
} }
@ -41,7 +41,7 @@ const STAGE_CONFIG = {
icon: HostIcon, icon: HostIcon,
labels: { labels: {
pending: 'Install', pending: 'Install',
active: 'Installing...', active: 'Installing',
complete: 'Installed', complete: 'Installed',
error: 'Install failed' error: 'Install failed'
} }
@ -101,6 +101,7 @@ const UpdateStage = ({ stage, status, percent, detail }) => {
: StageIcon : StageIcon
return ( return (
<Flex vertical gap={4}>
<Flex align='center' gap='middle'> <Flex align='center' gap='middle'>
<StatusIcon style={{ fontSize: 20, color, flexShrink: 0 }} /> <StatusIcon style={{ fontSize: 20, color, flexShrink: 0 }} />
<Flex align='center' gap='small' style={{ flex: 1, minWidth: 0 }}> <Flex align='center' gap='small' style={{ flex: 1, minWidth: 0 }}>
@ -108,22 +109,21 @@ const UpdateStage = ({ stage, status, percent, detail }) => {
{config.labels[resolvedStatus]} {config.labels[resolvedStatus]}
</Text> </Text>
{showProgress && ( {showProgress && (
<Flex vertical gap={4}>
<Progress <Progress
percent={resolvedPercent} percent={resolvedPercent}
status={getProgressStatus(resolvedStatus)} status={getProgressStatus(resolvedStatus)}
showInfo={typeof resolvedPercent === 'number'} showInfo={typeof resolvedPercent === 'number'}
style={{ flex: 1, margin: 0 }} style={{ flex: 1, margin: 0 }}
/> />
)}
</Flex>
</Flex>
{detail && ( {detail && (
<Text type='secondary' style={{ marginLeft: 36 }}> <Text type='secondary' style={{ marginLeft: 36 }}>
{detail} {detail}
</Text> </Text>
)} )}
</Flex> </Flex>
)}
</Flex>
</Flex>
) )
} }
@ -161,8 +161,6 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
? `${downloaded} of ${total}` ? `${downloaded} of ${total}`
: null : null
const installDetail = installStatus === 'active' ? message : null
return ( return (
<Flex vertical gap='middle'> <Flex vertical gap='middle'>
<Text> <Text>
@ -183,7 +181,6 @@ const AppUpdateProgress = ({ progress, update, onClose }) => {
stage='install' stage='install'
status={installStatus} status={installStatus}
percent={installPercent} percent={installPercent}
detail={installDetail}
/> />
</Flex> </Flex>

View File

@ -235,7 +235,7 @@ const DashboardNavigation = () => {
<Button <Button
icon={<SearchIcon />} icon={<SearchIcon />}
type='text' type='text'
style={{ marginTop: '4px' }} style={{ marginTop: '2px' }}
onClick={() => showSpotlight()} onClick={() => showSpotlight()}
/> />
</KeyboardShortcut> </KeyboardShortcut>

View File

@ -1,4 +1,4 @@
import { useMemo, useEffect, useRef, useState, useCallback } from 'react' import { useMemo, useEffect, useRef, useState } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { Table, Skeleton, Card, Button, Flex, Typography, Modal } from 'antd' import { Table, Skeleton, Card, Button, Flex, Typography, Modal } from 'antd'
import PlusIcon from '../../Icons/PlusIcon' import PlusIcon from '../../Icons/PlusIcon'
@ -91,8 +91,7 @@ const ObjectChildTable = ({
return generated return generated
} }
const getResolvedRecordKey = useCallback( const getResolvedRecordKey = (record) => {
(record) => {
if (typeof rowKey === 'function') { if (typeof rowKey === 'function') {
return rowKey(record) ?? getFallbackRowKey(record) return rowKey(record) ?? getFallbackRowKey(record)
} }
@ -102,9 +101,7 @@ const ObjectChildTable = ({
} }
return getFallbackRowKey(record) return getFallbackRowKey(record)
}, }
[rowKey]
)
const propertyMap = useMemo(() => { const propertyMap = useMemo(() => {
const map = new Map() const map = new Map()
@ -261,8 +258,7 @@ const ObjectChildTable = ({
canAddRemove, canAddRemove,
itemsSource, itemsSource,
onChange, onChange,
rowKey, rowKey
getResolvedRecordKey
]) ])
const skeletonData = useMemo(() => { const skeletonData = useMemo(() => {

View File

@ -49,7 +49,7 @@ const WebAppSwitcher = () => {
<Button <Button
icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />} icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />}
type='text' type='text'
style={{ marginTop: '4px' }} style={{ marginTop: '2px' }}
onClick={handleClick} onClick={handleClick}
/> />
</Tooltip> </Tooltip>

View File

@ -291,6 +291,9 @@ const AuthProvider = ({ children }) => {
}) })
}, [authenticated, token, expiresAt, userProfile, persistSession]) }, [authenticated, token, expiresAt, userProfile, persistSession])
const profileImageDependency =
userProfile?.profileImage?._id ?? userProfile?.profileImage
// Fetch and cache profile image when userProfile.profileImage changes // Fetch and cache profile image when userProfile.profileImage changes
useEffect(() => { useEffect(() => {
const profileImage = userProfile?.profileImage const profileImage = userProfile?.profileImage
@ -365,7 +368,7 @@ const AuthProvider = ({ children }) => {
} }
setProfileImageUrl(null) setProfileImageUrl(null)
} }
}, [userProfile?.profileImage, token]) }, [profileImageDependency, token])
useEffect(() => { useEffect(() => {
console.log('userProfile', userProfile) console.log('userProfile', userProfile)