From 3a735ea0ce321ffc84a41ec14d2e74b57868a7c7 Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:27:50 -0500 Subject: [PATCH] New collections (#1484) * [WIP] Transfer collections to own branch * fixes * rewrite js * Add visibility dropdown to collection edit modal * Add visibility badges to collection page * Update visibility options and icons in collection page * Add delete functionality to collection modal * Collection project deletion flow * remove "visit project" button on overflow * Remove via checklist not individually * Update manage title in settings.vue * remove collections from settings page * hook up collections page * collection header to look like project header * Refactor layout.scss and collections.vue * fix omorphia * Update * Conform collections to old design structure * Update navigation links and remove unused code * Add collection view and collections to user page * Refactor user project display logic * Add collection creation functionality and update profile labels * Add function calls to initialize user collections * Refactor collection page layout and functionality * Add initialization of user collections in create function * Fix styling issue in collection page * Update collection status to private * remove name * Refactor card component and update grid layout * Finish collections --------- Co-authored-by: Carter --- assets/images/utils/world.svg | 1 + assets/styles/global.scss | 4 + assets/styles/layout.scss | 20 + components/ui/CollectionCreateModal.vue | 118 +++++ components/ui/Modal.vue | 5 +- components/ui/NotificationItem.vue | 2 - components/ui/ProjectCard.vue | 7 +- composables/cosmetics.js | 1 + composables/user.js | 55 +- helpers/notifications.js | 2 - layouts/default.vue | 11 +- package.json | 2 +- pages/[type]/[id].vue | 146 ++++- pages/[type]/[id]/gallery.vue | 2 +- pages/collection/[id].vue | 672 ++++++++++++++++++++++++ pages/collection/[id]/[projectType].vue | 1 + pages/dashboard.vue | 5 +- pages/dashboard/collections.vue | 187 +++++++ pages/dashboard/follows.vue | 1 + pages/settings/applications.vue | 2 +- pages/settings/pats.vue | 12 +- pages/user/[id].vue | 253 +++++++-- pnpm-lock.yaml | 2 +- utils/i18n-project-type.ts | 8 + 24 files changed, 1396 insertions(+), 123 deletions(-) create mode 100644 assets/images/utils/world.svg create mode 100644 components/ui/CollectionCreateModal.vue create mode 100644 pages/collection/[id].vue create mode 100644 pages/collection/[id]/[projectType].vue create mode 100644 pages/dashboard/collections.vue diff --git a/assets/images/utils/world.svg b/assets/images/utils/world.svg new file mode 100644 index 000000000..d064d8542 --- /dev/null +++ b/assets/images/utils/world.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/styles/global.scss b/assets/styles/global.scss index e5ec46e18..da9a1d852 100644 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -49,6 +49,8 @@ html { --color-ad: #d6e6f9; --color-ad-raised: #b1c8e4; + --color-ad-contrast: var(--color-text); + --color-ad-highlight: #088cdb; --color-grey-link: var(--color-text); --color-grey-link-hover: var(--color-heading); @@ -187,6 +189,8 @@ html { --color-ad: #1f324a; --color-ad-raised: #2e4057; + --color-ad-contrast: var(--color-text); + --color-ad-highlight: #088cdb; --color-link: #74b6f3; --color-link-hover: #92c0f5; diff --git a/assets/styles/layout.scss b/assets/styles/layout.scss index e234bd335..a53b487c7 100644 --- a/assets/styles/layout.scss +++ b/assets/styles/layout.scss @@ -69,6 +69,12 @@ } @media (min-width: 1024px) { + .full-page { + margin: 0 auto; + max-width: min(1280px, 100vw); + width: 80rem; + } + .normal-page { margin: 0 auto; max-width: 80rem; @@ -87,6 +93,20 @@ 'content dummy' 1fr / 1fr 20rem; } + + &.no-sidebar { + grid-template: + 'header header' auto + 'content content' auto + 'info info' auto + 'dummy dummy' 1fr + / 1fr 1fr; + + .normal-page__content { + grid-area: content; + max-width: 100%; + } + } } .normal-page__sidebar { diff --git a/components/ui/CollectionCreateModal.vue b/components/ui/CollectionCreateModal.vue new file mode 100644 index 000000000..6701c085a --- /dev/null +++ b/components/ui/CollectionCreateModal.vue @@ -0,0 +1,118 @@ +