From a5ba7cf09a8a005a47c1004fd436661b895aa571 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Thu, 10 Oct 2024 10:03:32 +0200 Subject: [PATCH] fix: address CRs and code styles --- packages/ui/.eslintrc.js | 4 ++ packages/ui/src/components/Frame.vue | 4 +- .../src/components/GraphQLSchemaFetcher.vue | 2 +- packages/ui/src/components/ResponsePanel.vue | 2 +- .../ui/src/components/SnippetDropdown.vue | 16 +++--- packages/ui/src/components/TabBar.vue | 55 +++++++++---------- .../ui/src/components/modals/LogsModal.vue | 2 +- .../modals/ResponseFilteringHelpModal.vue | 2 +- .../src/components/modals/SettingsModal.vue | 21 +++---- packages/ui/src/constants.ts | 4 +- packages/ui/src/global.d.ts | 2 +- packages/ui/src/helpers.ts | 8 ++- packages/ui/src/plugin.ts | 2 +- packages/ui/src/store.ts | 4 +- .../ui/src/utils/codemirror-extensions.ts | 2 +- 15 files changed, 68 insertions(+), 62 deletions(-) diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js index fc833154..e5c0a6c9 100644 --- a/packages/ui/.eslintrc.js +++ b/packages/ui/.eslintrc.js @@ -71,5 +71,9 @@ module.exports = { 'vue/singleline-html-element-content-newline': 'off', 'vue/order-in-components': 'off', 'vue/require-explicit-emits': 'off', + 'object-curly-spacing': [ + "error", + "always" + ] } } diff --git a/packages/ui/src/components/Frame.vue b/packages/ui/src/components/Frame.vue index f5dbd6ec..9c998df0 100644 --- a/packages/ui/src/components/Frame.vue +++ b/packages/ui/src/components/Frame.vue @@ -8,9 +8,11 @@ import ImportModal from '@/components/ImportModal.vue' import { computed, onMounted, onBeforeUnmount, ref } from 'vue' import { useStore } from 'vuex' import constants from '../constants' +import { getSettingsConfig } from '@/helpers' const store = useStore() const activeTab = computed(() => store.state.activeTab) +const showTabs = computed(() => getSettingsConfig().showTabs) const requestResponseLayoutTopBottom = computed(() => store.state.requestResponseLayout === 'top-bottom') const detachedTabs = computed({ get() { @@ -93,7 +95,7 @@ onBeforeUnmount(() => { -
+
diff --git a/packages/ui/src/components/GraphQLSchemaFetcher.vue b/packages/ui/src/components/GraphQLSchemaFetcher.vue index b4ae0176..7908c954 100644 --- a/packages/ui/src/components/GraphQLSchemaFetcher.vue +++ b/packages/ui/src/components/GraphQLSchemaFetcher.vue @@ -79,7 +79,7 @@ - -