mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-30 14:12:07 +02:00
Toast component and use for copy-as-curl
This commit is contained in:
@@ -250,15 +250,13 @@ export const RequestPane = memo(function RequestPane({
|
||||
if (!command.startsWith('curl ')) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
await confirm({
|
||||
id: 'paste-curl',
|
||||
title: 'Import from Curl?',
|
||||
description:
|
||||
'Do you want to overwrite the current request with the Curl command?',
|
||||
confirmText: 'Overwrite',
|
||||
})
|
||||
) {
|
||||
const confirmed = await confirm({
|
||||
id: 'paste-curl',
|
||||
title: 'Import from Curl?',
|
||||
description: 'Do you want to overwrite the current request with the Curl command?',
|
||||
confirmText: 'Overwrite',
|
||||
});
|
||||
if (confirmed) {
|
||||
importCurl.mutate({ requestId: activeRequestId, command });
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user