feat(web): memory manage & memory detail ui upgrade

This commit is contained in:
zhaoying
2026-03-19 14:37:36 +08:00
parent ba65b06582
commit 84c23e7c4e
34 changed files with 1107 additions and 744 deletions

View File

@@ -1,12 +1,13 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-03 18:33:44
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 18:33:44
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-19 11:55:42
*/
import { type FC, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import ReactEcharts from 'echarts-for-react';
import { Flex } from 'antd';
import Empty from '@/components/Empty'
import Loading from '@/components/Empty/Loading'
@@ -63,12 +64,12 @@ const EmotionLine: FC<EmotionLineProps> = ({ chartData, loading }) => {
}
return (
<>
<div>{t('userMemory.emotionLine')}</div>
<Flex vertical gap={16} className="rb-border rb:rounded-xl rb:p-4! rb:h-78">
<div className="rb:text-[#212332] rb:font-medium rb:leading-5">{t('userMemory.emotionLine')}</div>
{loading
? <Loading size={249} />
: !chartData || chartData.length === 0
? <Empty size={120} className="rb:mt-12 rb:mb-20.25" />
? <Empty size={120} className="rb:flex-1" />
: <ReactEcharts
ref={chartRef}
option={{
@@ -175,12 +176,12 @@ const EmotionLine: FC<EmotionLineProps> = ({ chartData, loading }) => {
},
series: getSeries()
}}
style={{ height: '265px', width: '100%', minWidth: '100%' }}
style={{ height: '242px', width: '100%', minWidth: '100%' }}
notMerge={true}
lazyUpdate={true}
/>
}
</>
</Flex>
)
}

View File

@@ -77,7 +77,7 @@ const Habits = forwardRef<{ handleRefresh: () => void; }>((_props, ref) => {
title={() => (<Space size={4}>
{t('implicitDetail.habits')}
<Tooltip title={t('implicitDetail.habitsSubTitle')}>
<div className="rb:size-4 rb:bg-cover rb:bg-[url('src/assets/images/userMemory/question.svg')]"></div>
<div className="rb:size-4 rb:bg-cover rb:bg-[url('@/assets/images/userMemory/question.svg')]"></div>
</Tooltip>
</Space>)}
headerType="borderless"

View File

@@ -1,12 +1,13 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-03 18:32:57
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 18:32:57
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-19 11:56:49
*/
import { type FC, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import ReactEcharts from 'echarts-for-react'
import { Flex } from 'antd'
import Empty from '@/components/Empty'
import Loading from '@/components/Empty/Loading'
@@ -41,12 +42,12 @@ const InteractionBar: FC<InteractionBarProps> = ({ chartData, loading }) => {
}, [chartData, t])
return (
<>
<div>{t('userMemory.interaction')}</div>
<Flex vertical gap={16} className="rb-border rb:rounded-xl rb:p-4! rb:h-78">
<div className="rb:text-[#212332] rb:font-medium rb:leading-5">{t('userMemory.emotionLine')}</div>
{loading
? <Loading size={249} />
: !chartData || chartData.length === 0
? <Empty size={120} className="rb:mt-12 rb:mb-20.25" />
? <Empty size={120} className="rb:flex-1" />
: <ReactEcharts
option={{
color: Colors,
@@ -128,10 +129,10 @@ const InteractionBar: FC<InteractionBarProps> = ({ chartData, loading }) => {
},
series
}}
style={{ height: '265px', width: '100%' }}
style={{ height: '242px', width: '100%', minWidth: '100%' }}
/>
}
</>
</Flex>
)
}