mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 10:05:36 +01:00
Add UserButton to SideNav, refactor NavButton into TeamsButton
- Create UserButton component at bottom of SideNav with Settings, Language, Theme, Admin, and Logout menu items - Move Settings/Logout/Admin/Docs/Support out of NavButton into UserButton - Remove LanguageButton and ThemeButton from SideNav bottom - Refactor NavButton into TeamsButton with simplified team switching - Simplify WebsiteNav and move TeamsButton to App top bar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f1b314e90b
commit
04c7216928
9 changed files with 382 additions and 186 deletions
|
|
@ -13,11 +13,13 @@ export function WebsiteSelect({
|
|||
teamId,
|
||||
onChange,
|
||||
includeTeams,
|
||||
isCollapsed,
|
||||
...props
|
||||
}: {
|
||||
websiteId?: string;
|
||||
teamId?: string;
|
||||
includeTeams?: boolean;
|
||||
isCollapsed?: boolean;
|
||||
} & SelectProps) {
|
||||
const { t, messages } = useMessages();
|
||||
const { data: website } = useWebsiteQuery(websiteId);
|
||||
|
|
@ -43,14 +45,6 @@ export function WebsiteSelect({
|
|||
onChange(id);
|
||||
};
|
||||
|
||||
const renderValue = () => {
|
||||
return (
|
||||
<Row maxWidth="160px">
|
||||
<Text truncate>{name ?? website?.name}</Text>
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<Select
|
||||
{...props}
|
||||
|
|
@ -61,7 +55,6 @@ export function WebsiteSelect({
|
|||
onSearch={handleSearch}
|
||||
onChange={handleChange}
|
||||
onOpenChange={handleOpenChange}
|
||||
renderValue={renderValue}
|
||||
listProps={{
|
||||
renderEmptyState: () => <Empty message={t(messages.noResultsFound)} />,
|
||||
style: { maxHeight: 'calc(42vh - 65px)', width: 280 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue