mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 10:08:29 +02:00
Fix copy-as-curl variables
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"productName": "yaak",
|
"productName": "yaak",
|
||||||
"version": "2024.5.1",
|
"version": "2024.5.2",
|
||||||
"identifier": "app.yaak.desktop",
|
"identifier": "app.yaak.desktop",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeBuildCommand": "npm run build",
|
"beforeBuildCommand": "npm run build",
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { invoke } from '@tauri-apps/api/core';
|
import { invoke } from '@tauri-apps/api/core';
|
||||||
|
import { useActiveEnvironmentId } from './useActiveEnvironmentId';
|
||||||
import { useClipboardText } from './useClipboardText';
|
import { useClipboardText } from './useClipboardText';
|
||||||
|
|
||||||
export function useCopyAsCurl(requestId: string) {
|
export function useCopyAsCurl(requestId: string) {
|
||||||
const [, copy] = useClipboardText();
|
const [, copy] = useClipboardText();
|
||||||
|
const environmentId = useActiveEnvironmentId();
|
||||||
return async () => {
|
return async () => {
|
||||||
const cmd: string = await invoke('cmd_request_to_curl', { requestId });
|
const cmd: string = await invoke('cmd_request_to_curl', { requestId, environmentId });
|
||||||
copy(cmd);
|
copy(cmd);
|
||||||
return cmd;
|
return cmd;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user