diff --git a/assets/scss/styles.scss b/assets/scss/styles.scss index d2f9f6ad1..62a8a1d0d 100644 --- a/assets/scss/styles.scss +++ b/assets/scss/styles.scss @@ -63,7 +63,7 @@ body { .page-leave-active, .layout-enter-active, .layout-leave-active { - @apply transition-opacity; + @apply transition; } .page-enter, @@ -96,7 +96,6 @@ a { &.link { @apply items-center; @apply text-accent; - @apply hover:text-accent; @apply focus:text-accent; } @@ -153,22 +152,17 @@ button { @apply items-stretch; } +hr { + @apply border-b; + @apply border-divider; +} + .heading { @apply font-bold; @apply text-secondaryDark; @apply text-lg; } -.info:not(.toasted) { - @apply m-4; - @apply text-secondaryLight; - - .material-icons { - @apply align-middle; - @apply mr-2; - } -} - input { @apply truncate; } diff --git a/components/app/Extensions.vue b/components/app/Extensions.vue index e70ead0c9..1fff480d4 100644 --- a/components/app/Extensions.vue +++ b/components/app/Extensions.vue @@ -7,30 +7,28 @@ + diff --git a/components/app/Header.vue b/components/app/Header.vue index 1d553d923..d2e313077 100644 --- a/components/app/Header.vue +++ b/components/app/Header.vue @@ -12,10 +12,11 @@ @click.native="showInstallPrompt()" /> - - - - + @@ -110,7 +110,6 @@ export default { showLogin: false, showExtensions: false, showShortcuts: false, - showEmail: false, navigatorShare: navigator.share, } }, @@ -222,31 +221,3 @@ export default { }, } - - diff --git a/components/app/Login.vue b/components/app/Login.vue deleted file mode 100644 index 8c7a4373f..000000000 --- a/components/app/Login.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/components/app/Sidenav.vue b/components/app/Sidenav.vue index cf9cd753d..b98c8590d 100644 --- a/components/app/Sidenav.vue +++ b/components/app/Sidenav.vue @@ -7,15 +7,15 @@ :to="localePath(navigation.target)" class=" p-4 - text-xs flex-col flex-1 - hover:bg-primaryLight + hover:bg-primaryDark hover:text-secondaryDark items-center justify-center + transition " > - {{ navigation.icon }} - {{ navigation.title }} + {{ navigation.icon }} + {{ navigation.title }} @@ -36,67 +36,11 @@ export default { ], } }, - computed: { - currentNavigation() { - return this.navigation.filter((item) => - this.$route.name.includes(item.primary) - ) - }, - }, - mounted() { - window.addEventListener("scroll", () => { - const mainNavLinks = document.querySelectorAll("nav.secondary-nav a") - const fromTop = window.scrollY - mainNavLinks.forEach(({ hash, classList }) => { - const section = document.querySelector(hash) - if ( - section && - section.offsetTop <= fromTop && - section.offsetTop + section.offsetHeight > fromTop - ) { - classList.add("current") - } else { - classList.remove("current") - } - }) - }) - }, } diff --git a/components/collections/graphql/Collection.vue b/components/collections/graphql/Collection.vue index 532e74225..b0d3a6db8 100644 --- a/components/collections/graphql/Collection.vue +++ b/components/collections/graphql/Collection.vue @@ -1,7 +1,7 @@ - - diff --git a/components/firebase/Login.vue b/components/firebase/Login.vue index 10c19be59..e05c2a57b 100644 --- a/components/firebase/Login.vue +++ b/components/firebase/Login.vue @@ -1,49 +1,52 @@ diff --git a/components/smart/AceEditor.vue b/components/smart/AceEditor.vue index 5fdb658bc..f6c631242 100644 --- a/components/smart/AceEditor.vue +++ b/components/smart/AceEditor.vue @@ -277,9 +277,6 @@ export default { .label { @apply p-2; - - @apply ease-in-out; - @apply duration-150; } .siblings { diff --git a/components/smart/AutoComplete.vue b/components/smart/AutoComplete.vue index e692112fe..b59685198 100644 --- a/components/smart/AutoComplete.vue +++ b/components/smart/AutoComplete.vue @@ -200,9 +200,6 @@ export default { @apply mx-2; @apply left-0; @apply z-50; - - @apply ease-in-out; - @apply duration-150; @apply shadow-lg; top: calc(100% - 8px); diff --git a/components/smart/ChangeLanguage.vue b/components/smart/ChangeLanguage.vue index 7bf8d02e9..6e417f1c5 100644 --- a/components/smart/ChangeLanguage.vue +++ b/components/smart/ChangeLanguage.vue @@ -6,44 +6,26 @@ trigger="click" theme="popover" arrow - interactive :animate-fill="false" > - - - {{ locale.country | formatCountry }} - - - {{ locale.name }} - - + :to="switchLocalePath(locale.code).toString()" + :label="`${locale.country | formatCountry} ${locale.name}`" + /> diff --git a/components/smart/ColorModePicker.vue b/components/smart/ColorModePicker.vue index d3027da16..9b2fdcacb 100644 --- a/components/smart/ColorModePicker.vue +++ b/components/smart/ColorModePicker.vue @@ -1,31 +1,17 @@ diff --git a/components/smart/DeletableChip.vue b/components/smart/DeletableChip.vue index b789916a4..a0c072ddd 100644 --- a/components/smart/DeletableChip.vue +++ b/components/smart/DeletableChip.vue @@ -21,8 +21,6 @@ @apply text-secondary; @apply font-mono; - @apply ease-in-out; - @apply duration-150; @apply border border-divider; } diff --git a/components/smart/Item.vue b/components/smart/Item.vue index 321d233ca..d7f50f4a3 100644 --- a/components/smart/Item.vue +++ b/components/smart/Item.vue @@ -16,24 +16,29 @@ " :class="[ { 'opacity-50 cursor-not-allowed': disabled }, + { 'pointer-events-none': loading }, { 'flex-1': label }, { 'flex-row-reverse justify-end': reverse }, ]" :disabled="disabled" + :tabindex="loading ? '-1' : '0'" > - - {{ icon }} - - + + + {{ icon }} + + + +
{{ label }} @@ -42,6 +47,9 @@ {{ description }}

+ + {{ infoIcon }} + @@ -80,14 +88,18 @@ export default { type: Boolean, default: false, }, - infoIcon: { - type: String, - default: "", + loading: { + type: Boolean, + default: false, }, reverse: { type: Boolean, default: false, }, + infoIcon: { + type: String, + default: "", + }, }, } diff --git a/components/smart/Modal.vue b/components/smart/Modal.vue index cb16dcaec..1686e514b 100644 --- a/components/smart/Modal.vue +++ b/components/smart/Modal.vue @@ -123,8 +123,8 @@ export default { @apply flex; @apply items-center; @apply justify-center; - @apply ease-in-out; - @apply duration-150; + @apply transition; + @apply bg-primaryLight; } @@ -133,13 +133,11 @@ export default { @apply flex flex-1 flex-col; @apply m-2; @apply p-4; - @apply ease-in-out; - @apply duration-150; + @apply transition; @apply bg-primary; @apply rounded-lg; @apply shadow-xl; @apply max-w-md; - @apply max-h-xl; } .modal-header { @@ -149,6 +147,7 @@ export default { .modal-body { @apply my-4; @apply overflow-auto; + @apply max-h-xl; } .modal-footer { @@ -164,7 +163,6 @@ export default { .modal-leave-active .modal-container { @apply transform; @apply scale-90; - @apply ease-in-out; - @apply duration-150; + @apply transition; } diff --git a/components/smart/Spinner.vue b/components/smart/Spinner.vue index b981726e8..c06ced862 100644 --- a/components/smart/Spinner.vue +++ b/components/smart/Spinner.vue @@ -1,7 +1,6 @@ - - diff --git a/components/smart/Toggle.vue b/components/smart/Toggle.vue index 98b55bace..989cb4945 100644 --- a/components/smart/Toggle.vue +++ b/components/smart/Toggle.vue @@ -45,7 +45,7 @@ $transition: all 0.2s ease-in-out; @apply align-middle; @apply rounded-full; @apply p-0; - @apply m-4; + @apply mr-4; @apply cursor-pointer; @apply flex-shrink-0; diff --git a/components/teams/index.vue b/components/teams/index.vue index e0f1878ca..4adcd789c 100644 --- a/components/teams/index.vue +++ b/components/teams/index.vue @@ -6,7 +6,11 @@

- +

@@ -45,7 +49,7 @@ - + @@ -62,7 +66,7 @@ export default { editingteamID: "", me: {}, myTeams: [], - showEmail: false, + showLogin: false, } }, subscriptions() { diff --git a/components/translate/Fade.vue b/components/translate/Fade.vue index 678612d9e..c7d613a11 100644 --- a/components/translate/Fade.vue +++ b/components/translate/Fade.vue @@ -2,10 +2,10 @@ diff --git a/components/translate/SlideRight.vue b/components/translate/SlideRight.vue index 84f4ec2ea..ede0db7f6 100644 --- a/components/translate/SlideRight.vue +++ b/components/translate/SlideRight.vue @@ -2,10 +2,10 @@ diff --git a/lang/en-US.json b/lang/en-US.json index a55efc320..efe18936f 100644 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -251,11 +251,12 @@ "extensions_use_toggle": "Use the browser extension to send requests (if present)", "extension_version": "Extension Version", "extension_ver_not_reported": "Not Reported", - "extensions_info1": "Browser extension that simplifies access to Hoppscotch", + "extensions_info1": "Browser extension simplifies access to Hoppscotch, fix CORS issues, etc.", "extensions_info2": "Get Hoppscotch browser extension!", "installed": "Installed", "login_with": "Login with", "login": "Login", + "login_to_hoppscotch": "Login to Hoppscotch", "logged_out": "Logged out", "login_success": "Successfully logged in", "logout": "Logout", @@ -333,10 +334,9 @@ "import_from_my_collections": "Import from My Collections", "export_as_json": "Export as JSON", "send_magic_link": "Send a magic link", - "check_your_inbox": "Check your inbox.", "you_can_dismiss_this_modal": "You can dismiss this ", "we_sent_magic_link": "We sent you a magic link!", - "we_sent_magic_link_description": "We sent an email to {email}. It contains a magic link that’ll log you in.", + "we_sent_magic_link_description": "Check your inbox - we sent an email to {email}. It contains a magic link that will log you in.", "hide_sidebar": "Hide sidebar", "show_sidebar": "Show sidebar", "protocols": "Protocols", diff --git a/nuxt.config.js b/nuxt.config.js index 051b4a80f..d99e5595f 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -443,6 +443,6 @@ export default { // Router configuration (https://nuxtjs.org/api/configuration-router) router: { - linkExactActiveClass: "text-accent", + linkExactActiveClass: "active", }, } diff --git a/package-lock.json b/package-lock.json index 48781612c..ec1395d3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "tern": "^0.24.3", "three": "^0.130.0", "three-globe": "^2.18.5", + "three-trackballcontrols": "^0.9.0", "vue-apollo": "^3.0.7", "vue-cli-plugin-apollo": "^0.22.2", "vue-functional-data-merge": "^3.1.0", @@ -28000,6 +28001,14 @@ "three": ">=0.88.0" } }, + "node_modules/three-trackballcontrols": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/three-trackballcontrols/-/three-trackballcontrols-0.9.0.tgz", + "integrity": "sha512-Z6HmIJnP70r5uONvcPCdLEF0SsG1kbGzNb7qQYj3c7b6v2E3XTlbNpZsgTjt36oKm0Z2tU11D6EbW4i8KIHuqA==", + "peerDependencies": { + "three": ">= 0.86 <= 1.0" + } + }, "node_modules/throat": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", @@ -55000,6 +55009,12 @@ "tinycolor2": "^1.4" } }, + "three-trackballcontrols": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/three-trackballcontrols/-/three-trackballcontrols-0.9.0.tgz", + "integrity": "sha512-Z6HmIJnP70r5uONvcPCdLEF0SsG1kbGzNb7qQYj3c7b6v2E3XTlbNpZsgTjt36oKm0Z2tU11D6EbW4i8KIHuqA==", + "requires": {} + }, "throat": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", diff --git a/package.json b/package.json index c0410571c..f8f1bf726 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "tern": "^0.24.3", "three": "^0.130.0", "three-globe": "^2.18.5", + "three-trackballcontrols": "^0.9.0", "vue-apollo": "^3.0.7", "vue-cli-plugin-apollo": "^0.22.2", "vue-functional-data-merge": "^3.1.0", diff --git a/pages/profile.vue b/pages/profile.vue index 373069a66..56cf95145 100644 --- a/pages/profile.vue +++ b/pages/profile.vue @@ -1,5 +1,27 @@ + + diff --git a/pages/settings.vue b/pages/settings.vue index 8d9f241f8..45c62be65 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -4,74 +4,148 @@ - -
- -
- - - account_circle - - {{ currentUser.displayName || $t("nothing_found") }} - - -
- - email - - {{ currentUser.email || $t("nothing_found") }} - - -
- -

- - {{ $t("syncCollections") + " " + $t("sync") }} - {{ SYNC_COLLECTIONS ? $t("enabled") : $t("disabled") }} - -

- -

- - {{ $t("syncEnvironments") + " " + $t("sync") }} - {{ SYNC_ENVIRONMENTS ? $t("enabled") : $t("disabled") }} - -

- -

- - {{ $t("syncHistory") + " " + $t("sync") }} - {{ SYNC_HISTORY ? $t("enabled") : $t("disabled") }} - +

+
+
+

+ {{ $t("account") }} +

+

+ Customize your account settings.

-
- -

- -

+
+
+ +
+ Log in to access. +
+
+
+
+ User +
+
+
+ + account_circle +
+
+ +

+ This is your display name. +

+
+
+
+
+ email +
+
+ +

+ Your primary email address. +

+
+
+
+
+
+ Sync +
+ These settings are synced to cloud. +
+
+
+ + {{ $t("syncCollections") }} + +
+
+ + {{ $t("syncEnvironments") }} + +
+
+ + {{ $t("syncHistory") }} + +
+
+
+
- + +
+
+

+ {{ $t("theme") }} +

+

+ Customize your application theme. +

+
+
+
+ + {{ $t("background") }} + +
+ + {{ + $colorMode.preference.charAt(0).toUpperCase() + + $colorMode.preference.slice(1) + }} + + ({{ $colorMode.value }} mode detected) + + +
+
+ +
+
+
+ + {{ $t("color") }} + +
+ {{ active.charAt(0).toUpperCase() + active.slice(1) }} +
+
+ +
+
+
+
+
- - -
- +
@@ -215,6 +289,7 @@ import { import type { KeysMatching } from "~/types/ts-utils" import { currentUserInfo$ } from "~/helpers/teams/BackendUserInfo" import { currentUser$ } from "~/helpers/fb/auth" +import { getLocalConfig } from "~/newstore/localpersistence" type SettingsType = typeof defaultSettings @@ -237,10 +312,12 @@ export default Vue.extend({ EXTENSIONS_ENABLED: true, PROXY_ENABLED: true, - showEmail: false, - currentBackendUser: null, currentUser: null, + + showLogin: false, + + active: getLocalConfig("THEME_COLOR") || "green", } }, subscriptions() {