From b18f7af28fd1d9dc29ed016127647bbf7f6e1780 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Thu, 12 Aug 2021 13:56:11 +0530 Subject: [PATCH] feat: enable / disable authorization --- assets/scss/themes.scss | 18 ++--- components/app/Search.vue | 8 +- components/http/Auth.vue | 124 +++++++++++++++++++------------ components/http/Body.vue | 70 ++++++++++------- components/http/ImportCurl.vue | 1 + helpers/shortcuts.js | 12 +-- helpers/types/HoppRESTAuth.ts | 3 + helpers/types/HoppRESTRequest.ts | 5 +- helpers/utils/EffectiveURL.ts | 32 ++++---- lang/en-US.json | 4 +- newstore/RESTSession.ts | 1 + pages/index.vue | 2 +- 12 files changed, 172 insertions(+), 108 deletions(-) diff --git a/assets/scss/themes.scss b/assets/scss/themes.scss index 05e04c1b7..28b3feec3 100644 --- a/assets/scss/themes.scss +++ b/assets/scss/themes.scss @@ -99,7 +99,7 @@ // Dark Accent color --accent-dark-color: theme("colors.green.600"); // Light Contrast color - --accent-contrast-color: theme("colors.green.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.green.200"); // Gradient via @@ -116,7 +116,7 @@ // Dark Accent color --accent-dark-color: theme("colors.teal.600"); // Light Contrast color - --accent-contrast-color: theme("colors.teal.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.teal.200"); // Gradient via @@ -133,7 +133,7 @@ // Dark Accent color --accent-dark-color: theme("colors.blue.600"); // Light Contrast color - --accent-contrast-color: theme("colors.blue.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.blue.200"); // Gradient via @@ -150,7 +150,7 @@ // Dark Accent color --accent-dark-color: theme("colors.indigo.600"); // Light Contrast color - --accent-contrast-color: theme("colors.indigo.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.indigo.200"); // Gradient via @@ -167,7 +167,7 @@ // Dark Accent color --accent-dark-color: theme("colors.purple.600"); // Light Contrast color - --accent-contrast-color: theme("colors.purple.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.purple.200"); // Gradient via @@ -184,7 +184,7 @@ // Dark Accent color --accent-dark-color: theme("colors.yellow.600"); // Light Contrast color - --accent-contrast-color: theme("colors.yellow.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.yellow.200"); // Gradient via @@ -201,7 +201,7 @@ // Dark Accent color --accent-dark-color: theme("colors.orange.600"); // Light Contrast color - --accent-contrast-color: theme("colors.orange.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.orange.200"); // Gradient via @@ -218,7 +218,7 @@ // Dark Accent color --accent-dark-color: theme("colors.red.600"); // Light Contrast color - --accent-contrast-color: theme("colors.red.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.red.200"); // Gradient via @@ -235,7 +235,7 @@ // Dark Accent color --accent-dark-color: theme("colors.pink.600"); // Light Contrast color - --accent-contrast-color: theme("colors.pink.50"); + --accent-contrast-color: theme("colors.white"); // Gradient from --gradient-from-color: theme("colors.pink.200"); // Gradient via diff --git a/components/app/Search.vue b/components/app/Search.vue index 9adaf600a..0d506a870 100644 --- a/components/app/Search.vue +++ b/components/app/Search.vue @@ -92,10 +92,10 @@ export default { }, computed: { filteredMappings() { - return this.mappings.filter((map) => - map.shortcuts.find((shortcut) => - shortcut.keywords.find((key) => - key.includes(this.search.toLowerCase()) + return this.mappings.filter((mapping) => + mapping.shortcuts.some((shortcut) => + shortcut.keywords.some((keyword) => + keyword.toLowerCase().includes(this.search.toLowerCase()) ) ) ) diff --git a/components/http/Auth.vue b/components/http/Auth.vue index 57079561e..0d537ceea 100644 --- a/components/http/Auth.vue +++ b/components/http/Auth.vue @@ -1,52 +1,77 @@