diff --git a/src-web/components/FolderSettingsDialog.tsx b/src-web/components/FolderSettingsDialog.tsx index 0d9ff6b5..7031e47a 100644 --- a/src-web/components/FolderSettingsDialog.tsx +++ b/src-web/components/FolderSettingsDialog.tsx @@ -59,18 +59,17 @@ export function FolderSettingsDialog({ folderId, tab }: Props) { - + patchModel(folder, { name })} stateKey={`name.${folder.id}`} /> - patchModel(folder, { description })} diff --git a/src-web/components/HttpAuthenticationEditor.tsx b/src-web/components/HttpAuthenticationEditor.tsx index 2fbe85fc..b42fb50d 100644 --- a/src-web/components/HttpAuthenticationEditor.tsx +++ b/src-web/components/HttpAuthenticationEditor.tsx @@ -18,6 +18,7 @@ import { Dropdown } from './core/Dropdown'; import { Icon } from './core/Icon'; import { IconButton } from './core/IconButton'; import { InlineCode } from './core/InlineCode'; +import { Link } from './core/Link'; import { HStack } from './core/Stacks'; import { DynamicForm } from './DynamicForm'; import { EmptyStateText } from './EmptyStateText'; @@ -52,7 +53,20 @@ export function HttpAuthenticationEditor({ model }: Props) { } if (inheritedAuth == null) { - return Authentication not configured; + if (model.model === 'workspace' || model.model === 'folder') { + return ( + +

+ Apply auth to all requests in {resolvedModelName(model)} +

+ + Documentation + +
+ ); + } else { + return Authentication not configured; + } } if (inheritedAuth.authenticationType === 'none') { diff --git a/src-web/components/WorkspaceSettingsDialog.tsx b/src-web/components/WorkspaceSettingsDialog.tsx index 9e6a9fea..feb9f0ef 100644 --- a/src-web/components/WorkspaceSettingsDialog.tsx +++ b/src-web/components/WorkspaceSettingsDialog.tsx @@ -26,15 +26,22 @@ interface Props { } const TAB_AUTH = 'auth'; +const TAB_DESCRIPTION = 'description'; const TAB_HEADERS = 'headers'; const TAB_GENERAL = 'general'; -export type WorkspaceSettingsTab = typeof TAB_AUTH | typeof TAB_HEADERS | typeof TAB_GENERAL; +export type WorkspaceSettingsTab = + | typeof TAB_AUTH + | typeof TAB_HEADERS + | typeof TAB_GENERAL + | typeof TAB_DESCRIPTION; + +const DEFAULT_TAB: WorkspaceSettingsTab = TAB_DESCRIPTION; export function WorkspaceSettingsDialog({ workspaceId, hide, tab }: Props) { const workspace = useAtomValue(workspacesAtom).find((w) => w.id === workspaceId); const workspaceMeta = useAtomValue(workspaceMetasAtom).find((m) => m.workspaceId === workspaceId); - const [activeTab, setActiveTab] = useState(tab ?? TAB_GENERAL); + const [activeTab, setActiveTab] = useState(tab ?? DEFAULT_TAB); const authTab = useAuthTab(TAB_AUTH, workspace ?? null); const headersTab = useHeadersTab(TAB_HEADERS, workspace ?? null); const inheritedHeaders = useInheritedHeaders(workspace ?? null); @@ -61,7 +68,15 @@ export function WorkspaceSettingsDialog({ workspaceId, hide, tab }: Props) { label="Folder Settings" className="px-1.5 pb-2" addBorders - tabs={[{ value: TAB_GENERAL, label: 'General' }, ...authTab, ...headersTab]} + tabs={[ + { value: TAB_DESCRIPTION, label: 'Description' }, + { + value: TAB_GENERAL, + label: 'General', + }, + ...authTab, + ...headersTab, + ]} > @@ -75,7 +90,7 @@ export function WorkspaceSettingsDialog({ workspaceId, hide, tab }: Props) { stateKey={`headers.${workspace.id}`} /> - + patchModel(workspace, { description })} heightMode="auto" /> - + + + +