feat(settings): replace TextInputV2 with TextInput and update hotkey … (#12236)
…scope Replaced TextInputV2 with TextInput in SettingsSecurityApprovedAccessDomain for consistency with the input component. Added a new hotkey scope for the REST Playground page in PageChangeEffect to enable keyboard shortcut menu functionality. Fix #10981
This commit is contained in:
@ -223,6 +223,17 @@ export const PageChangeEffect = () => {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case isMatchingLocation(
|
||||||
|
location,
|
||||||
|
SettingsPath.RestPlayground,
|
||||||
|
AppBasePath.Settings,
|
||||||
|
): {
|
||||||
|
setHotkeyScope(PageHotkeyScope.Settings, {
|
||||||
|
goto: false,
|
||||||
|
keyboardShortcutMenu: true,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
case isMatchingLocation(
|
case isMatchingLocation(
|
||||||
location,
|
location,
|
||||||
SettingsPath.WorkspaceMembersPage,
|
SettingsPath.WorkspaceMembersPage,
|
||||||
|
|||||||
@ -11,9 +11,9 @@ import { Trans, useLingui } from '@lingui/react/macro';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||||
import { useCreateApprovedAccessDomainMutation } from '~/generated/graphql';
|
import { useCreateApprovedAccessDomainMutation } from '~/generated/graphql';
|
||||||
import { TextInputV2 } from '@/ui/input/components/TextInputV2';
|
|
||||||
import { H2Title } from 'twenty-ui/display';
|
import { H2Title } from 'twenty-ui/display';
|
||||||
import { Section } from 'twenty-ui/layout';
|
import { Section } from 'twenty-ui/layout';
|
||||||
|
import { TextInput } from '@/ui/input/components/TextInput';
|
||||||
|
|
||||||
export const SettingsSecurityApprovedAccessDomain = () => {
|
export const SettingsSecurityApprovedAccessDomain = () => {
|
||||||
const navigate = useNavigateSettings();
|
const navigate = useNavigateSettings();
|
||||||
@ -115,12 +115,11 @@ export const SettingsSecurityApprovedAccessDomain = () => {
|
|||||||
field: { onChange, value },
|
field: { onChange, value },
|
||||||
fieldState: { error },
|
fieldState: { error },
|
||||||
}) => (
|
}) => (
|
||||||
<TextInputV2
|
<TextInput
|
||||||
|
autoFocus
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(domain: string) => {
|
onChange={onChange}
|
||||||
onChange(domain);
|
|
||||||
}}
|
|
||||||
fullWidth
|
fullWidth
|
||||||
placeholder="yourdomain.com"
|
placeholder="yourdomain.com"
|
||||||
error={error?.message}
|
error={error?.message}
|
||||||
@ -140,7 +139,7 @@ export const SettingsSecurityApprovedAccessDomain = () => {
|
|||||||
field: { onChange, value },
|
field: { onChange, value },
|
||||||
fieldState: { error },
|
fieldState: { error },
|
||||||
}) => (
|
}) => (
|
||||||
<TextInputV2
|
<TextInput
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
value={value.split('@')[0]}
|
value={value.split('@')[0]}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
|||||||
Reference in New Issue
Block a user