mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
refactor: consistent style for warning
This commit is contained in:
committed by
Carlos Valente
parent
d8cef11a25
commit
b1da877dc7
@@ -3,8 +3,8 @@ import { useForm } from 'react-hook-form';
|
|||||||
|
|
||||||
import { maybeAxiosError } from '../../../../common/api/utils';
|
import { maybeAxiosError } from '../../../../common/api/utils';
|
||||||
import Button from '../../../../common/components/buttons/Button';
|
import Button from '../../../../common/components/buttons/Button';
|
||||||
|
import Info from '../../../../common/components/info/Info';
|
||||||
import Input from '../../../../common/components/input/input/Input';
|
import Input from '../../../../common/components/input/input/Input';
|
||||||
import Tag from '../../../../common/components/tag/Tag';
|
|
||||||
import useServerPort from '../../../../common/hooks-query/useServerPort';
|
import useServerPort from '../../../../common/hooks-query/useServerPort';
|
||||||
import { preventEscape } from '../../../../common/utils/keyEvent';
|
import { preventEscape } from '../../../../common/utils/keyEvent';
|
||||||
import { isOnlyNumbers } from '../../../../common/utils/regex';
|
import { isOnlyNumbers } from '../../../../common/utils/regex';
|
||||||
@@ -70,7 +70,6 @@ export default function ServerPortSettings() {
|
|||||||
<Panel.SubHeader>
|
<Panel.SubHeader>
|
||||||
Server port
|
Server port
|
||||||
<Panel.InlineElements>
|
<Panel.InlineElements>
|
||||||
{data.pendingRestart && <Tag>A port change is pending and will happen on the next restart</Tag>}
|
|
||||||
<Button disabled={!isDirty || isSubmitting} variant='ghosted' onClick={onReset}>
|
<Button disabled={!isDirty || isSubmitting} variant='ghosted' onClick={onReset}>
|
||||||
Revert to saved
|
Revert to saved
|
||||||
</Button>
|
</Button>
|
||||||
@@ -90,6 +89,9 @@ export default function ServerPortSettings() {
|
|||||||
{rootError && <Panel.Error>{rootError}</Panel.Error>}
|
{rootError && <Panel.Error>{rootError}</Panel.Error>}
|
||||||
<Panel.Divider />
|
<Panel.Divider />
|
||||||
<Panel.Section>
|
<Panel.Section>
|
||||||
|
{data.pendingRestart && (
|
||||||
|
<Info type='warning'>A port change is pending and will happen on the next restart.</Info>
|
||||||
|
)}
|
||||||
<Panel.ListGroup>
|
<Panel.ListGroup>
|
||||||
<Panel.ListItem>
|
<Panel.ListItem>
|
||||||
<Panel.Field
|
<Panel.Field
|
||||||
|
|||||||
Reference in New Issue
Block a user