From 084039f59f8db96167e606d20737f641542dba22 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Sat, 4 Dec 2021 18:59:26 +0530 Subject: [PATCH] refactor: minor ui improvements --- .../{corner-down-left.svg => folder-open.svg} | 5 ++- packages/hoppscotch-app/assets/icons/logo.svg | 25 ++++++++++++++ .../icons/{folder-minus.svg => wrap-text.svg} | 6 ++-- .../hoppscotch-app/components/app/Header.vue | 10 +++--- .../components/app/Shortcuts.vue | 2 +- .../components/button/Secondary.vue | 6 ++-- .../components/collections/ImportExport.vue | 2 -- .../collections/graphql/Collection.vue | 2 +- .../components/collections/graphql/Folder.vue | 2 +- .../collections/graphql/ImportExport.vue | 1 - .../components/collections/my/Collection.vue | 2 +- .../components/collections/my/Folder.vue | 2 +- .../collections/teams/Collection.vue | 2 +- .../components/collections/teams/Folder.vue | 2 +- .../hoppscotch-app/components/docs/Folder.vue | 2 +- .../components/environments/Edit.vue | 2 -- .../components/environments/Environment.vue | 2 +- .../components/environments/ImportExport.vue | 1 - .../components/graphql/RequestOptions.vue | 34 +++++++++---------- .../components/graphql/Response.vue | 2 +- .../components/graphql/Sidebar.vue | 2 +- .../components/history/graphql/Card.vue | 2 +- .../components/http/Authorization.vue | 20 +++++++++++ .../components/http/OAuth2Authorization.vue | 1 + .../components/http/PreRequestScript.vue | 2 +- .../components/http/RawBody.vue | 2 +- .../hoppscotch-app/components/http/Tests.vue | 2 +- .../lenses/renderers/HTMLLensRenderer.vue | 2 +- .../lenses/renderers/JSONLensRenderer.vue | 2 +- .../lenses/renderers/RawLensRenderer.vue | 2 +- .../lenses/renderers/XMLLensRenderer.vue | 2 +- .../components/realtime/Socketio.vue | 2 -- .../components/smart/AutoComplete.vue | 8 +++-- .../components/smart/FontSizePicker.vue | 5 +-- .../hoppscotch-app/components/smart/Modal.vue | 1 - .../components/smart/Toggle.vue | 6 ++-- .../hoppscotch-app/components/teams/Edit.vue | 21 +++++++++--- .../components/teams/Invite.vue | 27 +++++++++------ .../helpers/editor/themes/baseTheme.ts | 19 +++++++---- 39 files changed, 152 insertions(+), 88 deletions(-) rename packages/hoppscotch-app/assets/icons/{corner-down-left.svg => folder-open.svg} (62%) create mode 100644 packages/hoppscotch-app/assets/icons/logo.svg rename packages/hoppscotch-app/assets/icons/{folder-minus.svg => wrap-text.svg} (50%) diff --git a/packages/hoppscotch-app/assets/icons/corner-down-left.svg b/packages/hoppscotch-app/assets/icons/folder-open.svg similarity index 62% rename from packages/hoppscotch-app/assets/icons/corner-down-left.svg rename to packages/hoppscotch-app/assets/icons/folder-open.svg index f7781ca6..b60c4030 100644 --- a/packages/hoppscotch-app/assets/icons/corner-down-left.svg +++ b/packages/hoppscotch-app/assets/icons/folder-open.svg @@ -1,4 +1,3 @@ - - - \ No newline at end of file + + diff --git a/packages/hoppscotch-app/assets/icons/logo.svg b/packages/hoppscotch-app/assets/icons/logo.svg new file mode 100644 index 00000000..c806ceb9 --- /dev/null +++ b/packages/hoppscotch-app/assets/icons/logo.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/hoppscotch-app/assets/icons/folder-minus.svg b/packages/hoppscotch-app/assets/icons/wrap-text.svg similarity index 50% rename from packages/hoppscotch-app/assets/icons/folder-minus.svg rename to packages/hoppscotch-app/assets/icons/wrap-text.svg index 21e0b709..392a5d5a 100644 --- a/packages/hoppscotch-app/assets/icons/folder-minus.svg +++ b/packages/hoppscotch-app/assets/icons/wrap-text.svg @@ -1,4 +1,6 @@ - - + + + + \ No newline at end of file diff --git a/packages/hoppscotch-app/components/app/Header.vue b/packages/hoppscotch-app/components/app/Header.vue index 264d97e3..cfb25119 100644 --- a/packages/hoppscotch-app/components/app/Header.vue +++ b/packages/hoppscotch-app/components/app/Header.vue @@ -5,7 +5,7 @@ >
@@ -17,21 +17,21 @@ v-tippy="{ theme: 'tooltip' }" :title="t('header.install_pwa')" svg="download" - class="rounded" + class="rounded hover:bg-primaryDark focus-visible:bg-primaryDark" @click.native="showInstallPrompt()" /> diff --git a/packages/hoppscotch-app/components/app/Shortcuts.vue b/packages/hoppscotch-app/components/app/Shortcuts.vue index da55b0c5..e563b128 100644 --- a/packages/hoppscotch-app/components/app/Shortcuts.vue +++ b/packages/hoppscotch-app/components/app/Shortcuts.vue @@ -6,7 +6,7 @@ >

{{ t("app.shortcuts") }}

- +
diff --git a/packages/hoppscotch-app/components/button/Secondary.vue b/packages/hoppscotch-app/components/button/Secondary.vue index fac87b94..7b2abbd8 100644 --- a/packages/hoppscotch-app/components/button/Secondary.vue +++ b/packages/hoppscotch-app/components/button/Secondary.vue @@ -3,10 +3,10 @@ :to="`${/^\/(?!\/).*$/.test(to) ? localePath(to) : to}`" :exact="exact" :blank="blank" - class="font-semibold py-2 transition inline-flex items-center justify-center whitespace-nowrap hover:bg-primaryDark focus:outline-none focus-visible:bg-primaryDark" + class="font-semibold py-2 transition inline-flex items-center justify-center whitespace-nowrap focus:outline-none" :class="[ color - ? `text-${color}-500 hover:(text-${color}-600 text-${color}-600)` + ? `text-${color}-500 hover:text-${color}-600 focus-visible:text-${color}-600` : 'text-secondary hover:text-secondaryDark focus-visible:text-secondaryDark', label ? 'rounded px-4' : 'px-2', { 'rounded-full': rounded }, @@ -18,7 +18,7 @@ outline, }, { - '!bg-primaryLight !hover:bg-primaryDark !focus-visible:bg-primaryDark': + 'bg-primaryLight hover:bg-primaryDark focus-visible:bg-primaryDark': filled, }, ]" diff --git a/packages/hoppscotch-app/components/collections/ImportExport.vue b/packages/hoppscotch-app/components/collections/ImportExport.vue index 454c8d5a..bb1eaf8b 100644 --- a/packages/hoppscotch-app/components/collections/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/ImportExport.vue @@ -10,7 +10,6 @@ v-if="mode == 'import_from_my_collections'" v-tippy="{ theme: 'tooltip' }" :title="$t('action.go_back')" - class="rounded" svg="arrow-left" @click.native=" () => { @@ -34,7 +33,6 @@ diff --git a/packages/hoppscotch-app/components/collections/graphql/Collection.vue b/packages/hoppscotch-app/components/collections/graphql/Collection.vue index 1f5de7a8..fb692ab5 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Collection.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Collection.vue @@ -191,7 +191,7 @@ export default defineComponent({ getCollectionIcon() { if (this.isSelected) return "check-circle" else if (!this.showChildren && !this.isFiltered) return "folder" - else if (this.showChildren || this.isFiltered) return "folder-minus" + else if (this.showChildren || this.isFiltered) return "folder-open" else return "folder" }, }, diff --git a/packages/hoppscotch-app/components/collections/graphql/Folder.vue b/packages/hoppscotch-app/components/collections/graphql/Folder.vue index 6d6f4c19..9584a628 100644 --- a/packages/hoppscotch-app/components/collections/graphql/Folder.vue +++ b/packages/hoppscotch-app/components/collections/graphql/Folder.vue @@ -189,7 +189,7 @@ export default defineComponent({ getCollectionIcon() { if (this.isSelected) return "check-circle" else if (!this.showChildren && !this.isFiltered) return "folder" - else if (this.showChildren || this.isFiltered) return "folder-minus" + else if (this.showChildren || this.isFiltered) return "folder-open" else return "folder" }, }, diff --git a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue index 50f1067e..af9b0b25 100644 --- a/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/graphql/ImportExport.vue @@ -12,7 +12,6 @@ diff --git a/packages/hoppscotch-app/components/collections/my/Collection.vue b/packages/hoppscotch-app/components/collections/my/Collection.vue index 74fe8078..434ebee6 100644 --- a/packages/hoppscotch-app/components/collections/my/Collection.vue +++ b/packages/hoppscotch-app/components/collections/my/Collection.vue @@ -218,7 +218,7 @@ export default defineComponent({ getCollectionIcon() { if (this.isSelected) return "check-circle" else if (!this.showChildren && !this.isFiltered) return "folder" - else if (this.showChildren || this.isFiltered) return "folder-minus" + else if (this.showChildren || this.isFiltered) return "folder-open" else return "folder" }, }, diff --git a/packages/hoppscotch-app/components/collections/my/Folder.vue b/packages/hoppscotch-app/components/collections/my/Folder.vue index 9cd31984..875588fa 100644 --- a/packages/hoppscotch-app/components/collections/my/Folder.vue +++ b/packages/hoppscotch-app/components/collections/my/Folder.vue @@ -204,7 +204,7 @@ export default defineComponent({ getCollectionIcon() { if (this.isSelected) return "check-circle" else if (!this.showChildren && !this.isFiltered) return "folder" - else if (this.showChildren || this.isFiltered) return "folder-minus" + else if (this.showChildren || this.isFiltered) return "folder-open" else return "folder" }, }, diff --git a/packages/hoppscotch-app/components/collections/teams/Collection.vue b/packages/hoppscotch-app/components/collections/teams/Collection.vue index 6dd85375..84644396 100644 --- a/packages/hoppscotch-app/components/collections/teams/Collection.vue +++ b/packages/hoppscotch-app/components/collections/teams/Collection.vue @@ -210,7 +210,7 @@ export default defineComponent({ getCollectionIcon() { if (this.isSelected) return "check-circle" else if (!this.showChildren && !this.isFiltered) return "folder" - else if (this.showChildren || this.isFiltered) return "folder-minus" + else if (this.showChildren || this.isFiltered) return "folder-open" else return "folder" }, }, diff --git a/packages/hoppscotch-app/components/collections/teams/Folder.vue b/packages/hoppscotch-app/components/collections/teams/Folder.vue index 2dd67644..22abc364 100644 --- a/packages/hoppscotch-app/components/collections/teams/Folder.vue +++ b/packages/hoppscotch-app/components/collections/teams/Folder.vue @@ -192,7 +192,7 @@ export default defineComponent({ getCollectionIcon() { if (this.isSelected) return "check-circle" else if (!this.showChildren && !this.isFiltered) return "folder" - else if (this.showChildren || this.isFiltered) return "folder-minus" + else if (this.showChildren || this.isFiltered) return "folder-open" else return "folder" }, }, diff --git a/packages/hoppscotch-app/components/docs/Folder.vue b/packages/hoppscotch-app/components/docs/Folder.vue index 3d0530f5..cf04e3d9 100644 --- a/packages/hoppscotch-app/components/docs/Folder.vue +++ b/packages/hoppscotch-app/components/docs/Folder.vue @@ -1,7 +1,7 @@