From e49cfa883b78300ace3d310a811dca15ba421a09 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Tue, 24 Sep 2024 10:43:55 +0200 Subject: [PATCH 01/25] increase publish name initalien two --- backend/src/data/PublishName.logic.ts | 8 ++++---- frontend/src/locales/de.json | 6 +++--- frontend/src/locales/en.json | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/backend/src/data/PublishName.logic.ts b/backend/src/data/PublishName.logic.ts index e307a74d0..5e3e0e501 100644 --- a/backend/src/data/PublishName.logic.ts +++ b/backend/src/data/PublishName.logic.ts @@ -22,13 +22,13 @@ export class PublishNameLogic { return this.user.firstName } if (PublishNameType.PUBLISH_NAME_INITIALS === publishNameType) { - return this.user.firstName.substring(0, 1) + return this.user.firstName.substring(0, 2) } if (PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType) { if (this.user.alias) { return this.user.alias } else { - return this.user.firstName.substring(0, 1) + return this.user.firstName.substring(0, 2) } } return '' @@ -48,12 +48,12 @@ export class PublishNameLogic { publishNameType, ) ) { - return this.user.lastName.substring(0, 1) + return this.user.lastName.substring(0, 2) } else if ( PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType && !this.user.alias ) { - return this.user.lastName.substring(0, 1) + return this.user.lastName.substring(0, 2) } return '' diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index e04778830..a4662bdb5 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -376,13 +376,13 @@ }, "publish-name": { "alias-or-initials": "Benutzername oder Initialen", - "alias-or-initials-tooltip": "Benutzername, falls vorhanden, oder die Initialen von Vorname und Nachname", + "alias-or-initials-tooltip": "Benutzername, falls vorhanden, oder die Initialen von Vorname und Nachname jeweils die ersten zwei Buchstaben", "first": "Vorname", "first-tooltip": "Nur der Vornamen", "first-initial": "Vorname und Initial", - "first-initial-tooltip": "Vornamen plus Anfangsbuchstabe des Nachnamens", + "first-initial-tooltip": "Vornamen plus die ersten beiden Anfangsbuchstabe des Nachnamens", "initials": "Initialen", - "initials-tooltip": "Initialen von Vor- und Nachname unabhängig von der Existenz des Benutzernamens", + "initials-tooltip": "Initialen von Vor- und Nachname also jeweils die ersten zwei Buchstaben unabhängig von der Existenz des Benutzernamens", "name-full": "Vorname und Nachname", "name-full-tooltip": "Vollständiger Name: Vorname plus Nachname" }, diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 2aceda935..e28fe4c9f 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -376,15 +376,15 @@ }, "publish-name": { "alias-or-initials": "Username or initials (Default)", - "alias-or-initials-tooltip": "username if exists or Initials of firstname and lastname", - "first": "firstname", - "first-tooltip": "the firstname only", - "first-initial": "firstname and initial", - "first-initial-tooltip": "firstname plus initial of lastname", + "alias-or-initials-tooltip": "username, if available, or the initials of the first name and last name, the first two letters in each case", + "first": "Firstname", + "first-tooltip": "the first name only", + "first-initial": "First name and initial", + "first-initial-tooltip": "first name plus the first two initial letters of the last name", "initials": "Initials", - "initials-tooltip": "Initials of firstname and lastname independent if username exists", - "name-full": "firstname and lastname", - "name-full-tooltip": "fullname: firstname plus lastname" + "initials-tooltip": "Initials of first name and last name, i.e. the first two letters of each regardless of the existence of the user name", + "name-full": "first name and last name", + "name-full-tooltip": "full name: first name plus last name" }, "showAmountGDD": "Your GDD amount is visible.", "showAmountGDT": "Your GDT amount is visible.", From d6b3ce66c3a35b3c2f2911b8480544b61c1d53b1 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 3 Oct 2024 14:07:27 +0200 Subject: [PATCH 02/25] use first character upper case, second character lower case --- backend/src/data/PublishName.logic.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/backend/src/data/PublishName.logic.ts b/backend/src/data/PublishName.logic.ts index 5e3e0e501..3fb9cccfa 100644 --- a/backend/src/data/PublishName.logic.ts +++ b/backend/src/data/PublishName.logic.ts @@ -1,10 +1,18 @@ import { User } from '@entity/User' import { PublishNameType } from '@/graphql/enum/PublishNameType' +import { LogError } from '@/server/LogError' export class PublishNameLogic { constructor(private user: User) {} + private firstUpperCaseSecondLowerCase(substring: string) { + if (substring.length !== 2) { + throw new LogError("substring hasn't expected length of 2") + } + return substring.charAt(0).toUpperCase() + substring.charAt(1).toLocaleLowerCase() + } + /** * get first name based on publishNameType: PublishNameType value * @param publishNameType @@ -22,13 +30,13 @@ export class PublishNameLogic { return this.user.firstName } if (PublishNameType.PUBLISH_NAME_INITIALS === publishNameType) { - return this.user.firstName.substring(0, 2) + return this.user.firstName.substring(0, 1) } if (PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType) { if (this.user.alias) { return this.user.alias } else { - return this.user.firstName.substring(0, 2) + return this.firstUpperCaseSecondLowerCase(this.user.firstName.substring(0, 2)) } } return '' @@ -48,12 +56,12 @@ export class PublishNameLogic { publishNameType, ) ) { - return this.user.lastName.substring(0, 2) + return this.user.lastName.substring(0, 1) } else if ( PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType && !this.user.alias ) { - return this.user.lastName.substring(0, 2) + return this.firstUpperCaseSecondLowerCase(this.user.lastName.substring(0, 2)) } return '' From 5b58617d932b58c71287ebae6ddfbc4482af4e28 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 7 Oct 2024 13:28:41 +0200 Subject: [PATCH 03/25] update text --- frontend/src/assets/News/news.json | 50 +++++++++---------- .../src/components/Overview/CommunityNews.vue | 2 +- frontend/src/locales/de.json | 6 +-- frontend/src/locales/en.json | 8 +-- frontend/src/locales/es.json | 7 +++ frontend/src/locales/fr.json | 7 +++ frontend/src/locales/nl.json | 7 +++ 7 files changed, 54 insertions(+), 33 deletions(-) diff --git a/frontend/src/assets/News/news.json b/frontend/src/assets/News/news.json index 013eea7be..1d8541560 100644 --- a/frontend/src/assets/News/news.json +++ b/frontend/src/assets/News/news.json @@ -1,42 +1,42 @@ [ { "locale": "de", - "text": "Gradido-Kreise: neue interne Kooperationsplattform", - "button": "Jetzt freischalten...", - "internUrl": "https://gradido.net/de/gradido-kreise-gemeinsam-mit-freunden-die-zukunft-gestalten", - "extra": "Gemeinsam unterstützen wir einander, achtsam in Kreiskultur. In geschützten Räumen können wir nun frei kommunizieren und zusammenarbeiten, ohne auf die sozialen Medien angewiesen zu sein.", - "extra2": "Schalte Gradido-Kreise in den Einstellungen/Community frei und klicke anschließend auf das Menü \"Kreise\"!" + "text": "Kreise haben jetzt sichere Video-Meetings!", + "extra": "In unserer geschützten Community unterstützen wir einander, achtsam in Kreiskultur.", + "extra2": "Wähle hier, wie dein Name angezeigt werden soll:", + "button": "Namensanzeige wählen", + "internUrl": "/settings/extern" }, { "locale": "en", - "text": "Gradido circles: new internal cooperation platform", - "button": "Activate now...", - "internUrl": "https://gradido.net/en/gradido-kreise-gemeinsam-mit-freunden-die-zukunft-gestalten/", - "extra": "Together, we support each other, mindfully in a circular culture. We can now communicate and collaborate freely in protected spaces without having to rely on social media.", - "extra2": "Activate Gradido circles in the settings/community and then click on the menu \"Circles\"!" + "text": "Circles now have safe video meetings!", + "extra": "In our protected community we support each other, mindful in circle culture.", + "extra2": "Choose here how your name should be displayed:", + "button": "Choose name display", + "internUrl": "/settings/extern" }, { "locale": "fr", - "text": "Cercles Gradido : nouvelle plateforme de coopération interne", - "button": "En savoir plus", - "internUrl": "https://gradido.net/fr/gradido-kreise-gemeinsam-mit-freunden-die-zukunft-gestalten/", - "extra": "Ensemble, nous nous soutenons mutuellement, en étant attentifs à la culture du cercle. Dans des espaces protégés, nous pouvons désormais communiquer et collaborer librement, sans être tributaires des médias sociaux.", - "extra2": "Débloque les cercles Gradido dans les paramètres/communauté et clique ensuite sur le menu \"Cercles\" !" + "text": "Les Cercles ont désormais des réunions vidéo sécurisées !", + "extra": "Dans notre communauté protégée, nous nous soutenons mutuellement, en faisant attention à la culture des cercles.", + "extra2": "Choisis ici comment ton nom doit être affiché :", + "button": "Choisir l'affichage du nom", + "internUrl": "/settings/extern" }, { "locale": "es", - "text": "Círculos Gradido: nueva plataforma de cooperación interna", - "button": "Activar ahora...", - "internUrl": "https://gradido.net/es/gradido-kreise-gemeinsam-mit-freunden-die-zukunft-gestalten/", - "extra": "Juntos, nos apoyamos mutuamente, de forma consciente, en una cultura circular. Ahora podemos comunicarnos y colaborar libremente en espacios protegidos sin tener que depender de las redes sociales.", - "extra2": "Activa los círculos de Gradido en los ajustes/comunidad y luego haz clic en el menú \"Círculos\"." + "text": "¡Los Círculos ahora tienen reuniones de vídeo seguras!", + "extra": "En nuestra comunidad protegida nos apoyamos mutuamente, conscientes de la cultura del círculo.", + "extra2": "Elige aquí cómo se mostrará tu nombre:", + "button": "Seleccione la visualización del nombre", + "internUrl": "/settings/extern" }, { "locale": "nl", - "text": "Gradido cirkels: nieuw intern samenwerkingsplatform", - "button": "Nu activeren...", - "internUrl": "https://gradido.net/nl/gradido-kreise-gemeinsam-mit-freunden-die-zukunft-gestalten/", - "extra": "Samen ondersteunen we elkaar, mindful in een circulaire cultuur. We kunnen nu vrij communiceren en samenwerken in beschermde ruimtes zonder afhankelijk te zijn van sociale media.", - "extra2": "Activeer Gradido cirkels in de instellingen/community en klik dan op het menu \"Cirkels\"!" + "text": "Cirkels hebben nu veilige videomeetings!", + "extra": "In onze beschermde gemeenschap steunen we elkaar, mindful in de kringcultuur.", + "extra2": "Kies hier hoe je naam moet worden weergegeven:", + "button": "Selecteer naamweergave", + "internUrl": "/settings/extern" } ] diff --git a/frontend/src/components/Overview/CommunityNews.vue b/frontend/src/components/Overview/CommunityNews.vue index 7074c9a27..6906c8b69 100644 --- a/frontend/src/components/Overview/CommunityNews.vue +++ b/frontend/src/components/Overview/CommunityNews.vue @@ -30,7 +30,7 @@ {{ item.button }} - + {{ item.button }} diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index e04778830..fa9a5ab58 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -32,8 +32,8 @@ "back": "Zurück", "circles": { "headline": "Gemeinsam unterstützen wir einander – achtsam in Kreiskultur.", - "text": "In geschützten Räumen können wir frei kommunizieren und kooperieren, ohne auf die sozialen Medien angewiesen zu sein. Mit Klick auf den Button öffnest Du die Kooperationsplattform in einem neuen Browser-Fenster.", - "button": "Gradido-Kreise starten..." + "text": "Mit Klick auf den Button öffnest Du die Kooperationsplattform in einem neuen Browser-Fenster.", + "button": "Kreise starten..." }, "community": { "admins": "Administratoren", @@ -291,7 +291,7 @@ "overview": "Willkommen {name}", "send": "Sende Gradidos", "settings": "Einstellungen", - "circles": "Gradido Kreise (Beta)", + "circles": "Gradido Kreise", "transactions": "Deine Transaktionen", "usersearch": "Geografische Nutzersuche" }, diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 2aceda935..6dc4b077c 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -32,8 +32,8 @@ "back": "Back", "circles": { "headline": "Together we support each other - mindful in circle culture.", - "text": "We can communicate and collaborate freely in protected spaces without having to rely on social media. Click on the button to open the collaboration platform in a new browser window.", - "button": "Gradido circles start..." + "text": "Click on the button to open the cooperation platform in a new browser window.", + "button": "Start Circles..." }, "community": { "admins": "Administrators", @@ -278,7 +278,7 @@ "overview": "Overview", "send": "Send", "settings": "Settings", - "circles": "Circle", + "circles": "Circles", "support": "Support", "transactions": "Transactions", "usersearch": "Geographical User Search" @@ -292,7 +292,7 @@ "send": "Send Gradidos", "settings": "Settings", "transactions": "Your transactions", - "circles": "Gradido Circles (Beta)", + "circles": "Gradido Circles", "usersearch": "Geographical User Search" }, "qrCode": "QR Code", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index cc01acb9c..53cd3aa8d 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -20,6 +20,11 @@ } }, "back": "Volver", + "circles": { + "headline": "Juntos nos apoyamos - atentos a la cultura de los círculos.", + "text": "Haga clic en el botón para abrir la plataforma de cooperación en una nueva ventana del navegador.", + "button": "Iniciar Círculos..." + }, "community": { "admins": "Administradores", "choose-another-community": "Escoger otra comunidad", @@ -243,6 +248,7 @@ "overview": "Resumen", "profile": "Mi Perfil", "send": "Enviar", + "circles": "Círculos", "support": "Soporte", "transactions": "Transacciones", "usersearch": "Buscar usuarios" @@ -256,6 +262,7 @@ "send": "Enviar Gradidos", "settings": "Soporte", "transactions": "Tu Transacciones", + "circles": "Círculos Gradido", "usersearch": "Búsqueda geográfica de usuarios" }, "qrCode": "Código QR", diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index 408983190..e8a7e377f 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -22,6 +22,11 @@ } }, "back": "Retour", + "circles": { + "headline": "Ensemble, nous nous soutenons mutuellement - attentifs à la culture du cercle.", + "text": "En cliquant sur le bouton, tu ouvres la plateforme de coopération dans une nouvelle fenêtre de navigation.", + "button": "Démarrer les Cercles..." + }, "community": { "admins": "Administrateurs", "choose-another-community": "Choisissez une autre communauté", @@ -251,6 +256,7 @@ "overview": "Aperçu", "send": "Envoyer", "settings": "Configuration", + "circles": "Cercles", "support": "Aide", "transactions": "Transactions", "usersearch": "Recherche d'utilisateurs" @@ -264,6 +270,7 @@ "send": "Envoyé Gradidos", "settings": "Configuration", "transactions": "Vos transactions", + "circles": "Cercles Gradido", "usersearch": "Recherche géographique d'utilisateurs" }, "qrCode": "QR Code", diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json index a0b6aefad..de0c4137d 100644 --- a/frontend/src/locales/nl.json +++ b/frontend/src/locales/nl.json @@ -20,6 +20,11 @@ } }, "back": "Terug", + "circles": { + "headline": "Samen ondersteunen we elkaar - mindful in de cirkelcultuur.", + "text": "Klik op de knop om het samenwerkingsplatform te openen in een nieuw browservenster.", + "button": "Cirkels starten..." + }, "community": { "admins": "Beheerders", "choose-another-community": "Kies een andere gemeenschap", @@ -243,6 +248,7 @@ "overview": "Overzicht", "profile": "Mijn profiel", "send": "Sturen", + "circles": "Cirkels", "support": "Support", "transactions": "Transacties", "usersearch": "Gebruiker zoeken" @@ -256,6 +262,7 @@ "send": "Send Gradidos", "settings": "Settings", "transactions": "Your transactions", + "circles": "Gradido Cirkels", "usersearch": "Geografisch zoeken naar gebruikers" }, "qrCode": "QR Code", From e802bac1524cdb77e6c65aa6abfbf90159bcef0d Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 7 Oct 2024 18:50:30 +0200 Subject: [PATCH 04/25] initial and alias and initial --- backend/src/data/PublishName.logic.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/backend/src/data/PublishName.logic.ts b/backend/src/data/PublishName.logic.ts index 3fb9cccfa..2c85f5722 100644 --- a/backend/src/data/PublishName.logic.ts +++ b/backend/src/data/PublishName.logic.ts @@ -30,7 +30,7 @@ export class PublishNameLogic { return this.user.firstName } if (PublishNameType.PUBLISH_NAME_INITIALS === publishNameType) { - return this.user.firstName.substring(0, 1) + return this.firstUpperCaseSecondLowerCase(this.user.firstName.substring(0, 2)) } if (PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType) { if (this.user.alias) { @@ -51,15 +51,11 @@ export class PublishNameLogic { public getLastName(publishNameType: PublishNameType): string { if (PublishNameType.PUBLISH_NAME_FULL === publishNameType) { return this.user.lastName - } else if ( - [PublishNameType.PUBLISH_NAME_FIRST_INITIAL, PublishNameType.PUBLISH_NAME_INITIALS].includes( - publishNameType, - ) - ) { + } else if (PublishNameType.PUBLISH_NAME_FIRST_INITIAL === publishNameType) { return this.user.lastName.substring(0, 1) } else if ( - PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType && - !this.user.alias + (PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS === publishNameType && !this.user.alias) || + PublishNameType.PUBLISH_NAME_INITIALS === publishNameType ) { return this.firstUpperCaseSecondLowerCase(this.user.lastName.substring(0, 2)) } 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 05/25] 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 06/25] 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 07/25] 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 13/25] 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 14/25] 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 15/25] 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 @@