mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 23:09:47 +02:00
PR feedback
This commit is contained in:
@@ -118,7 +118,7 @@ async fn cmd_render_template<R: Runtime>(
|
|||||||
workspace_id: &str,
|
workspace_id: &str,
|
||||||
environment_id: Option<&str>,
|
environment_id: Option<&str>,
|
||||||
purpose: Option<RenderPurpose>,
|
purpose: Option<RenderPurpose>,
|
||||||
ignore_error: bool,
|
ignore_error: Option<bool>,
|
||||||
) -> YaakResult<String> {
|
) -> YaakResult<String> {
|
||||||
let environment_chain =
|
let environment_chain =
|
||||||
app_handle.db().resolve_environments(workspace_id, None, environment_id)?;
|
app_handle.db().resolve_environments(workspace_id, None, environment_id)?;
|
||||||
@@ -131,10 +131,9 @@ async fn cmd_render_template<R: Runtime>(
|
|||||||
purpose.unwrap_or(RenderPurpose::Preview),
|
purpose.unwrap_or(RenderPurpose::Preview),
|
||||||
),
|
),
|
||||||
&RenderOptions {
|
&RenderOptions {
|
||||||
error_behavior: if ignore_error {
|
error_behavior: match ignore_error {
|
||||||
RenderErrorBehavior::ReturnEmpty
|
Some(true) => RenderErrorBehavior::ReturnEmpty,
|
||||||
} else {
|
_ => RenderErrorBehavior::Throw,
|
||||||
RenderErrorBehavior::Throw
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
import type { Folder, GrpcRequest, HttpRequest, WebsocketRequest, Workspace } from '@yaakapp-internal/models';
|
import type {
|
||||||
|
Folder,
|
||||||
|
GrpcRequest,
|
||||||
|
HttpRequest,
|
||||||
|
WebsocketRequest,
|
||||||
|
Workspace,
|
||||||
|
} from '@yaakapp-internal/models';
|
||||||
import { patchModel } from '@yaakapp-internal/models';
|
import { patchModel } from '@yaakapp-internal/models';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { openFolderSettings } from '../commands/openFolderSettings';
|
import { openFolderSettings } from '../commands/openFolderSettings';
|
||||||
@@ -121,7 +127,6 @@ export function HttpAuthenticationEditor({ model }: Props) {
|
|||||||
} else {
|
} else {
|
||||||
disabled = '';
|
disabled = '';
|
||||||
}
|
}
|
||||||
console.log('SETTING DISABLED', disabled);
|
|
||||||
await handleChange({ ...model.authentication, disabled });
|
await handleChange({ ...model.authentication, disabled });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -178,7 +183,6 @@ function AuthenticationDisabledInput({
|
|||||||
template: value,
|
template: value,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
purpose: 'preview',
|
purpose: 'preview',
|
||||||
ignoreError: true,
|
|
||||||
refreshKey: value,
|
refreshKey: value,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ export function SegmentedControl<T extends string>({
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
key={o.label}
|
key={o.label}
|
||||||
|
aria-checked={isActive}
|
||||||
size={size}
|
size={size}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color={isActive ? 'secondary' : undefined}
|
color={isActive ? 'secondary' : undefined}
|
||||||
@@ -99,6 +100,7 @@ export function SegmentedControl<T extends string>({
|
|||||||
return (
|
return (
|
||||||
<IconButton
|
<IconButton
|
||||||
key={o.label}
|
key={o.label}
|
||||||
|
aria-checked={isActive}
|
||||||
size={size}
|
size={size}
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color={isActive ? 'secondary' : undefined}
|
color={isActive ? 'secondary' : undefined}
|
||||||
|
|||||||
Reference in New Issue
Block a user