Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit 833e827

Browse files
author
archy
committed
set new url in gh config.yaml & set curl as default target for code
1 parent 989edf6 commit 833e827

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: true
22
contact_links:
33
- name: Feature Request
4-
url: https://github.com/Kong/insomnia/discussions/categories/ideas
4+
url: https://github.com/ArchGPT/insomnium/discussions
55
about: Search and submit ideas for this project
6-
- name: Question
7-
url: https://chat.insomnia.rest/
8-
about: Please ask and answer questions about Insomnium in our Slack Community
6+
# - name: Question
7+
# url: https://chat.insomnia.rest/
8+
# about: Please ask and answer questions about Insomnium in our Slack Community

packages/insomnia/src/ui/components/modals/generate-code-modal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import { ModalFooter } from '../base/modal-footer';
1212
import { ModalHeader } from '../base/modal-header';
1313
import { CodeEditor, CodeEditorHandle } from '../codemirror/code-editor';
1414

15+
const defaultTarget = '{"key":"shell","title":"Shell","extname":".sh","default":"curl","clients":[{"key":"curl","title":"cURL","link":"http://curl.haxx.se/","description":"cURL is a command line tool and library for transferring data with URL syntax"},{"key":"httpie","title":"HTTPie","link":"http://httpie.org/","description":"a CLI, cURL-like tool for humans"},{"key":"wget","title":"Wget","link":"https://www.gnu.org/software/wget/","description":"a free software package for retrieving files using HTTP, HTTPS"}]}'
16+
17+
const defaultClient = '{"key":"curl","title":"cURL","link":"http://curl.haxx.se/","description":"cURL is a command line tool and library for transferring data with URL syntax"}'
18+
1519
const MODE_MAP: Record<string, string> = {
1620
c: 'clike',
1721
java: 'clike',
@@ -48,11 +52,11 @@ export const GenerateCodeModal = forwardRef<GenerateCodeModalHandle, Props>((pro
4852
let storedTarget: HTTPSnippetTarget | undefined;
4953
let storedClient: HTTPSnippetClient | undefined;
5054
try {
51-
storedTarget = JSON.parse(window.localStorage.getItem('insomnia::generateCode::target') || '') as HTTPSnippetTarget;
55+
storedTarget = JSON.parse(window.localStorage.getItem('insomnia::generateCode::target') || defaultTarget) as HTTPSnippetTarget;
5256
} catch (error) {}
5357

5458
try {
55-
storedClient = JSON.parse(window.localStorage.getItem('insomnia::generateCode::client') || '') as HTTPSnippetClient;
59+
storedClient = JSON.parse(window.localStorage.getItem('insomnia::generateCode::client') || defaultClient) as HTTPSnippetClient;
5660
} catch (error) {}
5761
const [state, setState] = useState<State>({
5862
cmd: '',

0 commit comments

Comments
 (0)