-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1247 from merico-dev/1241-able-to-collapse-dashbo…
…ard-list-to-get-more-space-for-dashboard 1241 able to collapse dashboard list to get more space for dashboard
- Loading branch information
Showing
31 changed files
with
349 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@devtable/root", | ||
"version": "10.46.1", | ||
"version": "10.47.1", | ||
"private": true, | ||
"workspaces": [ | ||
"api", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import { useRequest } from 'ahooks'; | ||
import { ConfigAPI } from '../../api-caller/config'; | ||
import { LogoLink } from './logo-link'; | ||
import { Box } from '@mantine/core'; | ||
|
||
export const Logo = () => { | ||
export const Logo = ({ height }: { height: string | number }) => { | ||
const { data } = useRequest(ConfigAPI.getWebsiteSettings); | ||
if (!data) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<> | ||
<Box sx={{ height, img: { height: '100%' } }}> | ||
<LogoLink data={data} /> | ||
</> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Anchor, Breadcrumbs, Group, Text } from '@mantine/core'; | ||
import { useMemo } from 'react'; | ||
import { useLocation } from 'react-router-dom'; | ||
import { adminPageLinks } from './page-links'; | ||
import { Helmet } from 'react-helmet-async'; | ||
|
||
export const AdminBreadcrumbs = () => { | ||
const location = useLocation(); | ||
const pathname = location.pathname; | ||
|
||
const item = useMemo(() => { | ||
const match = adminPageLinks.find((l) => l.to === pathname); | ||
return match ?? null; | ||
}, [pathname]); | ||
|
||
return ( | ||
<> | ||
{item && ( | ||
<Helmet> | ||
<title>{item.name}</title> | ||
</Helmet> | ||
)} | ||
<Breadcrumbs> | ||
<Group spacing={6}> | ||
<Text size="sm" color="#868e96" sx={{ cursor: 'default', userSelect: 'none' }}> | ||
System Settings | ||
</Text> | ||
</Group> | ||
{item && ( | ||
<Anchor key={item.to} href={item.to} size="sm"> | ||
<Group spacing={6}>{item.name}</Group> | ||
</Anchor> | ||
)} | ||
</Breadcrumbs> | ||
</> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
website/src/frames/admin/navbar/admin-system-nav-actions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ActionIcon, Group, Navbar as MantineNavbar, Tooltip } from '@mantine/core'; | ||
import { IconX } from '@tabler/icons-react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { Logo } from '../../../components/logo'; | ||
|
||
export const AdminSystemNavActions = () => { | ||
const navigate = useNavigate(); | ||
const gotoDashboard = () => { | ||
const id = localStorage.getItem('last_visited_dashboard_id'); | ||
const path = id ? `/dashboard/${id}` : '/dashboard'; | ||
navigate(path); | ||
}; | ||
return ( | ||
<MantineNavbar.Section> | ||
<Group position="apart" py={5} px={10} h={40} sx={{ borderBottom: '1px solid #eee' }}> | ||
<Logo height="24px" /> | ||
<Group position="right"> | ||
<Tooltip label="Back to dashboards"> | ||
<ActionIcon color="blue" size="xs" onClick={gotoDashboard}> | ||
<IconX size={20} /> | ||
</ActionIcon> | ||
</Tooltip> | ||
</Group> | ||
</Group> | ||
</MantineNavbar.Section> | ||
); | ||
}; |
Oops, something went wrong.