mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 17:18:32 +02:00
Better import conversion
This commit is contained in:
@@ -1,28 +1,34 @@
|
|||||||
{
|
{
|
||||||
"_type": "export",
|
"_type": "export",
|
||||||
"__export_format": 4,
|
"__export_format": 4,
|
||||||
"__export_date": "2023-11-05T22:20:12.831Z",
|
"__export_date": "2023-11-05T22:45:17.994Z",
|
||||||
"__export_source": "insomnia.desktop.app:v8.3.0",
|
"__export_source": "insomnia.desktop.app:v8.3.0",
|
||||||
"resources": [
|
"resources": [
|
||||||
{
|
{
|
||||||
"_id": "req_cb5fb72d0afd4e479b70a824cedc325a",
|
"_id": "req_df86bf5272724c5696c45e4e36e0b87c",
|
||||||
"parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c",
|
"parentId": "fld_e1bea35e8d964ac59f996b358fbf502c",
|
||||||
"modified": 1699222790515,
|
"modified": 1699224307810,
|
||||||
"created": 1699222790515,
|
"created": 1679927297821,
|
||||||
"url": "",
|
"url": "https://spacex-production.up.railway.app",
|
||||||
"name": "New Request",
|
"name": "Capsules",
|
||||||
"description": "",
|
"description": "",
|
||||||
"method": "GET",
|
"method": "POST",
|
||||||
"body": {},
|
"body": {
|
||||||
|
"mimeType": "application/graphql",
|
||||||
|
"text": "{\"query\":\"query Q($limit: Int!) {\\n capsules(limit: $limit) {\\n id\\n }\\n}\\n\",\"operationName\":\"Q\",\"variables\":{\"limit\":2}}"
|
||||||
|
},
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
"name": "User-Agent",
|
"name": "Content-Type",
|
||||||
"value": "insomnia/8.3.0"
|
"value": "application/json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
"metaSortKey": -1699222790515,
|
"type": "bearer",
|
||||||
|
"token": "4c1736b6-d63f-4e07-860e-3da77c83dcde"
|
||||||
|
},
|
||||||
|
"metaSortKey": -1699224297493,
|
||||||
"isPrivate": false,
|
"isPrivate": false,
|
||||||
"settingStoreCookies": true,
|
"settingStoreCookies": true,
|
||||||
"settingSendCookies": true,
|
"settingSendCookies": true,
|
||||||
@@ -32,6 +38,18 @@
|
|||||||
"settingFollowRedirects": "global",
|
"settingFollowRedirects": "global",
|
||||||
"_type": "request"
|
"_type": "request"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"_id": "fld_e1bea35e8d964ac59f996b358fbf502c",
|
||||||
|
"parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c",
|
||||||
|
"modified": 1699224291103,
|
||||||
|
"created": 1699224291103,
|
||||||
|
"name": "SpaceX",
|
||||||
|
"description": "",
|
||||||
|
"environment": {},
|
||||||
|
"environmentPropertyOrder": null,
|
||||||
|
"metaSortKey": -1699224291103,
|
||||||
|
"_type": "request_group"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"_id": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c",
|
"_id": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c",
|
||||||
"parentId": null,
|
"parentId": null,
|
||||||
@@ -182,40 +200,6 @@
|
|||||||
"settingFollowRedirects": "global",
|
"settingFollowRedirects": "global",
|
||||||
"_type": "request"
|
"_type": "request"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"_id": "req_df86bf5272724c5696c45e4e36e0b87c",
|
|
||||||
"parentId": "fld_6030301042004f1d937834031923f864",
|
|
||||||
"modified": 1699222722899,
|
|
||||||
"created": 1679927297821,
|
|
||||||
"url": "https://spacex-production.up.railway.app",
|
|
||||||
"name": "New Request",
|
|
||||||
"description": "",
|
|
||||||
"method": "POST",
|
|
||||||
"body": {
|
|
||||||
"mimeType": "application/graphql",
|
|
||||||
"text": "{\"query\":\"query Q($limit: Int!) {\\n capsules(limit: $limit) {\\n id\\n }\\n}\\n\",\"operationName\":\"Operations\",\"variables\":{\"limits\":2}}"
|
|
||||||
},
|
|
||||||
"parameters": [],
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Content-Type",
|
|
||||||
"value": "application/json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"authentication": {
|
|
||||||
"type": "bearer",
|
|
||||||
"token": "4c1736b6-d63f-4e07-860e-3da77c83dcde"
|
|
||||||
},
|
|
||||||
"metaSortKey": -1699222709343,
|
|
||||||
"isPrivate": false,
|
|
||||||
"settingStoreCookies": true,
|
|
||||||
"settingSendCookies": true,
|
|
||||||
"settingDisableRenderRequestBody": false,
|
|
||||||
"settingEncodeUrl": true,
|
|
||||||
"settingRebuildPath": true,
|
|
||||||
"settingFollowRedirects": "global",
|
|
||||||
"_type": "request"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"_id": "req_4321f12845724866ae665653dc9013a1",
|
"_id": "req_4321f12845724866ae665653dc9013a1",
|
||||||
"parentId": "fld_6030301042004f1d937834031923f864",
|
"parentId": "fld_6030301042004f1d937834031923f864",
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent';
|
|||||||
import { useTheme } from '../hooks/useTheme';
|
import { useTheme } from '../hooks/useTheme';
|
||||||
import type { Environment, Folder, HttpRequest, Workspace } from '../lib/models';
|
import type { Environment, Folder, HttpRequest, Workspace } from '../lib/models';
|
||||||
import { pluralize } from '../lib/pluralize';
|
import { pluralize } from '../lib/pluralize';
|
||||||
|
import { Button } from './core/Button';
|
||||||
import type { DropdownItem, DropdownProps, DropdownRef } from './core/Dropdown';
|
import type { DropdownItem, DropdownProps, DropdownRef } from './core/Dropdown';
|
||||||
import { Dropdown } from './core/Dropdown';
|
import { Dropdown } from './core/Dropdown';
|
||||||
import { HotKey } from './core/HotKey';
|
import { HotKey } from './core/HotKey';
|
||||||
import { Icon } from './core/Icon';
|
import { Icon } from './core/Icon';
|
||||||
|
import { VStack } from './core/Stacks';
|
||||||
import { useDialog } from './DialogContext';
|
import { useDialog } from './DialogContext';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -59,12 +61,12 @@ export function RequestActionsDropdown({ requestId, children }: Props) {
|
|||||||
|
|
||||||
dialog.show({
|
dialog.show({
|
||||||
title: 'Import Complete',
|
title: 'Import Complete',
|
||||||
description: 'Imported the following:',
|
|
||||||
size: 'dynamic',
|
size: 'dynamic',
|
||||||
render: () => {
|
hideX: true,
|
||||||
|
render: ({ hide }) => {
|
||||||
const { workspaces, environments, folders, requests } = imported;
|
const { workspaces, environments, folders, requests } = imported;
|
||||||
return (
|
return (
|
||||||
<div>
|
<VStack space={3}>
|
||||||
<ul className="list-disc pl-6">
|
<ul className="list-disc pl-6">
|
||||||
<li>
|
<li>
|
||||||
{workspaces.length} {pluralize('Workspace', workspaces.length)}
|
{workspaces.length} {pluralize('Workspace', workspaces.length)}
|
||||||
@@ -79,7 +81,12 @@ export function RequestActionsDropdown({ requestId, children }: Props) {
|
|||||||
{requests.length} {pluralize('Request', requests.length)}
|
{requests.length} {pluralize('Request', requests.length)}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
<div>
|
||||||
|
<Button className="ml-auto" onClick={hide} color="primary">
|
||||||
|
Done
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</VStack>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user