From a9c52bfcaee52d5acece0a3dc0e2e92d6cf73651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 29 Aug 2022 12:48:11 +0200 Subject: [PATCH] Renamed 'AvatarUploader' property from 'user' to 'profile' - Rename several CSS. --- .../Uploader/AvatarUploader.spec.js | 2 +- webapp/components/Uploader/AvatarUploader.vue | 21 ++++++++++--------- webapp/locales/de.json | 8 +++---- webapp/locales/en.json | 8 +++---- webapp/locales/es.json | 8 +++---- webapp/locales/fr.json | 8 +++---- webapp/locales/it.json | 8 +++---- webapp/locales/nl.json | 3 +++ webapp/locales/pl.json | 8 +++---- webapp/locales/pt.json | 8 +++---- webapp/locales/ru.json | 8 +++---- webapp/pages/group/_id/_slug.vue | 3 +-- webapp/pages/profile/_id/_slug.vue | 2 +- 13 files changed, 41 insertions(+), 54 deletions(-) diff --git a/webapp/components/Uploader/AvatarUploader.spec.js b/webapp/components/Uploader/AvatarUploader.spec.js index 568e4f3a8..8fc313c43 100644 --- a/webapp/components/Uploader/AvatarUploader.spec.js +++ b/webapp/components/Uploader/AvatarUploader.spec.js @@ -26,7 +26,7 @@ describe('AvatarUploader', () => { } const propsData = { - user: { + profile: { avatar: { url: '/api/generic.jpg' }, }, } diff --git a/webapp/components/Uploader/AvatarUploader.vue b/webapp/components/Uploader/AvatarUploader.vue index f2ef4e712..6937aeabc 100644 --- a/webapp/components/Uploader/AvatarUploader.vue +++ b/webapp/components/Uploader/AvatarUploader.vue @@ -10,8 +10,8 @@ >
-
-
+
+
@@ -24,11 +24,12 @@ import vueDropzone from 'nuxt-dropzone' import { updateUserMutation } from '~/graphql/User.js' export default { + name: 'AvatarUploader', components: { vueDropzone, }, props: { - user: { type: Object, default: null }, + profile: { type: Object, default: null }, }, data() { return { @@ -43,7 +44,7 @@ export default { }, computed: { avatarUrl() { - const { avatar } = this.user + const { avatar } = this.profile return avatar && avatar.url }, }, @@ -73,11 +74,11 @@ export default { avatar: { upload: avatarUpload, }, - id: this.user.id, + id: this.profile.id, }, }) .then(() => { - this.$toast.success(this.$t('user.avatar.submitted')) + this.$toast.success(this.$t('profile.avatar.submitted')) }) .catch((error) => this.$toast.error(error.message)) }, @@ -115,7 +116,7 @@ export default { width: 100%; } -.hc-attachments-upload-area { +.avatar-attachments-upload-area { position: relative; display: flex; align-items: center; @@ -123,11 +124,11 @@ export default { cursor: pointer; } -.hc-attachments-upload-button { +.avatar-attachments-upload-button { pointer-events: none; } -.hc-drag-marker { +.avatar-drag-marker { position: relative; width: 122px; height: 122px; @@ -165,7 +166,7 @@ export default { border-radius: 100%; border: 1px dashed hsl(0, 0%, 25%); } - .hc-attachments-upload-area:hover & { + .avatar-attachments-upload-area:hover & { opacity: 1; } } diff --git a/webapp/locales/de.json b/webapp/locales/de.json index db2046ae3..134368ad3 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -517,6 +517,9 @@ } }, "profile": { + "avatar": { + "submitted": "Erfolgreich hochgeladen!" + }, "commented": "Kommentiert", "follow": "Folgen", "followers": "Folgen", @@ -820,10 +823,5 @@ "newTermsAndConditions": "Neue Nutzungsbedingungen", "termsAndConditionsNewConfirm": "Ich habe die neuen Nutzungsbedingungen durchgelesen und stimme zu.", "termsAndConditionsNewConfirmText": "Bitte lies Dir die neuen Nutzungsbedingungen jetzt durch!" - }, - "user": { - "avatar": { - "submitted": "Erfolgreich hochgeladen!" - } } } diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 5b49c96ee..fe12ef437 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -517,6 +517,9 @@ } }, "profile": { + "avatar": { + "submitted": "Upload successful!" + }, "commented": "Commented", "follow": "Follow", "followers": "Followers", @@ -820,10 +823,5 @@ "newTermsAndConditions": "New Terms and Conditions", "termsAndConditionsNewConfirm": "I have read and agree to the new terms of conditions.", "termsAndConditionsNewConfirmText": "Please read the new terms of use now!" - }, - "user": { - "avatar": { - "submitted": "Upload successful!" - } } } diff --git a/webapp/locales/es.json b/webapp/locales/es.json index 900b2fa5d..55d654231 100644 --- a/webapp/locales/es.json +++ b/webapp/locales/es.json @@ -435,6 +435,9 @@ } }, "profile": { + "avatar": { + "submitted": "Carga con éxito" + }, "commented": "Comentado", "follow": "Seguir", "followers": "Seguidores", @@ -715,10 +718,5 @@ "newTermsAndConditions": "Nuevos términos de uso", "termsAndConditionsNewConfirm": "He leído y acepto los nuevos términos de uso.", "termsAndConditionsNewConfirmText": "¡Por favor, lea los nuevos términos de uso ahora!" - }, - "user": { - "avatar": { - "submitted": "Carga con éxito" - } } } diff --git a/webapp/locales/fr.json b/webapp/locales/fr.json index 684f080b7..8c5a731a3 100644 --- a/webapp/locales/fr.json +++ b/webapp/locales/fr.json @@ -423,6 +423,9 @@ } }, "profile": { + "avatar": { + "submitted": "Téléchargement réussi" + }, "commented": "Commentais", "follow": "Suivre", "followers": "Suiveurs", @@ -683,10 +686,5 @@ "newTermsAndConditions": "Nouvelles conditions générales", "termsAndConditionsNewConfirm": "J'ai lu et accepté les nouvelles conditions générales.", "termsAndConditionsNewConfirmText": "Veuillez lire les nouvelles conditions d'utilisation dès maintenant !" - }, - "user": { - "avatar": { - "submitted": "Téléchargement réussi" - } } } diff --git a/webapp/locales/it.json b/webapp/locales/it.json index 71994167b..694dee532 100644 --- a/webapp/locales/it.json +++ b/webapp/locales/it.json @@ -376,6 +376,9 @@ } }, "profile": { + "avatar": { + "submitted": null + }, "commented": "Commentato", "follow": "Seguire", "followers": "Seguenti", @@ -633,10 +636,5 @@ "newTermsAndConditions": "Nuovi Termini e Condizioni", "termsAndConditionsNewConfirm": "Ho letto e accetto le nuove condizioni generali di contratto.", "termsAndConditionsNewConfirmText": "Si prega di leggere le nuove condizioni d'uso ora!" - }, - "user": { - "avatar": { - "submitted": null - } } } diff --git a/webapp/locales/nl.json b/webapp/locales/nl.json index 3c1a8902d..fc2e90a34 100644 --- a/webapp/locales/nl.json +++ b/webapp/locales/nl.json @@ -100,6 +100,9 @@ } }, "profile": { + "avatar": { + "submitted": null + }, "follow": "Volgen", "followers": "Volgelingen", "following": "Volgt", diff --git a/webapp/locales/pl.json b/webapp/locales/pl.json index 6ae3e32f7..49405d0a9 100644 --- a/webapp/locales/pl.json +++ b/webapp/locales/pl.json @@ -208,6 +208,9 @@ } }, "profile": { + "avatar": { + "submitted": "Przesłano pomyślnie" + }, "commented": "Skomentuj", "follow": "Obserwuj", "followers": "Obserwujący", @@ -356,10 +359,5 @@ "taxident": "Numer identyfikacyjny podatku od wartości dodanej zgodnie z § 27 a Ustawa o podatku od wartości dodanej (Niemcy)", "termsAc": "Warunki użytkowania", "tribunal": "sąd rejestrowy" - }, - "user": { - "avatar": { - "submitted": "Przesłano pomyślnie" - } } } diff --git a/webapp/locales/pt.json b/webapp/locales/pt.json index f5f89374a..f85e7b0e2 100644 --- a/webapp/locales/pt.json +++ b/webapp/locales/pt.json @@ -412,6 +412,9 @@ } }, "profile": { + "avatar": { + "submitted": "Carregado com sucesso!" + }, "commented": "Comentou", "follow": "Seguir", "followers": "Seguidores", @@ -668,10 +671,5 @@ "newTermsAndConditions": "Novos Termos e Condições", "termsAndConditionsNewConfirm": "Eu li e concordo com os novos termos de condições.", "termsAndConditionsNewConfirmText": "Por favor, leia os novos termos de uso agora!" - }, - "user": { - "avatar": { - "submitted": "Carregado com sucesso!" - } } } diff --git a/webapp/locales/ru.json b/webapp/locales/ru.json index 5f1368820..de7b06326 100644 --- a/webapp/locales/ru.json +++ b/webapp/locales/ru.json @@ -449,6 +449,9 @@ } }, "profile": { + "avatar": { + "submitted": "Успешная загрузка!" + }, "commented": "Прокомментированные", "follow": "Подписаться", "followers": "Подписчики", @@ -729,10 +732,5 @@ "newTermsAndConditions": "Новые условия и положения", "termsAndConditionsNewConfirm": "Я прочитал(а) и согласен(на) с новыми условиями.", "termsAndConditionsNewConfirmText": "Пожалуйста, ознакомьтесь с новыми условиями использования!" - }, - "user": { - "avatar": { - "submitted": "Успешная загрузка!" - } } } diff --git a/webapp/pages/group/_id/_slug.vue b/webapp/pages/group/_id/_slug.vue index b04874047..80c4ef6ca 100644 --- a/webapp/pages/group/_id/_slug.vue +++ b/webapp/pages/group/_id/_slug.vue @@ -7,8 +7,7 @@ :class="{ 'disabled-content': group.disabled }" style="position: relative; height: auto; overflow: visible" > - - + diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index e25cb8fd5..98ff88a96 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -7,7 +7,7 @@ :class="{ 'disabled-content': user.disabled }" style="position: relative; height: auto; overflow: visible" > - +