From d9bab319e3fd99bf26b779248ab5cb33b494f60a Mon Sep 17 00:00:00 2001 From: Hari Narayanan Date: Wed, 25 Nov 2020 23:54:20 +0530 Subject: [PATCH 1/2] added request method label in collections --- components/collections/request.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/collections/request.vue b/components/collections/request.vue index b2b5e50d8..1105ac603 100644 --- a/components/collections/request.vue +++ b/components/collections/request.vue @@ -13,7 +13,7 @@ @click="!doc ? selectRequest() : {}" v-tooltip="!doc ? $t('use_request') : ''" > - insert_drive_file + {{ request.method }} {{ request.name }} @@ -68,6 +68,13 @@ export default { data() { return { dragging: false, + requestMethodLabels: { + get: "text-green-400", + post: "text-yellow-400", + put: "text-blue-400", + delete: "text-red-400", + default: "text-gray-400", + }, } }, methods: { @@ -100,6 +107,9 @@ export default { }) this.syncCollections() }, + getRequestLabelColor(method) { + return this.requestMethodLabels[method.toLowerCase()] || this.requestMethodLabels.default + }, }, } From 5426273cf8fb93d800fc348ed496cce731f1e2ff Mon Sep 17 00:00:00 2001 From: Hari Narayanan Date: Thu, 26 Nov 2020 00:38:03 +0530 Subject: [PATCH 2/2] custom method width --- pages/index.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 76eac606e..7da4760de 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -9,14 +9,12 @@ -