mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-01 04:24:03 +01:00
Share Yaak's request and response panes (#815)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ad0533901
commit
08a98d5f82
85 files changed
+5567
-2872
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import type { EditablePair, PairEditorHandle, PairEditorProps } from "../pairs/PairEditor";
|
||||
import { PairOrBulkEditor } from "../pairs/PairOrBulkEditor";
|
||||
import { VStack } from "../Stacks";
|
||||
|
||||
type Props = {
|
||||
forceUpdateKey: string;
|
||||
pairs: EditablePair[];
|
||||
stateKey: PairEditorProps["stateKey"];
|
||||
onChange?: PairEditorProps["onChange"];
|
||||
/** Show the parameters without a way to change them */
|
||||
readOnly?: boolean;
|
||||
setRef?: (handle: PairEditorHandle) => void;
|
||||
};
|
||||
|
||||
export function UrlParametersEditor({
|
||||
pairs,
|
||||
forceUpdateKey,
|
||||
onChange = ignoreChange,
|
||||
readOnly,
|
||||
setRef,
|
||||
stateKey,
|
||||
}: Props) {
|
||||
return (
|
||||
<VStack className="h-full">
|
||||
<PairOrBulkEditor
|
||||
setRef={setRef}
|
||||
allowMultilineValues
|
||||
forceUpdateKey={forceUpdateKey}
|
||||
nameAutocompleteFunctions
|
||||
nameAutocompleteVariables
|
||||
namePlaceholder="param_name"
|
||||
onChange={onChange}
|
||||
pairs={pairs}
|
||||
preferenceName="url_parameters"
|
||||
readOnly={readOnly}
|
||||
stateKey={stateKey}
|
||||
valueAutocompleteFunctions
|
||||
valueAutocompleteVariables
|
||||
valuePlaceholder="Value"
|
||||
/>
|
||||
</VStack>
|
||||
);
|
||||
}
|
||||
|
||||
function ignoreChange() {}
|
||||
Reference in new issue
Block a user