From cd6044d1f43248f8bd81edf71cfc0d2749ad77ce Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 7 Feb 2024 19:36:44 +0800 Subject: [PATCH] fix: process name Signed-off-by: Innei --- src/components/layout/header/internal/Activity.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/layout/header/internal/Activity.tsx b/src/components/layout/header/internal/Activity.tsx index 81f94856a6..39d41ba103 100644 --- a/src/components/layout/header/internal/Activity.tsx +++ b/src/components/layout/header/internal/Activity.tsx @@ -147,9 +147,6 @@ const appLabels: { [app: string]: string } = { } // autocorrect: true -const getAppName = (processName: string) => { - return appLabels[processName] || processName -} export const Activity = memo(() => { const activityConfig = useAppConfigSelector( (config) => config.module.activity, @@ -219,7 +216,6 @@ export const Activity = memo(() => { const renderDescription = deferredProcess?.description || appDescription[deferredProcess?.name || ''] - const renderProcessName = getAppName(processName) const memoProcessName = useMemo( () => ({ processName: processName || '', icon: processIcon }), @@ -245,9 +241,9 @@ export const Activity = memo(() => { )} {isPageActive && ( - {renderProcessName && ( + {processName && ( { trackerMessage="Activity" > - {ownerName} 正在使用 {renderProcessName} + {ownerName} 正在使用 {processName} {renderDescription ? ` ${renderDescription}` : ''}