From d0cf780ea22cb71bb7919ab6706ac8c6d57f5a8d Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 3 Feb 2020 17:47:48 -0500 Subject: [PATCH 1/3] Show Ctrl instead of Command for shortcuts non-Apple platforms --- layouts/default.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/layouts/default.vue b/layouts/default.vue index 0e44bca59..ba1973406 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -566,19 +566,19 @@
- ⌘ G + {{ getSpecialKey() }} G
- ⌘ S + {{ getSpecialKey() }} S
- ⌘ K + {{ getSpecialKey() }} K
- ⌘ L + {{ getSpecialKey() }} L
@@ -677,6 +677,9 @@ export default { }, methods: { + getSpecialKey() { + return (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) ? "⌘" : "Ctrl"; + }, linkActive(path) { return { "nuxt-link-exact-active": this.$route.path === path, From 06d58547c88b2f02bd2b614bb617fffff93d8366 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Tue, 4 Feb 2020 07:05:37 +0530 Subject: [PATCH 2/3] :sparkles: Custom methods support (follow up of #398) --- assets/css/styles.scss | 8 +++ pages/index.vue | 109 ++++++++++++++++++++++++++++++++++------- 2 files changed, 100 insertions(+), 17 deletions(-) diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 5906ac886..382870d31 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -587,6 +587,14 @@ pre { .select-wrapper { position: relative; + input { + text-transform: uppercase; + } + + .trigger { + width: 100%; + } + &:after { display: inline-block; position: absolute; diff --git a/pages/index.vue b/pages/index.vue index 300204ede..af395bd97 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -45,17 +45,92 @@
  • - + + + +
  • @@ -1574,6 +1649,12 @@ export default { editingRequest(newValue) { this.editRequest = newValue; this.showRequestModal = true; + }, + method() { + // this.$store.commit('setState', { 'value': ["POST", "PUT", "PATCH"].includes(this.method) ? 'application/json' : '', 'attribute': 'contentType' }) + this.contentType = ["POST", "PUT", "PATCH"].includes(this.method) + ? "application/json" + : ""; } }, computed: { @@ -2669,12 +2750,6 @@ export default { } this.setRouteQueryState(); }, - methodChange() { - // this.$store.commit('setState', { 'value': ["POST", "PUT", "PATCH"].includes(this.method) ? 'application/json' : '', 'attribute': 'contentType' }) - this.contentType = ["POST", "PUT", "PATCH"].includes(this.method) - ? "application/json" - : ""; - }, uploadPayload() { this.rawInput = true; const file = this.$refs.payload.files[0]; From 6a13b8c3c5fe5706f8eb56cbde3a011c961c4cdb Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Tue, 4 Feb 2020 20:52:52 +0530 Subject: [PATCH 3/3] :art: Better drop-down for `method` field --- assets/css/styles.scss | 2 ++ pages/index.vue | 69 +++++++++++++++++++++++++++++++++++------- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 382870d31..902ec8af5 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -538,6 +538,7 @@ input[type="radio"], display: none; } +.method, kbd, select, input, @@ -557,6 +558,7 @@ code { transition: all 0.2s ease-in-out; user-select: text; width: calc(100% - 8px); + min-width: 128px; resize: vertical; text-overflow: ellipsis; diff --git a/pages/index.vue b/pages/index.vue index af395bd97..b6f087d48 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -46,12 +46,22 @@ - + + @@ -1559,7 +1605,8 @@ export default { responseBodyType: "text", responseBodyMaxLines: 16, activeSidebar: true, - fb + fb, + customMethod: false }; }, watch: {