diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 5906ac886..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; @@ -587,6 +589,14 @@ pre { .select-wrapper { position: relative; + input { + text-transform: uppercase; + } + + .trigger { + width: 100%; + } + &:after { display: inline-block; position: absolute; 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, diff --git a/pages/index.vue b/pages/index.vue index 300204ede..b6f087d48 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -45,17 +45,138 @@
  • - + + + + +
  • @@ -1484,7 +1605,8 @@ export default { responseBodyType: "text", responseBodyMaxLines: 16, activeSidebar: true, - fb + fb, + customMethod: false }; }, watch: { @@ -1574,6 +1696,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 +2797,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];