From 4d64df37f56510176fdbe3085f165118f791fcc5 Mon Sep 17 00:00:00 2001 From: venashial Date: Thu, 27 May 2021 09:27:13 -0700 Subject: [PATCH] Versatile auth URLs & many UI fixes (#199) * Make project cards right-align their last element Spaces out elements in a `.project-card` using `justify-content: space-between;`. Fixes modrinth/knossos#170 * Automatically set URL for auth redirect * Make login button use base url or current origin Allows the login button to work in dev environment * Remove Axios base URL trailing slash * Update authUrl() on dashboard to match default * Remove 'code' query from URL on page load Allow non-exact paths to highlight mod & dashboard tabs Fixes modrinth/knossos#200 * Make page 5 button visible on page 4 (pagination) Fixes modrinth/knossos#184 * Color links on legal pages Fixes modrinth/knossos#166 * Set max notifications to 5 and ignore duplicates Fixes modrinth/knossos#175 * Add space above report button when no user desc Fixes modrinth/knossos#143 * Better text spacing from edge of mobile screen Fixes modrinth/knossos#179 * Fix slanted bars in modrinth/knossos#57 * Fix checkbox grid and role label Fixes modrinth/knossos#191 * Move mod 'settings' button to the far right Fixes modrinth/knossos#138 * Abbreviate minutes to min. when time is too long Not a perfect solution imo, but works for now Fixes modrinth/knossos#193 * Fix mobile header margins & add breakpoints Fixes modrinth/knossos#203 * Clean up nuxt config Silence babel warning & styleResources * Upgrade sass-loader to 10.1.1 and remove warning * Remove added horizontal footer padding https://github.com/modrinth/knossos/pull/199#discussion_r629011624 * Improve mobile header fix * Fix up minor inconsistencies in mod header * Remove hard coded date * Cleans up pagination to be more intuitive * Fixes member invite input on moble * Fix login button when searching mods * Improved mobile mod search Consistently sized pagination buttons Breakpoint for sort buttons on smaller screens * Consistent link style on text-only pages * Better 4k support * Slightly better mobile project-card support Shuffles categories under mod icon when there is room * Animate homepage typewriter effect backwards * Tiny commit to align mod icons in mod headers * Make processing status include 'Under Review' This can be later updated once the backend has a separate status * Create vercel.json * Update domain auto detection * Test vercel NODE_ENV * Remove console.log for debugging hosting services * Make mobile first + fix shrinked text circle size * Optimize SVG * Change media queries to be more mobile first * Remove `|| window.location.origin` * re-deploy vercel * Change "Processing" message to "Under review" --- assets/images/utils/settings.svg | 6 ++ assets/styles/components.scss | 37 ++++---- assets/styles/injected.scss | 3 +- components/layout/MFooter.vue | 12 ++- components/ui/Pagination.vue | 56 ++++++++++--- components/ui/ProjectCard.vue | 19 ++++- layouts/default.vue | 76 +++++++++++++---- middleware/auth.js | 2 +- nuxt.config.js | 24 +++++- pages/about.vue | 1 + pages/dashboard.vue | 2 +- pages/dashboard/misc/revoke-token.vue | 2 +- pages/index.vue | 52 ++++++++++-- pages/legal/privacy.vue | 5 ++ pages/legal/terms.vue | 5 ++ pages/mod/_id.vue | 116 ++++++++++++++++++++------ pages/mod/_id/settings.vue | 51 ++++++++++- pages/mods.vue | 17 +++- pages/user/_id.vue | 2 + vercel.json | 9 ++ 20 files changed, 397 insertions(+), 100 deletions(-) create mode 100644 assets/images/utils/settings.svg create mode 100644 vercel.json diff --git a/assets/images/utils/settings.svg b/assets/images/utils/settings.svg new file mode 100644 index 000000000..22fdfb43f --- /dev/null +++ b/assets/images/utils/settings.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/assets/styles/components.scss b/assets/styles/components.scss index 801aa9a09..2dd828cd5 100644 --- a/assets/styles/components.scss +++ b/assets/styles/components.scss @@ -82,7 +82,8 @@ word-wrap: break-word; } - h1, h2 { + h1, + h2 { padding: 10px 0 5px; border-bottom: 1px solid var(--color-header-underline); } @@ -91,7 +92,7 @@ margin: 15px 0; padding: 0 1em; color: var(--color-text); - border-left: .25em solid var(--color-block-quote); + border-left: 0.25em solid var(--color-block-quote); } a { @@ -152,7 +153,7 @@ z-index: 1; } - &[x-placement^="top"] { + &[x-placement^='top'] { margin-bottom: 5px; .tooltip-arrow { @@ -167,7 +168,7 @@ } } - &[x-placement^="bottom"] { + &[x-placement^='bottom'] { margin-top: 5px; .tooltip-arrow { @@ -182,7 +183,7 @@ } } - &[x-placement^="right"] { + &[x-placement^='right'] { margin-left: 5px; .tooltip-arrow { @@ -197,7 +198,7 @@ } } - &[x-placement^="left"] { + &[x-placement^='left'] { margin-right: 5px; .tooltip-arrow { @@ -215,13 +216,13 @@ &[aria-hidden='true'] { visibility: hidden; opacity: 0; - transition: opacity .15s, visibility .15s; + transition: opacity 0.15s, visibility 0.15s; } &[aria-hidden='false'] { visibility: visible; opacity: 1; - transition: opacity .15s; + transition: opacity 0.15s; } } @@ -247,7 +248,7 @@ svg { width: 1rem; height: 1rem; - margin-right: 0.3rem; + margin-right: 0.4rem; } &:hover, @@ -259,7 +260,8 @@ } } - &.nuxt-link-exact-active { + &.nuxt-link-exact-active, + &.active-path { color: var(--color-text-dark); span { @@ -293,7 +295,8 @@ flex-shrink: 0; } - &.nuxt-link-exact-active { + &.nuxt-link-exact-active, + &.active-path { svg { color: var(--color-brand-light); } @@ -418,7 +421,6 @@ background: var(--color-button-bg-hover); } } - } .section-header { @@ -488,11 +490,8 @@ label { &:focus { outline: 0; } - } - - .stylized-toggle { height: 32px; width: 52px; @@ -501,7 +500,7 @@ label { position: relative; margin: 0; border: 2px solid var(--color-button-bg); - transition: all .2s ease; + transition: all 0.2s ease; background: var(--color-button-bg); &:after { @@ -513,8 +512,8 @@ label { height: 24px; border-radius: 50%; background: white; - box-shadow: 0 1px 2px rgba(44,44,44,.2); - transition: all .2s cubic-bezier(.5,.1,.75,1.35); + box-shadow: 0 1px 2px rgba(44, 44, 44, 0.2); + transition: all 0.2s cubic-bezier(0.5, 0.1, 0.75, 1.35); } &:checked { background: var(--color-brand); @@ -527,7 +526,7 @@ label { background: var(--color-button-bg); border: 2px solid var(--color-button-bg); } - &:hover:checked &:focus:checked { + &:hover:checked &:focus:checked { background: var(--color-brand); border: 2px solid var(--color-brand); } diff --git a/assets/styles/injected.scss b/assets/styles/injected.scss index 83e3d209b..6d52a05a9 100644 --- a/assets/styles/injected.scss +++ b/assets/styles/injected.scss @@ -25,7 +25,8 @@ &:focus, &:hover, &.selected, - &.nuxt-link-exact-active { + &.nuxt-link-exact-active, + &.active-path { color: var(--color-transparent-button-text-hover); background-color: var(--color-transparent-button-bg-hover); } diff --git a/components/layout/MFooter.vue b/components/layout/MFooter.vue index 7f466f0e3..786a5db07 100644 --- a/components/layout/MFooter.vue +++ b/components/layout/MFooter.vue @@ -1,5 +1,5 @@