keanu-weblite/src/components/YouAre.vue

58 lines
1.5 KiB
Vue
Raw Normal View History

2021-07-06 13:27:15 +02:00
<template>
2025-01-14 11:14:11 +00:00
<div>
2021-07-06 13:27:15 +02:00
<v-chip
@click="viewProfile"
class="ma-2 white-space-pre"
2025-05-08 14:35:17 +02:00
color="#ededed"
variant="outlined"
2025-05-08 14:54:26 +02:00
>
<template v-slot:default>
<span style="color:black">
{{ $t("profile_info_popup.you_are") }}&nbsp;
2021-07-06 13:27:15 +02:00
<span v-if="$matrix.currentUser.is_guest">
2025-05-06 09:27:53 +02:00
<i18n-t keypath="profile_info_popup.identity_temporary" tag="span">
2021-07-06 13:27:15 +02:00
<template v-slot:displayName>
<b>{{ displayName }}</b>
</template>
2025-05-06 09:27:53 +02:00
</i18n-t>
2021-07-06 13:27:15 +02:00
</span>
<span v-else>
2025-05-06 09:27:53 +02:00
<i18n-t keypath="profile_info_popup.identity" tag="span">
2021-07-06 13:27:15 +02:00
<template v-slot:displayName>
<b>{{ displayName }}</b>
</template>
2025-05-06 09:27:53 +02:00
</i18n-t>
2021-07-06 13:27:15 +02:00
</span>
2025-05-08 14:54:26 +02:00
</span>
</template>
2025-05-08 14:35:17 +02:00
<template v-slot:append>
<v-avatar color="#e0e0e0" end @click.stop="viewProfile">
<AuthedImage v-if="userAvatar" :src="userAvatar" />
<span v-else class="text-white">{{ userAvatarLetter }}</span>
</v-avatar>
</template>
2021-07-06 13:27:15 +02:00
</v-chip>
</div>
</template>
<script>
import profileInfoMixin from "./profileInfoMixin";
2025-03-31 16:33:54 +02:00
import AuthedImage from "./AuthedImage.vue";
2021-07-06 13:27:15 +02:00
export default {
name: "YouAre",
mixins: [profileInfoMixin],
2025-03-31 16:33:54 +02:00
components: { AuthedImage },
2021-07-06 13:27:15 +02:00
data() {
return {};
},
methods: {
viewProfile() {
this.$navigation.push({ name: "Profile" }, 1);
},
},
};
</script>
<style lang="scss">
@use "@/assets/css/chat.scss" as *;
</style>