diff --git a/apps/client/src/common/components/client-modal/RedirectClientModal.tsx b/apps/client/src/common/components/client-modal/RedirectClientModal.tsx index 6da104950..b5d6febf9 100644 --- a/apps/client/src/common/components/client-modal/RedirectClientModal.tsx +++ b/apps/client/src/common/components/client-modal/RedirectClientModal.tsx @@ -33,6 +33,11 @@ export function RedirectClientModal({ id, isOpen, name, currentPath, origin, onC if (newPath === '/' || newPath === currentPath) { return; } + + if (newPath.startsWith('preset-')) { + setRedirect({ target: id, redirect: newPath }); + } + setRedirect({ target: id, redirect: newPath }); onClose(); }; @@ -45,7 +50,7 @@ export function RedirectClientModal({ id, isOpen, name, currentPath, origin, onC label: view.label, })), ...enabledPresets.map((preset) => ({ - value: preset.search, + value: `preset-${preset.alias}`, label: `URL Preset: ${preset.alias}`, })), ]; @@ -61,32 +66,11 @@ export function RedirectClientModal({ id, isOpen, name, currentPath, origin, onC <> Remotely redirect the client to a different URL.
- Either by selecting a URL Preset or entering a custom path. + Either by entering a custom path or selecting a URL Preset.

Manage URL Presets
-
- Select View or URL Preset -
- setSelected(value)} + disabled={enabledPresets.length === 0} + /> + + +
+
} /> diff --git a/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientControlPanel.module.scss b/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientControlPanel.module.scss index d2ac12273..3986b3ef6 100644 --- a/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientControlPanel.module.scss +++ b/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientControlPanel.module.scss @@ -14,4 +14,8 @@ .copiable { cursor: text ; user-select: text; -} \ No newline at end of file +} + +.self { + background-color: $blue-1100; +} diff --git a/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientList.tsx b/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientList.tsx index 5d8935a4d..c1698d264 100644 --- a/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientList.tsx +++ b/apps/client/src/features/app-settings/panel/network-panel/client-control/ClientList.tsx @@ -8,6 +8,7 @@ import { RenameClientModal } from '../../../../../common/components/client-modal import Tag from '../../../../../common/components/tag/Tag'; import { setClientRemote } from '../../../../../common/hooks/useSocket'; import { useClientStore } from '../../../../../common/stores/clientStore'; +import { cx } from '../../../../../common/utils/styleUtils'; import * as Panel from '../../../panel-utils/PanelUtils'; import style from './ClientControlPanel.module.scss'; @@ -71,13 +72,13 @@ export default function ClientList() { const { identify, name, path } = client; const isCurrent = id === key; return ( - + {isCurrent && SELF} {name} {path} - +