fix(web): add storage analysis menu icon

This commit is contained in:
Zhong
2026-09-21 21:00:55 +08:00
parent b10139bd83
commit 74a0aa3563
2 changed files with 9 additions and 0 deletions
@@ -37,6 +37,7 @@ import {
Puzzle, Puzzle,
RefreshCcw, RefreshCcw,
UsersRound, UsersRound,
HardDrive,
} from 'lucide-react'; } from 'lucide-react';
import { useTheme } from '@/components/providers/theme-provider'; import { useTheme } from '@/components/providers/theme-provider';
@@ -2172,6 +2173,7 @@ export default function HomeSidebar({
openSettings('storageAnalysis'); openSettings('storageAnalysis');
}} }}
> >
<HardDrive />
{t('storageAnalysis.title')} {t('storageAnalysis.title')}
</DropdownMenuItem> </DropdownMenuItem>
)} )}
@@ -71,6 +71,13 @@ test('does not expose storage analysis in Cloud settings or via a deep link', ()
); );
}); });
test('renders storage analysis with the storage icon in the user menu', () => {
assert.match(
homeSidebarSource,
/canViewStorageAnalysis\s*&&\s*\(\s*<DropdownMenuItem[\s\S]*?<HardDrive\s*\/>[\s\S]*?\{t\('storageAnalysis\.title'\)\}/,
);
});
test('loads plugin pages through the authenticated Workspace-scoped asset route', () => { test('loads plugin pages through the authenticated Workspace-scoped asset route', () => {
assert.match(pluginPageSource, /useAuthenticatedPluginAsset/); assert.match(pluginPageSource, /useAuthenticatedPluginAsset/);
assert.match( assert.match(