update_chat
adb 4 years ago
parent a953f9c68e
commit 3516754139

@ -11,8 +11,11 @@
</div> </div>
<h2 v-if="getMembers().length !== 0">members:</h2> <h2 v-if="getMembers().length !== 0">members:</h2>
<div v-for="member in getMembers().slice(0,20)" :key="member" class="contentBox" :title="member"> <div v-for="member in getMembers().slice(0,20)" :key="member" class="contentBox" :title="member">
<userThumbnail :mxcURL="getUser(member).avatarUrl" :fallback="getUser(member).displayName" <userThumbnail
class="userThumbnail" :size="3"/> :mxcURL="getUser(member).avatarUrl"
:fallback="getUser(member).displayName"
class="userThumbnail" :size="3"
/>
<div class="information"> <div class="information">
<div class="userName">{{getUser(member).displayName || member}}</div> <div class="userName">{{getUser(member).displayName || member}}</div>
<div class="status">{{getStatus(getUser(member))}}</div> <div class="status">{{getStatus(getUser(member))}}</div>

@ -1,10 +1,23 @@
<template> <template>
<form class="newMessageBanner" ref="newMessageBanner" v-on:submit.prevent="sendMessage()"> <form class="newMessageBanner" ref="newMessageBanner" v-on:submit.prevent="sendMessage()">
<label for="newMessageInput"></label> <label for="newMessageInput"></label>
<textarea @keyup.enter.exact="sendMessage()" @input="resizeMessageBanner()" ref="newMessageInput" id="newMessageInput" class="newMessageInput" <textarea
autocomplete="off" rows="1" placeholder="type a message ..." v-model="msg.content.body" /> @keyup.enter.exact="sendMessage()"
<icon type="submit" title="press enter to submit" class="sendMessageBtn" @input="resizeMessageBanner()"
ic="./sym/ic_send_white_24px.svg" /> v-model="msg.content.body"
ref="newMessageInput"
id="newMessageInput"
class="newMessageInput"
autocomplete="off"
rows="1"
placeholder="type a message ..."
/>
<icon
type="submit"
title="press enter to submit"
class="sendMessageBtn"
ic="./sym/ic_send_white_24px.svg"
/>
</form> </form>
</template> </template>

@ -39,7 +39,6 @@ export default {
getUrl(){ getUrl(){
let avatarState = this.room.getLiveTimeline().getState(sdk.EventTimeline.FORWARDS).getStateEvents("m.room.avatar"); let avatarState = this.room.getLiveTimeline().getState(sdk.EventTimeline.FORWARDS).getStateEvents("m.room.avatar");
return avatarState.length>0?avatarState[avatarState.length-1].getContent().url:undefined; return avatarState.length>0?avatarState[avatarState.length-1].getContent().url:undefined;
//return this.room.getLiveTimeline().getStateEvents("m.room.avatar");
} }
} }
} }

@ -1,6 +1,6 @@
<template> <template>
<img v-if="mxcURL" :src="thumbnailUrl()" class="image"/> <img v-if="mxcURL" :src="thumbnailUrl()" class="userThumbnail image"/>
<Identicon v-else :value="fallback" :theme="'jdenticon'" :size="this.getFontSize()*this.size" class="identicon"/> <Identicon v-else :value="fallback" :theme="'jdenticon'" :size="this.getFontSize()*this.size" class="userThumbnail identicon"/>
</template> </template>
<script> <script>
@ -41,10 +41,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.userThumbnail{ .userThumbnail{
border-radius: 1.5rem; border-radius: 50%;
.image{ background-color: unset;
border-radius: 10rem;
background-color: unset;
}
} }
</style> </style>

@ -64,7 +64,6 @@ export default {
getUrl(room){ getUrl(room){
let avatarState = room.getLiveTimeline().getState(sdk.EventTimeline.FORWARDS).getStateEvents("m.room.avatar"); let avatarState = room.getLiveTimeline().getState(sdk.EventTimeline.FORWARDS).getStateEvents("m.room.avatar");
return avatarState.length>0?avatarState[avatarState.length-1].getContent().url:undefined; return avatarState.length>0?avatarState[avatarState.length-1].getContent().url:undefined;
//return this.room.getLiveTimeline().getStateEvents("m.room.avatar");
} }
}, },
data(){ data(){

Loading…
Cancel
Save