mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
🎨 Merge change position modals
This commit is contained in:
@@ -0,0 +1,89 @@
|
|||||||
|
import { SelectItem } from '@mantine/core';
|
||||||
|
import { closeModal, ContextModalProps } from '@mantine/modals';
|
||||||
|
import { useConfigContext } from '../../../../config/provider';
|
||||||
|
import { useConfigStore } from '../../../../config/store';
|
||||||
|
import { IntegrationsType } from '../../../../types/integration';
|
||||||
|
import { TileBaseType } from '../../../../types/tile';
|
||||||
|
import { Tiles } from '../../Tiles/tilesDefinitions';
|
||||||
|
import { ChangePositionModal } from './ChangePositionModal';
|
||||||
|
|
||||||
|
export type IntegrationChangePositionModalInnerProps = {
|
||||||
|
integration: keyof IntegrationsType;
|
||||||
|
module: TileBaseType;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ChangeIntegrationPositionModal = ({
|
||||||
|
context,
|
||||||
|
id,
|
||||||
|
innerProps,
|
||||||
|
}: ContextModalProps<IntegrationChangePositionModalInnerProps>) => {
|
||||||
|
const { name: configName } = useConfigContext();
|
||||||
|
const updateConfig = useConfigStore((x) => x.updateConfig);
|
||||||
|
|
||||||
|
const handleSubmit = (x: number, y: number, width: number, height: number) => {
|
||||||
|
if (!configName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateConfig(configName, (prev) => ({
|
||||||
|
...prev,
|
||||||
|
integrations: {
|
||||||
|
...prev.integrations,
|
||||||
|
[innerProps.integration]: {
|
||||||
|
...prev.integrations[innerProps.integration],
|
||||||
|
shape: {
|
||||||
|
location: {
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
height,
|
||||||
|
width,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
context.closeModal(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
closeModal(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const widthData = useWidthData(innerProps.integration);
|
||||||
|
const heightData = useHeightData(innerProps.integration);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ChangePositionModal
|
||||||
|
onSubmit={handleSubmit}
|
||||||
|
onCancel={handleCancel}
|
||||||
|
heightData={heightData}
|
||||||
|
widthData={widthData}
|
||||||
|
initialX={innerProps.module.shape.location.x}
|
||||||
|
initialY={innerProps.module.shape.location.y}
|
||||||
|
initialWidth={innerProps.module.shape.size.width}
|
||||||
|
initialHeight={innerProps.module.shape.size.height}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const useWidthData = (integration: keyof IntegrationsType): SelectItem[] => {
|
||||||
|
const tileDefinitions = Tiles[integration];
|
||||||
|
const offset = tileDefinitions.minWidth ?? 2;
|
||||||
|
const length = (tileDefinitions.maxWidth ?? 12) - offset;
|
||||||
|
return Array.from({ length }, (_, i) => i + offset).map((n) => ({
|
||||||
|
value: n.toString(),
|
||||||
|
label: `${64 * n}px`,
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
|
const useHeightData = (integration: keyof IntegrationsType): SelectItem[] => {
|
||||||
|
const tileDefinitions = Tiles[integration];
|
||||||
|
const offset = tileDefinitions.minHeight ?? 2;
|
||||||
|
const length = (tileDefinitions.maxHeight ?? 12) - offset;
|
||||||
|
return Array.from({ length }, (_, i) => i + offset).map((n) => ({
|
||||||
|
value: n.toString(),
|
||||||
|
label: `${64 * n}px`,
|
||||||
|
}));
|
||||||
|
};
|
||||||
@@ -1,44 +1,55 @@
|
|||||||
import { Button, Flex, Grid, NumberInput } from '@mantine/core';
|
import { Button, Flex, Grid, NumberInput, Select, SelectItem } from '@mantine/core';
|
||||||
import { useForm } from '@mantine/form';
|
import { useForm } from '@mantine/form';
|
||||||
import { closeModal, ContextModalProps } from '@mantine/modals';
|
|
||||||
import { useConfigContext } from '../../../../config/provider';
|
import { useConfigContext } from '../../../../config/provider';
|
||||||
import { useConfigStore } from '../../../../config/store';
|
|
||||||
import { ServiceType } from '../../../../types/service';
|
interface ChangePositionModalProps {
|
||||||
import { TileBaseType } from '../../../../types/tile';
|
initialX: number;
|
||||||
|
initialY: number;
|
||||||
|
initialWidth: number;
|
||||||
|
initialHeight: number;
|
||||||
|
widthData: SelectItem[];
|
||||||
|
heightData: SelectItem[];
|
||||||
|
onSubmit: (x: number, y: number, width: number, height: number) => void;
|
||||||
|
onCancel: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
export const ChangePositionModal = ({
|
export const ChangePositionModal = ({
|
||||||
context,
|
initialX,
|
||||||
id,
|
initialY,
|
||||||
innerProps,
|
initialWidth,
|
||||||
}: ContextModalProps<{ type: 'service' | 'type'; tile: TileBaseType }>) => {
|
initialHeight,
|
||||||
const updateConfig = useConfigStore((x) => x.updateConfig);
|
widthData,
|
||||||
|
heightData,
|
||||||
|
onCancel,
|
||||||
|
onSubmit,
|
||||||
|
}: ChangePositionModalProps) => {
|
||||||
const { name: configName } = useConfigContext();
|
const { name: configName } = useConfigContext();
|
||||||
|
|
||||||
const form = useForm({
|
const form = useForm<FormType>({
|
||||||
initialValues: {
|
initialValues: {
|
||||||
tile: innerProps.tile,
|
x: initialX,
|
||||||
|
y: initialY,
|
||||||
|
width: initialWidth,
|
||||||
|
height: initialHeight,
|
||||||
},
|
},
|
||||||
validateInputOnChange: true,
|
validateInputOnChange: true,
|
||||||
validateInputOnBlur: true,
|
validateInputOnBlur: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const onSubmit = () => {
|
const handleSubmit = () => {
|
||||||
if (!configName) {
|
if (!configName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tileAsService = form.values.tile as ServiceType;
|
onSubmit(form.values.x, form.values.y, form.values.width, form.values.height);
|
||||||
|
|
||||||
updateConfig(configName, (previous) => ({
|
|
||||||
...previous,
|
|
||||||
services: [...previous.services.filter((x) => x.id === tileAsService.id), tileAsService],
|
|
||||||
}));
|
|
||||||
|
|
||||||
closeModal(id);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(`Initial: (${form.values.width} / ${form.values.height})`);
|
||||||
|
console.log(widthData);
|
||||||
|
console.log(heightData);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form onSubmit={form.onSubmit(onSubmit)}>
|
<form onSubmit={form.onSubmit(handleSubmit)}>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.Col xs={12} md={6}>
|
<Grid.Col xs={12} md={6}>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
@@ -46,7 +57,7 @@ export const ChangePositionModal = ({
|
|||||||
min={0}
|
min={0}
|
||||||
label="X Position"
|
label="X Position"
|
||||||
description="0 or higher"
|
description="0 or higher"
|
||||||
{...form.getInputProps('tile.shape.location.x')}
|
{...form.getInputProps('x')}
|
||||||
/>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
|
|
||||||
@@ -56,39 +67,48 @@ export const ChangePositionModal = ({
|
|||||||
min={0}
|
min={0}
|
||||||
label="Y Position"
|
label="Y Position"
|
||||||
description="0 or higher"
|
description="0 or higher"
|
||||||
{...form.getInputProps('tile.shape.location.y')}
|
{...form.getInputProps('y')}
|
||||||
/>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.Col xs={12} md={6}>
|
<Grid.Col xs={12} md={6}>
|
||||||
<NumberInput
|
<Select
|
||||||
|
data={widthData}
|
||||||
max={24}
|
max={24}
|
||||||
min={1}
|
min={1}
|
||||||
label="Width"
|
label="Width"
|
||||||
description="Between 1 and 24"
|
description={`Between ${widthData.at(0)?.label} and ${widthData.at(-1)?.label}`}
|
||||||
{...form.getInputProps('tile.shape.size.width')}
|
{...form.getInputProps('width')}
|
||||||
/>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
|
|
||||||
<Grid.Col xs={12} md={6}>
|
<Grid.Col xs={12} md={6}>
|
||||||
<NumberInput
|
<Select
|
||||||
|
data={heightData}
|
||||||
max={24}
|
max={24}
|
||||||
min={1}
|
min={1}
|
||||||
label="Height"
|
label="Height"
|
||||||
description="Between 1 and 24"
|
description={`Between ${heightData.at(0)?.label} and ${heightData.at(-1)?.label}`}
|
||||||
{...form.getInputProps('tile.shape.size.height')}
|
{...form.getInputProps('height')}
|
||||||
/>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Flex justify="end" gap="sm" mt="md">
|
<Flex justify="end" gap="sm" mt="md">
|
||||||
<Button onClick={() => closeModal(id)} variant="light" color="gray">
|
<Button onClick={() => onCancel()} variant="light" color="gray">
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="submit">Change Position</Button>
|
<Button type="submit">Save</Button>
|
||||||
</Flex>
|
</Flex>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type FormType = {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
};
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
import { SelectItem } from '@mantine/core';
|
||||||
|
import { closeModal, ContextModalProps } from '@mantine/modals';
|
||||||
|
import { useConfigContext } from '../../../../config/provider';
|
||||||
|
import { useConfigStore } from '../../../../config/store';
|
||||||
|
import { ServiceType } from '../../../../types/service';
|
||||||
|
import { ChangePositionModal } from './ChangePositionModal';
|
||||||
|
|
||||||
|
type ChangeServicePositionModalInnerProps = {
|
||||||
|
service: ServiceType;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ChangeServicePositionModal = ({
|
||||||
|
id,
|
||||||
|
context,
|
||||||
|
innerProps,
|
||||||
|
}: ContextModalProps<ChangeServicePositionModalInnerProps>) => {
|
||||||
|
const { name: configName } = useConfigContext();
|
||||||
|
const updateConfig = useConfigStore((x) => x.updateConfig);
|
||||||
|
|
||||||
|
const handleSubmit = (x: number, y: number, width: number, height: number) => {
|
||||||
|
if (!configName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateConfig(configName, (previousConfig) => ({
|
||||||
|
...previousConfig,
|
||||||
|
services: [
|
||||||
|
...previousConfig.services.filter((x) => x.id !== innerProps.service.id),
|
||||||
|
{ ...innerProps.service, shape: { location: { x, y }, size: { width, height } } },
|
||||||
|
],
|
||||||
|
}));
|
||||||
|
context.closeModal(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
closeModal(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const widthData = useWidthData();
|
||||||
|
const heightData = useHeightData();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ChangePositionModal
|
||||||
|
onSubmit={handleSubmit}
|
||||||
|
onCancel={handleCancel}
|
||||||
|
widthData={widthData}
|
||||||
|
heightData={heightData}
|
||||||
|
initialX={innerProps.service.shape.location.x}
|
||||||
|
initialY={innerProps.service.shape.location.y}
|
||||||
|
initialWidth={innerProps.service.shape.size.width}
|
||||||
|
initialHeight={innerProps.service.shape.size.height}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const useHeightData = (): SelectItem[] =>
|
||||||
|
Array.from(Array(11).keys()).map((n) => {
|
||||||
|
const index = n + 1;
|
||||||
|
return {
|
||||||
|
value: index.toString(),
|
||||||
|
label: `${64 * index}px`,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const useWidthData = (): SelectItem[] =>
|
||||||
|
Array.from(Array(11).keys()).map((n) => {
|
||||||
|
const index = n + 1;
|
||||||
|
return {
|
||||||
|
value: index.toString(),
|
||||||
|
label: `${64 * index}px`,
|
||||||
|
};
|
||||||
|
});
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
import {
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
createStyles,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
NumberInput,
|
|
||||||
Select,
|
|
||||||
SelectItem,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from '@mantine/core';
|
|
||||||
import { useForm } from '@mantine/form';
|
|
||||||
import { ContextModalProps } from '@mantine/modals';
|
|
||||||
import {
|
|
||||||
IconArrowsUpDown,
|
|
||||||
IconCalendarTime,
|
|
||||||
IconClock,
|
|
||||||
IconCloudRain,
|
|
||||||
IconFileDownload,
|
|
||||||
} from '@tabler/icons';
|
|
||||||
import { useTranslation } from 'next-i18next';
|
|
||||||
import { useConfigContext } from '../../../config/provider';
|
|
||||||
import { useConfigStore } from '../../../config/store';
|
|
||||||
import { IntegrationsType } from '../../../types/integration';
|
|
||||||
import { TileBaseType } from '../../../types/tile';
|
|
||||||
import { integrationModuleTranslationsMap } from './IntegrationsEditModal';
|
|
||||||
import { ServiceIcon } from './Service/ServiceIcon';
|
|
||||||
import { Tiles } from './tilesDefinitions';
|
|
||||||
|
|
||||||
export type IntegrationChangePositionModalInnerProps = {
|
|
||||||
integration: keyof IntegrationsType;
|
|
||||||
module: TileBaseType;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const IntegrationChangePositionModal = ({
|
|
||||||
context,
|
|
||||||
id,
|
|
||||||
innerProps,
|
|
||||||
}: ContextModalProps<IntegrationChangePositionModalInnerProps>) => {
|
|
||||||
const translationKey = integrationModuleTranslationsMap.get(innerProps.integration);
|
|
||||||
const { t } = useTranslation([translationKey ?? '', 'common']);
|
|
||||||
const { classes } = useStyles();
|
|
||||||
const { name: configName } = useConfigContext();
|
|
||||||
const updateConfig = useConfigStore((x) => x.updateConfig);
|
|
||||||
const form = useForm<FormType>({
|
|
||||||
initialValues: {
|
|
||||||
x: innerProps.module.shape.location.x,
|
|
||||||
y: innerProps.module.shape.location.y,
|
|
||||||
width: innerProps.module.shape.size.width.toString(),
|
|
||||||
height: innerProps.module.shape.size.height.toString(),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
if (!configName) return null;
|
|
||||||
null;
|
|
||||||
const handleSubmit = (values: FormType) => {
|
|
||||||
updateConfig(configName, (prev) => {
|
|
||||||
return {
|
|
||||||
...prev,
|
|
||||||
integrations: {
|
|
||||||
...prev.integrations,
|
|
||||||
[innerProps.integration]: {
|
|
||||||
...prev.integrations[innerProps.integration],
|
|
||||||
shape: {
|
|
||||||
location: {
|
|
||||||
x: values.x,
|
|
||||||
y: values.y,
|
|
||||||
},
|
|
||||||
size: {
|
|
||||||
height: parseInt(values.height),
|
|
||||||
width: parseInt(values.width),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
context.closeModal(id);
|
|
||||||
};
|
|
||||||
|
|
||||||
const widthData = useWidthData(innerProps.integration);
|
|
||||||
const heightData = useHeightData(innerProps.integration);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Stack>
|
|
||||||
<Stack spacing={0}>
|
|
||||||
<Center>
|
|
||||||
<div className={classes.icon}>{integrationIcons[innerProps.integration]}</div>
|
|
||||||
</Center>
|
|
||||||
<Text align="center" size="sm">
|
|
||||||
Change position of
|
|
||||||
</Text>
|
|
||||||
<Title align="center" order={4}>
|
|
||||||
{t('descriptor.name')}
|
|
||||||
</Title>
|
|
||||||
</Stack>
|
|
||||||
<form onSubmit={form.onSubmit(handleSubmit)}>
|
|
||||||
<Stack>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={12} xs={6}>
|
|
||||||
<NumberInput label="X Position" required {...form.getInputProps('x')} />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={12} xs={6}>
|
|
||||||
<NumberInput label="Y Position" required {...form.getInputProps('y')} />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={12} xs={6}>
|
|
||||||
<Select data={widthData} label="Width" required {...form.getInputProps('width')} />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={12} xs={6}>
|
|
||||||
<Select data={heightData} label="Height" required {...form.getInputProps('height')} />
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Group position="right">
|
|
||||||
<Button onClick={() => context.closeModal(id)} variant="light">
|
|
||||||
{t('common:actions.cancel')}
|
|
||||||
</Button>
|
|
||||||
<Button type="submit">{t('common:actions.save')}</Button>
|
|
||||||
</Group>
|
|
||||||
</Stack>
|
|
||||||
</form>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
type FormType = {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
width: string;
|
|
||||||
height: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: define width of gridstack somewhere (64)
|
|
||||||
const useWidthData = (integration: keyof IntegrationsType): SelectItem[] => {
|
|
||||||
const tileDefinitions = Tiles[integration];
|
|
||||||
const offset = tileDefinitions.minWidth ?? 2;
|
|
||||||
const length = (tileDefinitions.maxWidth ?? 12) - offset;
|
|
||||||
return Array.from({ length }, (_, i) => i + offset).map((n) => ({
|
|
||||||
value: n.toString(),
|
|
||||||
label: `${64 * n}px`,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const useHeightData = (integration: keyof IntegrationsType): SelectItem[] => {
|
|
||||||
const tileDefinitions = Tiles[integration];
|
|
||||||
const offset = tileDefinitions.minHeight ?? 2;
|
|
||||||
const length = (tileDefinitions.maxHeight ?? 12) - offset;
|
|
||||||
return Array.from({ length }, (_, i) => i + offset).map((n) => ({
|
|
||||||
value: n.toString(),
|
|
||||||
label: `${64 * n}px`,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const integrationIcons = {
|
|
||||||
useNet: <IconFileDownload size="100%" />,
|
|
||||||
bitTorrent: <IconFileDownload size="100%" />,
|
|
||||||
calendar: <IconCalendarTime size="100%" />,
|
|
||||||
clock: <IconClock size="100%" />,
|
|
||||||
weather: <IconCloudRain size="100%" />,
|
|
||||||
dashDot: <ServiceIcon size="100%" service="dashdot" />,
|
|
||||||
torrentNetworkTraffic: <IconArrowsUpDown size="100%" />,
|
|
||||||
};
|
|
||||||
|
|
||||||
const useStyles = createStyles(() => ({
|
|
||||||
icon: {
|
|
||||||
height: 120,
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
@@ -42,7 +42,7 @@ export const IntegrationsMenu = <TIntegrationKey extends keyof IntegrationsType>
|
|||||||
|
|
||||||
const handleChangeSizeClick = () => {
|
const handleChangeSizeClick = () => {
|
||||||
openContextModalGeneric<IntegrationChangePositionModalInnerProps>({
|
openContextModalGeneric<IntegrationChangePositionModalInnerProps>({
|
||||||
modal: 'integrationChangePosition',
|
modal: 'changeIntegrationPositionModal',
|
||||||
size: 'xl',
|
size: 'xl',
|
||||||
title: null,
|
title: null,
|
||||||
innerProps: {
|
innerProps: {
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ export const ServiceMenu = ({ service }: TileMenuProps) => {
|
|||||||
|
|
||||||
const handleClickChangePosition = () => {
|
const handleClickChangePosition = () => {
|
||||||
openContextModalGeneric({
|
openContextModalGeneric({
|
||||||
modal: 'changeTilePosition',
|
modal: 'changeServicePositionModal',
|
||||||
innerProps: {
|
innerProps: {
|
||||||
tile: service,
|
service,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,18 +9,18 @@ import { appWithTranslation } from 'next-i18next';
|
|||||||
import { AppProps } from 'next/app';
|
import { AppProps } from 'next/app';
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { IntegrationsEditModal } from '../components/Dashboard/Tiles/IntegrationsEditModal';
|
import { ChangeIntegrationPositionModal } from '../components/Dashboard/Modals/ChangePosition/ChangeIntegrationPositionModal';
|
||||||
import { IntegrationRemoveModal } from '../components/Dashboard/Tiles/IntegrationRemoveModal';
|
import { ChangeServicePositionModal } from '../components/Dashboard/Modals/ChangePosition/ChangeServicePositionModal';
|
||||||
import { ChangePositionModal } from '../components/Dashboard/Modals/ChangePosition/ChangePositionModal';
|
|
||||||
import { EditServiceModal } from '../components/Dashboard/Modals/EditService/EditServiceModal';
|
import { EditServiceModal } from '../components/Dashboard/Modals/EditService/EditServiceModal';
|
||||||
import { SelectElementModal } from '../components/Dashboard/Modals/SelectElement/SelectElementModal';
|
import { SelectElementModal } from '../components/Dashboard/Modals/SelectElement/SelectElementModal';
|
||||||
|
import { IntegrationRemoveModal } from '../components/Dashboard/Tiles/IntegrationRemoveModal';
|
||||||
|
import { IntegrationsEditModal } from '../components/Dashboard/Tiles/IntegrationsEditModal';
|
||||||
|
import { CategoryEditModal } from '../components/Dashboard/Wrappers/Category/CategoryEditModal';
|
||||||
import { ConfigProvider } from '../config/provider';
|
import { ConfigProvider } from '../config/provider';
|
||||||
|
import '../styles/global.scss';
|
||||||
import { ColorTheme } from '../tools/color';
|
import { ColorTheme } from '../tools/color';
|
||||||
import { queryClient } from '../tools/queryClient';
|
import { queryClient } from '../tools/queryClient';
|
||||||
import { theme } from '../tools/theme';
|
import { theme } from '../tools/theme';
|
||||||
import { IntegrationChangePositionModal } from '../components/Dashboard/Tiles/IntegrationChangePositionModal';
|
|
||||||
import '../styles/global.scss';
|
|
||||||
import { CategoryEditModal } from '../components/Dashboard/Wrappers/Category/CategoryEditModal';
|
|
||||||
|
|
||||||
function App(this: any, props: AppProps & { colorScheme: ColorScheme }) {
|
function App(this: any, props: AppProps & { colorScheme: ColorScheme }) {
|
||||||
const { Component, pageProps } = props;
|
const { Component, pageProps } = props;
|
||||||
@@ -90,9 +90,9 @@ function App(this: any, props: AppProps & { colorScheme: ColorScheme }) {
|
|||||||
selectElement: SelectElementModal,
|
selectElement: SelectElementModal,
|
||||||
integrationOptions: IntegrationsEditModal,
|
integrationOptions: IntegrationsEditModal,
|
||||||
integrationRemove: IntegrationRemoveModal,
|
integrationRemove: IntegrationRemoveModal,
|
||||||
integrationChangePosition: IntegrationChangePositionModal,
|
|
||||||
categoryEditModal: CategoryEditModal,
|
categoryEditModal: CategoryEditModal,
|
||||||
changeTilePosition: ChangePositionModal,
|
changeServicePositionModal: ChangeServicePositionModal,
|
||||||
|
changeIntegrationPositionModal: ChangeIntegrationPositionModal,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
|
|||||||
Reference in New Issue
Block a user