From 71f19d366f740f617be975cbe4aa9d253d8d6b30 Mon Sep 17 00:00:00 2001 From: MateuszMichalowski <79852198+MateuszMichalowski@users.noreply.github.com> Date: Thu, 10 Oct 2024 09:46:12 +0200 Subject: [PATCH 01/11] fix(frontend): post migration fixes (#3372) * fix(frontend): post migration fixes * fix(frontend): align with stylelint * fix(frontend): fix tests and dashboard layout --------- Co-authored-by: einhornimmond --- frontend/package.json | 1 + frontend/src/App.spec.js | 65 +------------------ .../src/assets/scss/gradido-template.scss | 12 ++++ .../DecayInformations/CollapseLinksList.vue | 2 +- .../src/components/Inputs/InputEmail.spec.js | 4 +- frontend/src/components/Inputs/InputEmail.vue | 13 +--- .../components/Inputs/InputPassword.spec.js | 4 +- .../src/components/Inputs/InputPassword.vue | 25 +++---- frontend/src/components/Menu/Navbar.vue | 3 +- .../MobileSidebar/MobileSidebar.vue | 22 ++++++- .../TransactionLinks/TransactionLink.vue | 6 +- .../components/TransactionRows/Name.spec.js | 35 ++++------ .../src/components/TransactionRows/Name.vue | 13 +++- frontend/src/composables/useToast.js | 1 + frontend/src/layouts/DashboardLayout.spec.js | 36 +++++----- frontend/src/layouts/DashboardLayout.vue | 21 ++++-- frontend/src/pages/Login.vue | 3 +- frontend/src/routes/routes.js | 2 + frontend/yarn.lock | 5 ++ 19 files changed, 125 insertions(+), 148 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 07a6a28da..5e62aac10 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -48,6 +48,7 @@ "portal-vue": "^3.0.0", "qrcanvas-vue": "3", "regenerator-runtime": "^0.13.7", + "tua-body-scroll-lock": "^1.5.1", "uuid": "^9.0.0", "vee-validate": "^4.13.2", "vite": "3.2.10", diff --git a/frontend/src/App.spec.js b/frontend/src/App.spec.js index 183aa1f1c..e04b483be 100644 --- a/frontend/src/App.spec.js +++ b/frontend/src/App.spec.js @@ -1,68 +1,5 @@ -// import { shallowMount, RouterLinkStub } from '@vue/test-utils' -// import App from './App' -// -// const localVue = global.localVue -// const mockStoreCommit = jest.fn() -// -// const stubs = { -// RouterLink: RouterLinkStub, -// RouterView: true, -// } -// -// describe('App', () => { -// const mocks = { -// $i18n: { -// locale: 'en', -// }, -// $t: jest.fn((t) => t), -// $store: { -// commit: mockStoreCommit, -// state: { -// token: null, -// }, -// }, -// $route: { -// meta: { -// requiresAuth: false, -// }, -// params: {}, -// }, -// } -// -// let wrapper -// -// const Wrapper = () => { -// return shallowMount(App, { localVue, mocks, stubs }) -// } -// -// describe('mount', () => { -// beforeEach(() => { -// wrapper = Wrapper() -// }) -// -// it('renders the App', () => { -// expect(wrapper.find('#app').exists()).toBe(true) -// }) -// -// it('has a component AuthLayout', () => { -// expect(wrapper.findComponent({ name: 'AuthLayout' }).exists()).toBe(true) -// }) -// -// describe('route requires authorization', () => { -// beforeEach(async () => { -// mocks.$route.meta.requiresAuth = true -// wrapper = Wrapper() -// }) -// -// it('has a component DashboardLayout', () => { -// expect(wrapper.findComponent({ name: 'DashboardLayout' }).exists()).toBe(true) -// }) -// }) -// }) -// }) - import { shallowMount } from '@vue/test-utils' -import { describe, it, expect, beforeEach, vi } from 'vitest' +import { describe, it, expect, beforeEach } from 'vitest' import App from './App' import DashboardLayout from '@/layouts/DashboardLayout' import AuthLayout from '@/layouts/AuthLayout' diff --git a/frontend/src/assets/scss/gradido-template.scss b/frontend/src/assets/scss/gradido-template.scss index 8701f7d98..85d2a783c 100644 --- a/frontend/src/assets/scss/gradido-template.scss +++ b/frontend/src/assets/scss/gradido-template.scss @@ -345,3 +345,15 @@ a:hover, .gdd-toaster-body { color: rgb(255 255 255); } + +.gdd-toaster-body-darken { + color: #2c2c2c; +} + +input.rounded-input { + border-radius: 17px; +} + +.fs-7 { + font-size: 14px !important; +} diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.vue b/frontend/src/components/DecayInformations/CollapseLinksList.vue index 73f1963fa..fcd58dbb0 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.vue +++ b/frontend/src/components/DecayInformations/CollapseLinksList.vue @@ -13,7 +13,7 @@
{ }) it('has the placeholder "input-field-placeholder"', () => { - expect(wrapper.find('input').attributes('placeholder')).toBe('input-field-placeholder') + expect(wrapper.find('input').attributes('placeholder')).toBe('form.email') }) it('has the label "input-field-label"', () => { - expect(wrapper.find('label').text()).toBe('input-field-label') + expect(wrapper.find('label').text()).toBe('form.email') }) it('has the label for "input-field-name-input-field"', () => { diff --git a/frontend/src/components/Inputs/InputEmail.vue b/frontend/src/components/Inputs/InputEmail.vue index 89a147bf2..935a8510b 100644 --- a/frontend/src/components/Inputs/InputEmail.vue +++ b/frontend/src/components/Inputs/InputEmail.vue @@ -11,6 +11,7 @@ :placeholder="defaultTranslations.placeholder" type="email" trim + class="rounded-input" :class="$route.path === '/send' ? 'bg-248' : ''" :disabled="disabled" autocomplete="off" @@ -33,14 +34,6 @@ const props = defineProps({ type: String, default: 'email', }, - label: { - type: String, - default: 'Email', - }, - placeholder: { - type: String, - default: 'Email', - }, disabled: { type: Boolean, default: false, @@ -54,8 +47,8 @@ const { value, errorMessage, validate, meta } = useField(() => props.name, 'requ const { t } = useI18n() const defaultTranslations = computed(() => ({ - label: props.label ?? t('form.email'), - placeholder: props.placeholder ?? t('form.email'), + label: t('form.email'), + placeholder: t('form.email'), })) const normalizeEmail = (emailAddress) => { diff --git a/frontend/src/components/Inputs/InputPassword.spec.js b/frontend/src/components/Inputs/InputPassword.spec.js index 94e50e026..9d6f5481d 100644 --- a/frontend/src/components/Inputs/InputPassword.spec.js +++ b/frontend/src/components/Inputs/InputPassword.spec.js @@ -80,7 +80,7 @@ describe('InputPassword', () => { }) it('has the placeholder "input-field-placeholder"', () => { - expect(wrapper.find('input').attributes('placeholder')).toEqual('input-field-placeholder') + expect(wrapper.find('input').attributes('placeholder')).toEqual('form.password') }) it('has the value ""', () => { @@ -88,7 +88,7 @@ describe('InputPassword', () => { }) it('has the label "input-field-label"', () => { - expect(wrapper.find('label').text()).toEqual('input-field-label') + expect(wrapper.find('label').text()).toEqual('form.password') }) it('has the label for "input-field-name-input-field"', () => { diff --git a/frontend/src/components/Inputs/InputPassword.vue b/frontend/src/components/Inputs/InputPassword.vue index fa5f60a7e..b496d09a3 100644 --- a/frontend/src/components/Inputs/InputPassword.vue +++ b/frontend/src/components/Inputs/InputPassword.vue @@ -50,14 +50,6 @@ const props = defineProps({ type: String, default: 'password', }, - label: { - type: String, - default: 'Password', - }, - placeholder: { - type: String, - default: 'Password', - }, immediate: { type: Boolean, default: false, @@ -78,18 +70,11 @@ const { value, errorMessage, meta, errors, validate } = useField(name, props.rul validateOnMount: props.immediate, }) -// onMounted(async () => { -// await nextTick() -// if (props.immediate) { -// await validate() -// } -// }) - const { t } = useI18n() const defaultTranslations = computed(() => ({ - label: props.label ?? t('form.password'), - placeholder: props.placeholder ?? t('form.password'), + label: t('form.password'), + placeholder: t('form.password'), })) const showPassword = ref(false) @@ -109,3 +94,9 @@ const ariaMsg = computed(() => ({ const labelFor = computed(() => `${props.name}-input-field`) + + diff --git a/frontend/src/components/Menu/Navbar.vue b/frontend/src/components/Menu/Navbar.vue index cd6c0929d..5b1654278 100644 --- a/frontend/src/components/Menu/Navbar.vue +++ b/frontend/src/components/Menu/Navbar.vue @@ -129,8 +129,9 @@ button.navbar-toggler > span.navbar-toggler-icon { .navbar-element { z-index: 1000; position: fixed; - width: 100%; background-color: #f5f5f5e6; + left: 0; + right: 0; } .sheet-img { diff --git a/frontend/src/components/MobileSidebar/MobileSidebar.vue b/frontend/src/components/MobileSidebar/MobileSidebar.vue index bfc76b25b..d416db5f8 100644 --- a/frontend/src/components/MobileSidebar/MobileSidebar.vue +++ b/frontend/src/components/MobileSidebar/MobileSidebar.vue @@ -7,6 +7,7 @@ no-header-close horizontal skip-animation + @update:model-value="isMobileMenuOpen = $event" >
@@ -17,14 +18,30 @@ diff --git a/frontend/src/components/TransactionRows/Name.spec.js b/frontend/src/components/TransactionRows/Name.spec.js index 90bec127f..1504120b4 100644 --- a/frontend/src/components/TransactionRows/Name.spec.js +++ b/frontend/src/components/TransactionRows/Name.spec.js @@ -1,4 +1,4 @@ -import { mount } from '@vue/test-utils' +import { mount, RouterLinkStub } from '@vue/test-utils' import { describe, it, expect, beforeEach, vi } from 'vitest' import Name from './Name' import { BLink } from 'bootstrap-vue-next' @@ -44,7 +44,7 @@ describe('Name', () => { global: { mocks, stubs: { - BLink, + RouterLink: RouterLinkStub, }, }, props: propsData, @@ -88,31 +88,18 @@ describe('Name', () => { it('has a link', () => { expect( - wrapper - .find('div.gdd-transaction-list-item-name') - .findComponent({ name: 'BLink' }) - .exists(), + wrapper.find('div.gdd-transaction-list-item-name').findComponent(RouterLinkStub).exists(), ).toBe(true) }) - describe('click link', () => { - beforeEach(async () => { - await wrapper.findComponent({ name: 'BLink' }).trigger('click') - }) - - it('pushes router to send', () => { - expect(routerPushMock).toHaveBeenCalledWith({ - path: '/send', - }) - }) - - it('pushes params for gradidoID and community UUID', () => { - expect(routerPushMock).toHaveBeenCalledWith({ - params: { - communityIdentifier: 'community UUID', - userIdentifier: 'gradido-ID', - }, - }) + it('RouterLink has correct to prop', () => { + const routerLink = wrapper.findComponent(RouterLinkStub) + expect(routerLink.props().to).toEqual({ + name: 'Send', + params: { + communityIdentifier: 'community UUID', + userIdentifier: 'gradido-ID', + }, }) }) }) diff --git a/frontend/src/components/TransactionRows/Name.vue b/frontend/src/components/TransactionRows/Name.vue index 1eb94319b..246fbf933 100644 --- a/frontend/src/components/TransactionRows/Name.vue +++ b/frontend/src/components/TransactionRows/Name.vue @@ -2,9 +2,9 @@
- + {{ itemText }} - +
{{ itemText }}
@@ -45,6 +45,15 @@ export default { (this.linkedUser.communityName ? ' / ' + this.linkedUser.communityName : '') : this.text }, + pushTo() { + return { + name: 'Send', + params: { + userIdentifier: this.linkedUser.gradidoID, + communityIdentifier: this.linkedUser.communityUuid, + }, + } + }, }, methods: { async tunnelEmail() { diff --git a/frontend/src/composables/useToast.js b/frontend/src/composables/useToast.js index bc9bdbe49..826119ec2 100644 --- a/frontend/src/composables/useToast.js +++ b/frontend/src/composables/useToast.js @@ -22,6 +22,7 @@ export function useAppToast() { toast(message, { title: t('navigation.info'), variant: 'warning', + bodyClass: 'gdd-toaster-body-darken', }) } diff --git a/frontend/src/layouts/DashboardLayout.spec.js b/frontend/src/layouts/DashboardLayout.spec.js index 37feb0d2f..0906793ff 100644 --- a/frontend/src/layouts/DashboardLayout.spec.js +++ b/frontend/src/layouts/DashboardLayout.spec.js @@ -1,6 +1,6 @@ import { mount } from '@vue/test-utils' import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest' -import { nextTick } from 'vue' +import { nextTick, ref } from 'vue' import DashboardLayout from './DashboardLayout' import { createStore } from 'vuex' import { createRouter, createWebHistory } from 'vue-router' @@ -15,11 +15,15 @@ vi.mock('@/composables/useToast', () => ({ })) const mockQueryFn = vi.fn() +const mockRefetchFn = vi.fn() const mockMutateFn = vi.fn() +const mockQueryResult = ref(null) vi.mock('@vue/apollo-composable', () => ({ useLazyQuery: vi.fn(() => ({ load: mockQueryFn, + refetch: mockRefetchFn, + result: mockQueryResult, onResult: vi.fn(), onError: vi.fn(), })), @@ -136,25 +140,25 @@ describe('DashboardLayout', () => { describe('update transactions', () => { beforeEach(async () => { - mockQueryFn.mockResolvedValue({ + mockQueryResult.value = { transactionList: { balance: { - balanceGDT: 100, + balanceGDT: '100', count: 4, linkCount: 8, - balance: 1450, - decay: 1250, + balance: '1450', }, - transactions: ['transaction', 'transaction', 'transaction', 'transaction'], + transactions: ['transaction1', 'transaction2', 'transaction3', 'transaction4'], }, - }) - await wrapper - .findComponent({ ref: 'router-view' }) - .vm.$emit('update-transactions', { currentPage: 2, pageSize: 5 }) - await nextTick() + } + + mockQueryFn.mockResolvedValue(mockQueryResult.value) + + await wrapper.vm.updateTransactions({ currentPage: 2, pageSize: 5 }) + await nextTick() // Ensure all promises are resolved }) - it('calls the API', () => { + it('load call to the API', () => { expect(mockQueryFn).toHaveBeenCalled() }) @@ -164,10 +168,10 @@ describe('DashboardLayout', () => { it('updates transactions', () => { expect(wrapper.vm.transactions).toEqual([ - 'transaction', - 'transaction', - 'transaction', - 'transaction', + 'transaction1', + 'transaction2', + 'transaction3', + 'transaction4', ]) }) diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue index c06f46c46..bfd9f2049 100755 --- a/frontend/src/layouts/DashboardLayout.vue +++ b/frontend/src/layouts/DashboardLayout.vue @@ -215,7 +215,11 @@ import { useAppToast } from '@/composables/useToast' const store = useStore() const router = useRouter() const { load: useCommunityStatsQuery } = useLazyQuery(communityStatistics) -const { load: useTransactionsQuery } = useLazyQuery(transactionsQuery) +const { + load: useTransactionsQuery, + refetch: useRefetchTransactionsQuery, + result: transactionQueryResult, +} = useLazyQuery(transactionsQuery) const { mutate: useLogoutMutation } = useMutation(logout) const { t } = useI18n() const { toastError } = useAppToast() @@ -239,7 +243,7 @@ const testModal = () => { } onMounted(() => { - updateTransactions({ currentPage: 0, pageSize: 10 }) + updateTransactions({ currentPage: 1, pageSize: 10 }) getCommunityStatistics() setTimeout(() => { skeleton.value = false @@ -260,9 +264,9 @@ const logoutUser = async () => { const updateTransactions = async ({ currentPage, pageSize }) => { pending.value = true try { - const result = await useTransactionsQuery() - if (!result) return // TODO this return mitigate an error when this method is called second time but without actual request - const { transactionList } = result + await loadOrFetchTransactionQuery({ currentPage, pageSize }) + if (!transactionQueryResult) return + const { transactionList } = transactionQueryResult.value GdtBalance.value = transactionList.balance.balanceGDT === null ? 0 : Number(transactionList.balance.balanceGDT) transactions.value = transactionList.transactions @@ -277,6 +281,13 @@ const updateTransactions = async ({ currentPage, pageSize }) => { } } +const loadOrFetchTransactionQuery = async (queryVariables = { currentPage: 1, pageSize: 25 }) => { + return ( + (await useTransactionsQuery(transactionsQuery, queryVariables)) || + (await useRefetchTransactionsQuery(queryVariables)) + ) +} + const getCommunityStatistics = async () => { try { const result = await useCommunityStatsQuery() diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 26828257e..f02fc64ed 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -19,10 +19,11 @@ - + import('@/pages/Send'), + name: 'Send', + props: true, meta: { requiresAuth: true, pageTitle: 'send', diff --git a/frontend/yarn.lock b/frontend/yarn.lock index c48c758f5..a4d6d07ca 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -6772,6 +6772,11 @@ tslib@^2.1.0, tslib@^2.3.0, tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +tua-body-scroll-lock@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/tua-body-scroll-lock/-/tua-body-scroll-lock-1.5.1.tgz#1b8b7316dff55a821d5bec3fef045f995e7627a5" + integrity sha512-AOjusG9EjTGxqqL1xqg6JeMauJ+IQoX9ITW1qP7UugySUdH6lzi2CqJRmU+oYqOv7vCQjOs5CQrjIakGlbOenQ== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" From ec964020c4c46ed28d37045aed7c627b3ab6bfb1 Mon Sep 17 00:00:00 2001 From: MateuszMichalowski <79852198+MateuszMichalowski@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:08:14 +0200 Subject: [PATCH 02/11] fix(frontend): fix logout issue (#3374) * fix(frontend): post migration fixes * fix(frontend): add network-only option so transactions are refetched properly on another user login. * feat(frontend): remove not needed await on mounted --------- Co-authored-by: einhornimmond --- frontend/src/layouts/DashboardLayout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue index bfd9f2049..ffbebf628 100755 --- a/frontend/src/layouts/DashboardLayout.vue +++ b/frontend/src/layouts/DashboardLayout.vue @@ -219,7 +219,7 @@ const { load: useTransactionsQuery, refetch: useRefetchTransactionsQuery, result: transactionQueryResult, -} = useLazyQuery(transactionsQuery) +} = useLazyQuery(transactionsQuery, {}, { fetchPolicy: 'network-only' }) const { mutate: useLogoutMutation } = useMutation(logout) const { t } = useI18n() const { toastError } = useAppToast() From b69d2273ae92f624e4b41a52c27f9dc951732482 Mon Sep 17 00:00:00 2001 From: MateuszMichalowski <79852198+MateuszMichalowski@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:06:34 +0200 Subject: [PATCH 03/11] feat(frontend): add transaction link in latest transactions (#3375) * fix(frontend): post migration fixes * fix(frontend): align with stylelint * fix(frontend): fix tests and dashboard layout * feat(frontend): add link to transactions * feat(frontend): remove unused code * feat(frontend): let dynamic keys in translations * feat(frontend): fix stylelint * feat(frontend): add missing styles for breadcrumb --------- Co-authored-by: einhornimmond --- frontend/.eslintrc.js | 1 - .../src/components/Breadcrumb/breadcrumb.vue | 9 +- .../src/components/GddTransactionList.vue | 31 +--- frontend/src/components/Menu/Navbar.vue | 6 + .../Template/RightSide/LastTransactions.vue | 87 +++++---- frontend/src/components/Transaction.spec.js | 8 + frontend/src/components/Transaction.vue | 13 +- .../src/components/TransactionListItem.vue | 1 + .../Transactions/GddTransaction.vue | 167 ++++++++++++++++++ frontend/src/layouts/DashboardLayout.vue | 1 + frontend/src/pages/Transactions.vue | 1 - frontend/src/routes/routes.js | 1 + frontend/src/store/store.js | 7 + 13 files changed, 275 insertions(+), 58 deletions(-) create mode 100644 frontend/src/components/Transactions/GddTransaction.vue diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index 108acad23..74a82c45c 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -50,7 +50,6 @@ module.exports = { 'vue/v-on-event-hyphenation': 0, // TODO remove at the end of migration and fix 'vue/require-default-prop': 0, // TODO remove at the end of migration and fix 'vue/no-computed-properties-in-data': 0, // TODO remove at the end of migration and fix - '@intlify/vue-i18n/no-dynamic-keys': 'error', '@intlify/vue-i18n/no-missing-keys': 0, // TODO remove at the end of migration and fix '@intlify/vue-i18n/no-unused-keys': [ 'error', diff --git a/frontend/src/components/Breadcrumb/breadcrumb.vue b/frontend/src/components/Breadcrumb/breadcrumb.vue index 6eb3368e7..305b34fe7 100644 --- a/frontend/src/components/Breadcrumb/breadcrumb.vue +++ b/frontend/src/components/Breadcrumb/breadcrumb.vue @@ -1,5 +1,5 @@ @@ -17,3 +17,10 @@ export default { }, } + + diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue index b0cd1bd5e..8396f8d52 100644 --- a/frontend/src/components/GddTransactionList.vue +++ b/frontend/src/components/GddTransactionList.vue @@ -24,27 +24,18 @@
-
+
- @@ -236,12 +236,6 @@ const darkMode = ref(false) const skeleton = ref(true) const totalUsers = ref(null) -const sessionModal = ref(null) - -const testModal = () => { - sessionModal.value.showTimeoutModalForTesting() -} - onMounted(() => { updateTransactions({ currentPage: 1, pageSize: 10 }) getCommunityStatistics() @@ -255,7 +249,7 @@ const logoutUser = async () => { await useLogoutMutation() await store.dispatch('logout') await router.push('/login') - } catch { + } catch (err) { await store.dispatch('logout') if (router.currentRoute.value.path !== '/login') await router.push('/login') } @@ -354,7 +348,7 @@ const setVisible = (bool) => { @media screen and (width <= 450px) { .breadcrumb { - padding-top: 60px; + padding-top: 55px !important; } } diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 05f73a5ec..06108cf2e 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -248,7 +248,8 @@ }, "h": "h", "language": "Sprache", - "link-load": "den letzten Link nachladen | die letzten {n} Links nachladen | weitere {n} Links nachladen", + "link-load": "den letzten Link nachladen | die letzten {n} Links nachladen", + "link-load-more": "weitere {n} Links nachladen", "login": "Anmelden", "math": { "asterisk": "*", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index c6a717e44..f37a40729 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -248,7 +248,8 @@ }, "h": "h", "language": "Language", - "link-load": "Load the last link | Load the last {n} links | Load more {n} links", + "link-load": "Load the last link | Load the last {n} links", + "link-load-more": "Load more {n} links", "login": "Sign in", "math": { "asterisk": "*", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index a169cada3..d7c6455ea 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -213,7 +213,8 @@ "recruited-member": "Miembro invitado" }, "language": "Idioma", - "link-load": "recargar el último enlace |recargar los últimos {n} enlaces | descargar más {n} enlaces", + "link-load": "recargar el último enlace | recargar los últimos {n} enlaces", + "link-load-more": "descargar más {n} enlaces", "login": "iniciar sesión", "math": { "aprox": "~", diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index a055cbd4f..cadc3b5d7 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -221,7 +221,8 @@ }, "h": "h", "language": "Langage", - "link-load": "Enregistrer le dernier lien | Enregistrer les derniers {n} liens | Enregistrer plus de {n} liens", + "link-load": "Enregistrer le dernier lien | Enregistrer les derniers {n} liens", + "link-load-more": "Enregistrer plus de {n} liens", "login": "Connexion", "math": { "asterisk": "*", diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json index bbbecbe8f..8f427fc71 100644 --- a/frontend/src/locales/nl.json +++ b/frontend/src/locales/nl.json @@ -213,7 +213,8 @@ "recruited-member": "Uitgenodigd lid" }, "language": "Taal", - "link-load": "de laatste link herladen | de laatste links herladen | verdere {n} links herladen", + "link-load": "de laatste link herladen | de laatste links herladen", + "link-load-more": "verdere {n} links herladen", "login": "Aanmelding", "math": { "aprox": "~", diff --git a/frontend/src/locales/tr.json b/frontend/src/locales/tr.json index 948c8228f..e4c6d3385 100644 --- a/frontend/src/locales/tr.json +++ b/frontend/src/locales/tr.json @@ -204,7 +204,8 @@ "recruited-member": "Davetli üye" }, "language": "Dil", - "link-load": "Son linki yükle| Son {n} linki yükle | {n} link daha yükle", + "link-load": "Son linki yükle| Son {n} linki yükle", + "link-load-more": "{n} link daha yükle", "login": "Giriş", "math": { "aprox": "~", From 1a7796ac08ec42a2f92b9614e9a1765e47d2542d Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Tue, 5 Nov 2024 19:35:51 +0100 Subject: [PATCH 07/11] fix broken circles --- frontend/src/pages/Circles.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/Circles.vue b/frontend/src/pages/Circles.vue index 7dc315342..f9cef737e 100644 --- a/frontend/src/pages/Circles.vue +++ b/frontend/src/pages/Circles.vue @@ -51,7 +51,7 @@ const { onError, } = useQuery(authenticateHumhubAutoLogin, null, { fetchPolicy: 'network-only', - enabled: false, + enabled: true, }) onResult(({ data }) => { From 772ff515813297af457f41e95296ce97f8f8ed35 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 7 Nov 2024 10:08:26 +0100 Subject: [PATCH 08/11] fix empty variables field on graphql request when updating user naming format --- frontend/src/components/UserSettings/UserNamingFormat.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/UserSettings/UserNamingFormat.vue b/frontend/src/components/UserSettings/UserNamingFormat.vue index 36c4a62f6..664cd4a00 100644 --- a/frontend/src/components/UserSettings/UserNamingFormat.vue +++ b/frontend/src/components/UserSettings/UserNamingFormat.vue @@ -79,7 +79,7 @@ const update = async (option) => { try { const variables = {} variables[props.attrName] = option.value - await updateUserData({ variables }) + await updateUserData({ ...variables }) toastSuccess(props.successMessage) selectedOption.value = option.value store.commit(props.attrName, option.value) From ccc04dd70682bb90c818b5ec0b07e7e7d0ddd74d Mon Sep 17 00:00:00 2001 From: MateuszMichalowski <79852198+MateuszMichalowski@users.noreply.github.com> Date: Sat, 9 Nov 2024 00:11:02 +0100 Subject: [PATCH 09/11] fix(frontend): fix postmigration fix (#3382) * feat(frontend): migration fixes * feat(admin): post migration fixes * feat(admin): revert docker change * feat(admin): update tests * feat(frontend): add feedback fixes --- frontend/package.json | 7 +- .../src/assets/scss/gradido-template.scss | 9 ++ frontend/src/components/AppAvatar.vue | 135 ++++++++++++++++++ frontend/src/components/CommunitySwitch.vue | 1 - .../ContributionMessagesListItem.vue | 36 ++++- .../Contributions/ContributionListItem.vue | 18 ++- .../CollapseLinksList.spec.js | 5 +- .../components/GddSend/TransactionForm.vue | 26 ++-- frontend/src/components/Menu/Navbar.spec.js | 6 +- frontend/src/components/Menu/Navbar.vue | 13 +- .../components/SessionLogoutTimeout.spec.js | 119 ++++++++++----- .../Template/ContentHeader/NavCommunity.vue | 1 + .../Template/RightSide/LastTransactions.vue | 16 ++- .../Transactions/GddTransaction.vue | 4 +- .../Transactions/TransactionReceive.spec.js | 8 +- .../Transactions/TransactionReceive.vue | 10 +- .../Transactions/TransactionSend.spec.js | 8 +- .../Transactions/TransactionSend.vue | 8 +- .../components/UserSettings/UserCard.spec.js | 8 +- .../src/components/UserSettings/UserCard.vue | 12 +- .../UserSettings/UserNewsletter.spec.js | 43 ++++-- .../UserSettings/UserNewsletter.vue | 8 +- frontend/vite.config.js | 11 +- frontend/yarn.lock | 81 ++--------- 24 files changed, 379 insertions(+), 214 deletions(-) create mode 100644 frontend/src/components/AppAvatar.vue diff --git a/frontend/package.json b/frontend/package.json index 5756cfc20..5bc403506 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,11 +26,10 @@ "@vee-validate/i18n": "^4.13.2", "@vee-validate/rules": "^4.13.2", "@vee-validate/yup": "^4.13.2", - "@vitejs/plugin-vue": "3.2.0", + "@vitejs/plugin-vue": "5.1.4", "@vue-leaflet/vue-leaflet": "^0.10.1", "@vue/apollo-composable": "^4.0.2", "@vue/apollo-option": "^4.0.0", - "@vue/compat": "^3.4.31", "apollo-boost": "^0.4.9", "autoprefixer": "^10.4.19", "babel-core": "^7.0.0-bridge.0", @@ -59,13 +58,10 @@ "vite-plugin-commonjs": "^0.10.1", "vue": "3.4.31", "vue-apollo": "^3.1.2", - "vue-avatar": "^2.3.3", "vue-flatpickr-component": "^8.1.2", "vue-i18n": "^9.13.1", - "vue-loading-overlay": "^3.4.2", "vue-router": "^4.4.0", "vue-timer-hook": "^1.0.84", - "vue-timers": "^2.0.4", "vuex": "^4.1.0", "vuex-persistedstate": "^4.1.0", "yup": "^1.4.0" @@ -75,7 +71,6 @@ "@iconify-json/bi": "^1.1.23", "@intlify/eslint-plugin-vue-i18n": "^1.4.0", "@vitest/coverage-v8": "^2.0.5", - "@vue/compiler-sfc": "^3.4.35", "@vue/eslint-config-prettier": "^4.0.1", "@vue/test-utils": "^2.4.5", "babel-plugin-component": "^1.1.0", diff --git a/frontend/src/assets/scss/gradido-template.scss b/frontend/src/assets/scss/gradido-template.scss index ca6f8df3a..6c39946f1 100644 --- a/frontend/src/assets/scss/gradido-template.scss +++ b/frontend/src/assets/scss/gradido-template.scss @@ -359,3 +359,12 @@ input.rounded-input { .fs-7 { font-size: 14px !important; } + +.vue3-avatar.container { + padding: 0 !important; +} + +.avatar { + font-family: inherit !important; + font-weight: normal !important; +} diff --git a/frontend/src/components/AppAvatar.vue b/frontend/src/components/AppAvatar.vue new file mode 100644 index 000000000..fdf1dc28a --- /dev/null +++ b/frontend/src/components/AppAvatar.vue @@ -0,0 +1,135 @@ + + + diff --git a/frontend/src/components/CommunitySwitch.vue b/frontend/src/components/CommunitySwitch.vue index e16b72a9c..cd50789dd 100644 --- a/frontend/src/components/CommunitySwitch.vue +++ b/frontend/src/components/CommunitySwitch.vue @@ -90,5 +90,4 @@ function setDefaultCommunity() { } onMounted(setDefaultCommunity) -onUpdated(setDefaultCommunity) diff --git a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue index e1a8a3250..108079704 100644 --- a/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue +++ b/frontend/src/components/ContributionMessages/ContributionMessagesListItem.vue @@ -16,7 +16,17 @@ - + + + + + + +
@@ -28,14 +38,30 @@ - + + + + + + +
- + + + + + + +
@@ -54,13 +80,13 @@