Add config migration process

This commit is contained in:
ajnart
2022-12-22 11:29:51 +09:00
parent 5f8a420c83
commit ecc61d5970
11 changed files with 147 additions and 55 deletions

View File

@@ -62,7 +62,7 @@ export const EditAppModal = ({
},
},
behaviour: {
onClickUrl: (url: string) => {
externalUrl: (url: string) => {
if (url === undefined || url.length < 1) {
return null;
}
@@ -158,7 +158,7 @@ export const EditAppModal = ({
{t('tabs.general')}
</Tabs.Tab>
<Tabs.Tab
rightSection={<ValidationErrorIndicator keys={['behaviour.onClickUrl']} />}
rightSection={<ValidationErrorIndicator keys={['behaviour.externalUrl']} />}
icon={<IconClick size={14} />}
value="behaviour"
>

View File

@@ -35,7 +35,7 @@ export const GeneralTab = ({ form, openTab }: GeneralTabProps) => {
required
{...form.getInputProps('url')}
onChange={(e) => {
form.setFieldValue('behaviour.onClickUrl', e.target.value);
form.setFieldValue('behaviour.externalUrl', e.target.value);
form.setFieldValue('url', e.target.value);
}}
/>
@@ -46,7 +46,7 @@ export const GeneralTab = ({ form, openTab }: GeneralTabProps) => {
placeholder="https://homarr.mywebsite.com/"
variant="default"
mb="md"
{...form.getInputProps('behaviour.onClickUrl')}
{...form.getInputProps('behaviour.externalUrl')}
/>
</Tabs.Panel>
);

View File

@@ -43,7 +43,7 @@ export const AvailableElementTypes = ({
},
behaviour: {
isOpeningNewTab: true,
onClickUrl: '',
externalUrl: '',
},
area: {
type: 'sidebar',