mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-16 10:16:20 +01:00
✨ Add disable edit mode environment variable (#730)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Box, createStyles, Group, Header as MantineHeader, Indicator } from '@mantine/core';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { REPO_URL } from '../../../../data/constants';
|
||||
import { useEditModeInformationStore } from '../../../hooks/useEditModeInformation';
|
||||
import DockerMenuButton from '../../../modules/Docker/DockerModule';
|
||||
import { usePackageAttributesStore } from '../../../tools/client/zustands/usePackageAttributesStore';
|
||||
import { Logo } from '../Logo';
|
||||
@@ -15,8 +16,9 @@ export function Header(props: any) {
|
||||
const { classes } = useStyles();
|
||||
const { classes: cardClasses, cx } = useCardStyles(false);
|
||||
const { attributes } = usePackageAttributesStore();
|
||||
const { editModeEnabled } = useEditModeInformationStore();
|
||||
|
||||
const { isLoading, error, data } = useQuery({
|
||||
const { data } = useQuery({
|
||||
queryKey: ['github/latest'],
|
||||
cacheTime: 1000 * 60 * 60 * 24,
|
||||
staleTime: 1000 * 60 * 60 * 5,
|
||||
@@ -32,9 +34,14 @@ export function Header(props: any) {
|
||||
<Box className={cx(classes.hide, 'dashboard-header-logo-root')}>
|
||||
<Logo />
|
||||
</Box>
|
||||
<Group className="dashboard-header-group-right" position="right" style={{ maxWidth: 'none' }} noWrap>
|
||||
<Group
|
||||
className="dashboard-header-group-right"
|
||||
position="right"
|
||||
style={{ maxWidth: 'none' }}
|
||||
noWrap
|
||||
>
|
||||
<Search />
|
||||
<ToggleEditModeAction />
|
||||
{!editModeEnabled && <ToggleEditModeAction />}
|
||||
<DockerMenuButton />
|
||||
<Indicator
|
||||
size={15}
|
||||
|
||||
Reference in New Issue
Block a user