mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Renamed 'AvatarUploader' property from 'user' to 'profile'
- Rename several CSS.
This commit is contained in:
parent
ac0aacf776
commit
a9c52bfcae
@ -26,7 +26,7 @@ describe('AvatarUploader', () => {
|
||||
}
|
||||
|
||||
const propsData = {
|
||||
user: {
|
||||
profile: {
|
||||
avatar: { url: '/api/generic.jpg' },
|
||||
},
|
||||
}
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
>
|
||||
<div class="dz-message" @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<slot></slot>
|
||||
<div class="hc-attachments-upload-area">
|
||||
<div class="hc-drag-marker">
|
||||
<div class="avatar-attachments-upload-area">
|
||||
<div class="avatar-drag-marker">
|
||||
<base-icon v-if="hover" name="image" />
|
||||
</div>
|
||||
</div>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,6 +100,9 @@
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"avatar": {
|
||||
"submitted": null
|
||||
},
|
||||
"follow": "Volgen",
|
||||
"followers": "Volgelingen",
|
||||
"following": "Volgt",
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,6 +449,9 @@
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"avatar": {
|
||||
"submitted": "Успешная загрузка!"
|
||||
},
|
||||
"commented": "Прокомментированные",
|
||||
"follow": "Подписаться",
|
||||
"followers": "Подписчики",
|
||||
@ -729,10 +732,5 @@
|
||||
"newTermsAndConditions": "Новые условия и положения",
|
||||
"termsAndConditionsNewConfirm": "Я прочитал(а) и согласен(на) с новыми условиями.",
|
||||
"termsAndConditionsNewConfirmText": "Пожалуйста, ознакомьтесь с новыми условиями использования!"
|
||||
},
|
||||
"user": {
|
||||
"avatar": {
|
||||
"submitted": "Успешная загрузка!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
:class="{ 'disabled-content': group.disabled }"
|
||||
style="position: relative; height: auto; overflow: visible"
|
||||
>
|
||||
<!-- Wolle: <avatar-uploader v-if="isMyGroup" :user="user"> -->
|
||||
<avatar-uploader v-if="isMyGroup" :user="group">
|
||||
<avatar-uploader v-if="isMyGroup" :profile="group">
|
||||
<!-- Wolle: <user-avatar :user="user" class="profile-avatar" size="large"></user-avatar> -->
|
||||
</avatar-uploader>
|
||||
<!-- Wolle: <user-avatar v-else :user="user" class="profile-avatar" size="large" /> -->
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
:class="{ 'disabled-content': user.disabled }"
|
||||
style="position: relative; height: auto; overflow: visible"
|
||||
>
|
||||
<avatar-uploader v-if="myProfile" :user="user">
|
||||
<avatar-uploader v-if="myProfile" :profile="user">
|
||||
<user-avatar :user="user" class="profile-avatar" size="large"></user-avatar>
|
||||
</avatar-uploader>
|
||||
<user-avatar v-else :user="user" class="profile-avatar" size="large" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user