diff --git a/backend/src/middleware/userMiddleware.js b/backend/src/middleware/userMiddleware.js index 2979fdadf..b3fc1bf2c 100644 --- a/backend/src/middleware/userMiddleware.js +++ b/backend/src/middleware/userMiddleware.js @@ -1,6 +1,7 @@ -import createOrUpdateLocations from './nodes/locations' import dotenv from 'dotenv' +import createOrUpdateLocations from './nodes/locations' + dotenv.config() export default { diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 6e47d7122..801b01e27 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -15,7 +15,8 @@ "followers": "Folgen", "following": "Folgt", "shouted": "Empfohlen", - "commented": "Kommentiert" + "commented": "Kommentiert", + "userAnonym": "Anonymus" }, "search": { "placeholder": "Suchen", @@ -27,6 +28,7 @@ "data": { "name": "Deine Daten", "labelName": "Dein Name", + "namePlaceholder": "Anonymus", "labelCity": "Deine Stadt oder Region", "labelBio": "Über dich" }, @@ -202,4 +204,4 @@ "shoutButton": { "shouted": "empfohlen" } -} +} \ No newline at end of file diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 62c8f3e19..1e46664f1 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -15,7 +15,8 @@ "followers": "Followers", "following": "Following", "shouted": "Shouted", - "commented": "Commented" + "commented": "Commented", + "userAnonym": "Anonymous" }, "search": { "placeholder": "Search", @@ -27,6 +28,7 @@ "data": { "name": "Your data", "labelName": "Your Name", + "namePlaceholder": "Anonymous", "labelCity": "Your City or Region", "labelBio": "About You" }, @@ -202,4 +204,4 @@ "shoutButton": { "shouted": "shouted" } -} +} \ No newline at end of file diff --git a/webapp/locales/it.json b/webapp/locales/it.json index 0225babad..25005a07a 100644 --- a/webapp/locales/it.json +++ b/webapp/locales/it.json @@ -15,13 +15,15 @@ "followers": "Seguenti", "following": "Seguendo", "shouted": "Gridato", - "commented": "Commentato" + "commented": "Commentato", + "userAnonym": "Anonymous" }, "settings": { "name": "Impostazioni", "data": { "name": "I tuoi dati", "labelName": "Nome", + "namePlaceholder": "Anonymous", "labelCity": "La tua città o regione", "labelBio": "Su di te" }, diff --git a/webapp/locales/pl.json b/webapp/locales/pl.json index 0f2147996..506a04f1b 100644 --- a/webapp/locales/pl.json +++ b/webapp/locales/pl.json @@ -15,13 +15,15 @@ "followers": "Obserwujący", "following": "Obserwowani", "shouted": "Krzyknij", - "commented": "Skomentuj" + "commented": "Skomentuj", + "userAnonym": "Anonymous" }, "settings": { "name": "Ustawienia", "data": { "name": "Twoje dane", "labelName": "Twoje dane", + "namePlaceholder": "Anonymous", "labelCity": "Twoje miasto lub region", "labelBio": "O Tobie" }, diff --git a/webapp/locales/pt.json b/webapp/locales/pt.json index 4151f49c7..0636ba6f9 100644 --- a/webapp/locales/pt.json +++ b/webapp/locales/pt.json @@ -15,13 +15,15 @@ "followers": "Seguidores", "following": "Seguindo", "shouted": "Aclamou", - "commented": "Comentou" + "commented": "Comentou", + "userAnonym": "Anonymous" }, "settings": { "name": "Configurações", "data": { "name": "Seus dados", "labelName": "Seu nome", + "namePlaceholder": "Anonymous", "labelCity": "Sua cidade ou estado", "labelBio": "Sobre você" }, diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index a3b10529e..f4367d0be 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -3,23 +3,14 @@ PROFILE IMAGE - - + + - + - - {{ user.name }} - - - {{ user.location.name }} + {{ userName() }} + + + {{ user.location.name }} - {{ $t('profile.memberSince') }} {{ user.createdAt | date('MMMM yyyy') }} - + >{{ $t('profile.memberSince') }} {{ user.createdAt | date('MMMM yyyy') }} - - + + - + - + - + - - - {{ user.about }} - + + {{ user.about }} - - - Netzwerk - + + Netzwerk - - - Wem folgt {{ user.name | truncate(15) }}? - + + Wem folgt {{ userName(15) }}? - + - + - + - und {{ user.followingCount - user.following.length }} weitere - + >und {{ user.followingCount - user.following.length }} weitere - - {{ user.name }} folgt niemandem - + {{ userName() }} folgt niemandem - + - - - Wer folgt {{ user.name | truncate(15) }}? - + + Wer folgt {{ userName(15) }}? - + - + - + - und {{ user.followedByCount - user.followedBy.length }} weitere - + >und {{ user.followedByCount - user.followedBy.length }} weitere - - niemand folgt {{ user.name }} - + niemand folgt {{ userName() }} - + @@ -219,10 +124,7 @@ - + @@ -232,10 +134,7 @@ - + @@ -245,10 +144,7 @@ - + @@ -273,25 +169,16 @@ :key="post.id" :width="{ base: '100%', md: '100%', xl: '50%' }" > - + - + - + @@ -395,6 +282,14 @@ export default { }, fetchPolicy: 'cache-and-network' }) + }, + userName(maxLength) { + // Return Anonymous if no Username is given + if (!this.user.name) { + return this.$t('profile.userAnonym') + } + // Return full Username or truncated Username + return maxLength ? this.user.name.substring(0, maxLength) : this.user.name } }, apollo: { diff --git a/webapp/pages/settings/index.vue b/webapp/pages/settings/index.vue index 5ff7c171e..3acaf9c4c 100644 --- a/webapp/pages/settings/index.vue +++ b/webapp/pages/settings/index.vue @@ -9,7 +9,7 @@ model="name" icon="user" :label="$t('settings.data.labelName')" - :placeholder="$t('settings.data.labelName')" + :placeholder="$t('settings.data.namePlaceholder')" />
PROFILE IMAGE
- {{ user.name }} folgt niemandem -
{{ userName() }} folgt niemandem
- niemand folgt {{ user.name }} -
niemand folgt {{ userName() }}