From 0f134c8a155125c7172b29871a9c612cd69d03fc Mon Sep 17 00:00:00 2001 From: MateuszMichalowski <79852198+MateuszMichalowski@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:41:28 +0200 Subject: [PATCH] fix(frontend): migration feedback fixes (#3359) * fix(frontend): fixes after feedback * fix(frontend): fixes after feedback * fix(frontend): fixes after feedback --- .../src/components/ChangeUserRoleFormular.vue | 2 +- admin/src/components/ContentFooter.vue | 2 +- .../ContributionLink/ContributionLink.vue | 2 +- .../ContributionLink/ContributionLinkForm.vue | 4 +- .../ContributionLink/ContributionLinkList.vue | 6 +- .../ContributionMessagesFormular.vue | 2 +- .../ContributionMessagesListItem.spec.js | 8 +- .../slots/ContributionMessagesListItem.vue | 22 +- admin/src/components/EditCreationFormular.vue | 6 +- .../Federation/CommunityVisualizeItem.vue | 363 ++++++++++++------ .../Federation/FederationVisualizeItem.vue | 36 +- admin/src/components/NavBar.vue | 2 +- admin/src/components/Overlay.vue | 2 +- admin/src/components/RowDetails.vue | 2 +- .../components/Tables/OpenCreationsTable.vue | 10 +- .../src/components/Tables/SearchUserTable.vue | 8 +- .../src/components/Tables/StatisticTable.vue | 26 +- admin/src/components/VariantIcon.vue | 22 ++ admin/src/main.js | 7 +- admin/src/pages/CreationConfirm.vue | 6 +- admin/src/pages/FederationVisualize.vue | 13 +- admin/src/pages/Overview.vue | 28 +- admin/src/router/guards.js | 2 +- .../custom/gradido-custom/_buttons-forms.scss | 2 +- .../scss/custom/gradido-custom/_buttons.scss | 2 +- .../custom/gradido-custom/_custom-forms.scss | 2 +- .../custom/gradido-custom/_datepicker.scss | 2 +- .../scss/custom/gradido-custom/_input.scss | 4 +- .../src/assets/scss/gradido-template.scss | 8 +- frontend/src/components/Auth/AuthFooter.vue | 5 +- frontend/src/components/ClipboardCopy.vue | 14 +- .../ContributionMessagesFormular.vue | 2 +- .../ContributionMessagesListItem.vue | 2 +- .../Contributions/ContributionForm.vue | 4 +- .../Contributions/ContributionList.vue | 117 +++--- .../Contributions/ContributionListItem.vue | 36 +- .../DecayInformations/CollapseLinksList.vue | 1 - .../DecayInformation-Decay.vue | 9 +- .../DecayInformation-DecayStartblock.vue | 10 +- .../DecayInformation-Long.vue | 10 +- .../GddSend/TransactionConfirmationLink.vue | 6 +- .../GddSend/TransactionConfirmationSend.vue | 4 +- .../components/GddSend/TransactionForm.vue | 13 +- .../src/components/GddTransactionList.vue | 25 +- .../src/components/GdtTransactionList.vue | 3 +- .../src/components/Inputs/InputTextarea.vue | 10 +- .../src/components/Inputs/InputUsername.vue | 45 +-- frontend/src/components/LanguageSwitch2.vue | 2 + .../src/components/Overview/CommunityNews.vue | 4 +- frontend/src/components/Status.vue | 2 +- .../Template/ContentHeader/GddAmount.vue | 6 +- .../Template/ContentHeader/GdtAmount.vue | 18 +- .../Template/RightSide/LastContributions.vue | 4 +- .../Template/RightSide/LastTransactions.vue | 5 +- frontend/src/components/Transaction.vue | 11 +- .../TransactionLinks/TransactionLink.vue | 5 +- .../TransactionRows/AmountAndNameRow.vue | 2 +- .../TransactionRows/CollapseIcon.vue | 5 - .../TransactionRows/DateRow.spec.js | 2 +- .../components/TransactionRows/DateRow.vue | 2 +- .../components/TransactionRows/DecayRow.vue | 3 +- .../TransactionRows/DurationRow.vue | 2 +- .../TransactionRows/LinkCountRow.vue | 2 +- .../components/TransactionRows/MemoRow.vue | 2 +- .../Transactions/TransactionCreation.vue | 21 +- .../Transactions/TransactionDecay.vue | 20 +- .../Transactions/TransactionLinkSummary.vue | 17 +- .../Transactions/TransactionReceive.vue | 11 +- .../Transactions/TransactionSend.vue | 12 +- .../src/components/UserSettings/UserData.vue | 8 +- .../components/UserSettings/UserLanguage.vue | 15 +- .../src/components/UserSettings/UserName.vue | 22 +- .../components/UserSettings/UserPassword.vue | 8 +- .../UserSettings/UserSettingsSwitch.vue | 18 +- frontend/src/components/VariantIcon.vue | 35 ++ frontend/src/layouts/AuthLayout.vue | 16 +- .../layouts/templates/CommunityTemplate.vue | 98 +++-- frontend/src/locales/de.json | 2 +- frontend/src/locales/en.json | 2 +- frontend/src/locales/es.json | 1 + frontend/src/locales/fr.json | 1 + frontend/src/locales/nl.json | 1 + frontend/src/locales/tr.json | 1 + frontend/src/main.js | 2 - frontend/src/pages/Circles.vue | 2 +- frontend/src/pages/Community.vue | 11 +- frontend/src/pages/ResetPassword.vue | 351 +++++++++++------ frontend/src/pages/Settings.vue | 12 +- frontend/src/pages/UserSearch.vue | 2 +- frontend/src/validation-rules.js | 26 +- frontend/vite.config.js | 1 + 91 files changed, 1033 insertions(+), 677 deletions(-) create mode 100644 admin/src/components/VariantIcon.vue create mode 100644 frontend/src/components/VariantIcon.vue diff --git a/admin/src/components/ChangeUserRoleFormular.vue b/admin/src/components/ChangeUserRoleFormular.vue index 543cc1ca9..618dabbfc 100644 --- a/admin/src/components/ChangeUserRoleFormular.vue +++ b/admin/src/components/ChangeUserRoleFormular.vue @@ -8,7 +8,7 @@ {{ $t('userRole.notChangeYourSelf') }}
- +
diff --git a/admin/src/components/ContentFooter.vue b/admin/src/components/ContentFooter.vue index 4e10c29de..d59796add 100644 --- a/admin/src/components/ContentFooter.vue +++ b/admin/src/components/ContentFooter.vue @@ -7,7 +7,7 @@ {{ $t('footer.copyright.year', { year }) }} {{ $t('footer.copyright.link') }} diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index ee18bbee2..1bc8ef43b 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/ContributionLink.vue @@ -19,7 +19,7 @@ -

{{ $t('contributionLink.contributionLinks') }}

+

{{ $t('contributionLink.contributionLinks') }}

-->
- + {{ editContributionLink ? $t('contributionLink.saveChange') : $t('contributionLink.create') }} - + {{ $t('contributionLink.clear') }} diff --git a/admin/src/components/ContributionLink/ContributionLinkList.vue b/admin/src/components/ContributionLink/ContributionLinkList.vue index beaa0c9ff..e95adc1b7 100644 --- a/admin/src/components/ContributionLink/ContributionLinkList.vue +++ b/admin/src/components/ContributionLink/ContributionLinkList.vue @@ -5,14 +5,14 @@ @@ -20,7 +20,7 @@ diff --git a/admin/src/components/ContributionMessages/ContributionMessagesFormular.vue b/admin/src/components/ContributionMessages/ContributionMessagesFormular.vue index 48e46be63..af946fd56 100644 --- a/admin/src/components/ContributionMessages/ContributionMessagesFormular.vue +++ b/admin/src/components/ContributionMessages/ContributionMessagesFormular.vue @@ -59,7 +59,7 @@ {{ $t('form.cancel') }} - + { wrapper = ModeratorItemWrapper() }) - it('has a DIV .text-right.is-moderator', () => { - expect(wrapper.find('div.text-right.is-moderator').exists()).toBe(true) + it('has a DIV .text-end.is-moderator', () => { + expect(wrapper.find('div.text-end.is-moderator').exists()).toBe(true) }) it('has the complete user name', () => { @@ -110,8 +110,8 @@ describe('ContributionMessagesListItem', () => { wrapper = ItemWrapper() }) - it('has a DIV .text-left.is-not-moderator', () => { - expect(wrapper.find('div.text-left.is-user').exists()).toBe(true) + it('has a DIV .text-start.is-not-moderator', () => { + expect(wrapper.find('div.text-start.is-user').exists()).toBe(true) }) it('has the complete user name', () => { diff --git a/admin/src/components/ContributionMessages/slots/ContributionMessagesListItem.vue b/admin/src/components/ContributionMessages/slots/ContributionMessagesListItem.vue index f2261c074..22bbc6157 100644 --- a/admin/src/components/ContributionMessages/slots/ContributionMessagesListItem.vue +++ b/admin/src/components/ContributionMessages/slots/ContributionMessagesListItem.vue @@ -1,16 +1,18 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/src/components/Federation/FederationVisualizeItem.vue b/admin/src/components/Federation/FederationVisualizeItem.vue index 9172f9a94..5f8ce3170 100644 --- a/admin/src/components/Federation/FederationVisualizeItem.vue +++ b/admin/src/components/Federation/FederationVisualizeItem.vue @@ -1,23 +1,43 @@ + + diff --git a/admin/src/main.js b/admin/src/main.js index a7e76e9a0..dc3d65efc 100644 --- a/admin/src/main.js +++ b/admin/src/main.js @@ -29,6 +29,10 @@ const app = createApp(App) app.use(router) app.use(store) + +i18n.global.locale.value = + store.state.moderator && store.state.moderator.language ? store.state.moderator.language : 'en' + app.use(i18n) app.use(PortalVue) app.use(createBootstrap()) @@ -39,7 +43,4 @@ app.mixin(toasters) addNavigationGuards(router, store, apolloProvider.defaultClient, i18n) -i18n.locale = - store.state.moderator && store.state.moderator.language ? store.state.moderator.language : 'en' - app.mount('#app') diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 32e29996a..03a183cdf 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -4,11 +4,11 @@

- {{ $t('no_hashtag') }} + {{ $t('no_hashtag') }}

- + {{ $t('hide_resubmission') }}

@@ -82,7 +82,7 @@

{{ $t(overlayQuestion) }}

diff --git a/admin/src/pages/FederationVisualize.vue b/admin/src/pages/FederationVisualize.vue index 792f7834d..6be762d30 100644 --- a/admin/src/pages/FederationVisualize.vue +++ b/admin/src/pages/FederationVisualize.vue @@ -9,20 +9,13 @@ @click="refetch" > - - - - - - -
- {{ $t('federation.verified') }} - {{ $t('federation.url') }} - {{ $t('federation.name') }} + {{ $t('federation.verified') }} + {{ $t('federation.url') }} + {{ $t('federation.name') }} {{ $t('federation.lastAnnouncedAt') }} {{ $t('federation.createdAt') }} diff --git a/admin/src/pages/Overview.vue b/admin/src/pages/Overview.vue index 7d4b279b8..2e5a0a31a 100644 --- a/admin/src/pages/Overview.vue +++ b/admin/src/pages/Overview.vue @@ -11,7 +11,6 @@

{{ openCreations }}

-

Layout test

@@ -32,30 +31,31 @@
diff --git a/admin/src/router/guards.js b/admin/src/router/guards.js index 79e381478..0022cba86 100644 --- a/admin/src/router/guards.js +++ b/admin/src/router/guards.js @@ -14,7 +14,7 @@ const addNavigationGuards = (router, store, apollo, i18n) => { .then((result) => { const moderator = result.data.verifyLogin if (moderator.roles?.length) { - i18n.locale = moderator.language + i18n.global.locale.value = moderator.language store.commit('moderator', moderator) next({ path: '/' }) } else { diff --git a/frontend/src/assets/scss/custom/gradido-custom/_buttons-forms.scss b/frontend/src/assets/scss/custom/gradido-custom/_buttons-forms.scss index 9ffc392fe..e9ab375a3 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_buttons-forms.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_buttons-forms.scss @@ -5,7 +5,7 @@ $input-btn-padding-x: 0.75rem ; $input-btn-line-height: $shape-height-base ; $input-btn-focus-width: 0 ; $input-btn-focus-color: rgba($component-active-bg, 1) ; -$input-btn-focus-box-shadow: none ; +$input-btn-focus-box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); $input-btn-padding-y-sm: 0.25rem ; $input-btn-padding-x-sm: 0.5rem ; $input-btn-line-height-sm: $shape-height-sm ; diff --git a/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss b/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss index a9a650c30..1d65173cf 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss @@ -17,7 +17,7 @@ $btn-box-shadow: 0 4px 6px rgb(50 50 93 / 11%), 0 1px 3px rgb(0 0 0 / 8%) ; $btn-hover-box-shadow: 0 7px 14px rgb(50 50 93 / 10%), 0 3px 6px rgb(0 0 0 / 8%) ; $btn-focus-box-shadow: $btn-hover-box-shadow ; $btn-focus-width: $input-btn-focus-width ; -$btn-active-box-shadow: none; +$btn-active-box-shadow: 0 0 0 0 rgb(255 255 255 / 0%);; $btn-hover-translate-y: -1px ; diff --git a/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss b/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss index 01b2b6bd3..d9c3844f2 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss @@ -6,7 +6,7 @@ $custom-control-indicator-size: 1.25rem ; $custom-control-indicator-bg: $input-bg ; $custom-control-indicator-border-width: 1px ; $custom-control-indicator-border-color: $input-border-color ; -$custom-control-indicator-box-shadow: none ; +$custom-control-indicator-box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); ; $custom-control-indicator-focus-box-shadow: $custom-control-indicator-box-shadow ; $custom-control-indicator-hover-color: $component-hover-color ; $custom-control-indicator-hover-bg: $component-hover-bg ; diff --git a/frontend/src/assets/scss/custom/gradido-custom/_datepicker.scss b/frontend/src/assets/scss/custom/gradido-custom/_datepicker.scss index 1c863df4c..036a62fe6 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_datepicker.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_datepicker.scss @@ -13,7 +13,7 @@ $datepicker-disabled-old-new-color: $gray-500 ; $datepicker-header-cell-border-radius: $border-radius ; $datepicker-active-color: $white ; $datepicker-active-background: $primary ; -$datepicker-active-box-shadow: none ; +$datepicker-active-box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); ; $datepicker-range-background: $primary ; $datepicker-range-cell-focused-background: color.adjust($datepicker-range-background, $lightness: -5%); $datepicker-range-color: $white ; diff --git a/frontend/src/assets/scss/custom/gradido-custom/_input.scss b/frontend/src/assets/scss/custom/gradido-custom/_input.scss index e044b3e20..0b0d53c53 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_input.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_input.scss @@ -23,13 +23,13 @@ $input-focus-alternative-box-shadow: 0 4px 6px rgb(50 50 93 / 11%),0 1px 3px rgb $input-color: $gray-600 ; $input-border-color: #cad1d7 ; $input-border-width: $input-btn-border-width ; -$input-box-shadow: none ; // 0 1px 3px 0 $gray-400 ; +$input-box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); // 0 1px 3px 0 $gray-400 ; $input-focus-bg: $white ; $input-focus-border-color: rgb(50 151 211 / 25%) ; $input-focus-color: $input-color ; $input-focus-width: 0 ; -$input-focus-box-shadow: none ; // 0 1px 3px 0 $gray-500 ; +$input-focus-box-shadow: 0 0 0 0 rgb(255 255 255 / 0%); // 0 1px 3px 0 $gray-500 ; $input-placeholder-color: $gray-500 ; $input-focus-placeholder-color: $gray-500 ; diff --git a/frontend/src/assets/scss/gradido-template.scss b/frontend/src/assets/scss/gradido-template.scss index 35b6b8581..8701f7d98 100644 --- a/frontend/src/assets/scss/gradido-template.scss +++ b/frontend/src/assets/scss/gradido-template.scss @@ -42,7 +42,7 @@ html > body { } .app-box-shadow { - box-shadow: 20pt 20pt 50pt 0 #3838384f; + box-shadow: 20pt 20pt 50pt 0 #3838384f !important; } /* Navbar */ @@ -280,7 +280,7 @@ a:hover, } .gradido-border-radius { - border-radius: 26px; + border-radius: 26px!important; overflow: hidden; } @@ -341,3 +341,7 @@ a:hover, .text-color-gdd-yellow { color: rgb(197 141 56); } + +.gdd-toaster-body { + color: rgb(255 255 255); +} diff --git a/frontend/src/components/Auth/AuthFooter.vue b/frontend/src/components/Auth/AuthFooter.vue index 232e66a3d..99ec027ab 100644 --- a/frontend/src/components/Auth/AuthFooter.vue +++ b/frontend/src/components/Auth/AuthFooter.vue @@ -16,18 +16,15 @@
-
+
{{ $t('followUs') }} - - - diff --git a/frontend/src/components/ClipboardCopy.vue b/frontend/src/components/ClipboardCopy.vue index ff8984426..d6e0d6aff 100644 --- a/frontend/src/components/ClipboardCopy.vue +++ b/frontend/src/components/ClipboardCopy.vue @@ -4,13 +4,13 @@
{{ link }}
- +
@@ -19,13 +19,13 @@
{{ linkText }}
- +
@@ -51,8 +51,12 @@ const props = defineProps({ const { copyLink, copyLinkWithText, linkText, canCopyLink } = useCopyLinks({ ...props }) - diff --git a/frontend/src/components/ContributionMessages/ContributionMessagesFormular.vue b/frontend/src/components/ContributionMessages/ContributionMessagesFormular.vue index eecafd3c6..e211b748e 100644 --- a/frontend/src/components/ContributionMessages/ContributionMessagesFormular.vue +++ b/frontend/src/components/ContributionMessages/ContributionMessagesFormular.vue @@ -14,7 +14,7 @@ {{ $t('form.cancel') }} - + {{ $t('form.reply') }} diff --git a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue index 779c1eef5..5f59d65d1 100644 --- a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue +++ b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue @@ -20,7 +20,7 @@
-
+
{{ storeName.username }}
diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 43b89b821..001ec485e 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -12,7 +12,7 @@ :state="dataFieldMeta.valid" :locale="$i18n.locale" :max="getMaximalDate" - :min="minimalDate" + :min="minimalDate.toISOString().slice(0, 10)" class="mb-4 bg-248" reset-value="" :label-no-date-selected="$t('contribution.noDateSelected')" @@ -69,7 +69,7 @@ {{ $t('form.cancel') }}
- +
- diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index b8ff84428..566cefe4c 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -13,22 +13,14 @@ color="#fff" class="fw-bold" > - - - - - - + +
{{ firstName }} {{ lastName }} - - - - - +
{{ $d(new Date(contributionDate), 'short') }} @@ -51,8 +43,7 @@ {{ $t('creation') }} {{ $t('(') }}{{ amount / 20 }} {{ $t('h') }}{{ $t(')') }}
- - + {{ $t('contribution.alert.denied') }}
@@ -60,9 +51,9 @@
{{ $filters.GDD(amount) }}
- +
- +
@@ -217,6 +208,14 @@ const variant = computed(() => { return 'primary' }) +const icon = computed(() => { + if (props.deletedAt) return 'trash' + if (props.deniedAt) return 'x-circle' + if (props.confirmedAt) return 'check' + if (props.status === 'IN_PROGRESS') return 'question' + return 'bell-fill' +}) + const date = computed(() => props.createdAt) const collapseId = computed(() => 'collapse' + String(props.id)) @@ -280,3 +279,10 @@ function updateStatus(id) { const emit = defineEmits(['delete-contribution', 'close-all-open-collapse', 'update-status']) + + diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.vue b/frontend/src/components/DecayInformations/CollapseLinksList.vue index 801dd3d67..73f1963fa 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.vue +++ b/frontend/src/components/DecayInformations/CollapseLinksList.vue @@ -21,7 +21,6 @@ {{ buttonText }}
-
diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue index 315909475..76777bd51 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue @@ -1,6 +1,6 @@