Some work on issue #43
This commit is contained in:
parent
d645a129ef
commit
e71f833134
3 changed files with 111 additions and 13 deletions
|
|
@ -3,6 +3,27 @@
|
||||||
$admin-bg: black;
|
$admin-bg: black;
|
||||||
$admin-fg: white;
|
$admin-fg: white;
|
||||||
|
|
||||||
|
.home {
|
||||||
|
.v-card {
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25) !important;
|
||||||
|
border-radius: 18px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
.v-item-group > div:not(:last-of-type):after {
|
||||||
|
/* divider */
|
||||||
|
position: absolute;
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
bottom: 0px;
|
||||||
|
height: 1px;
|
||||||
|
left: 0px;
|
||||||
|
right: 0px;
|
||||||
|
min-height: 1px;
|
||||||
|
background-color: #e1e1e1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chat-header {
|
.chat-header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
@ -975,6 +996,10 @@ $admin-fg: white;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar-22 {
|
||||||
|
font-size: 14 * $chat-text-size !important;
|
||||||
|
}
|
||||||
|
|
||||||
.avatar-32 {
|
.avatar-32 {
|
||||||
font-size: 18 * $chat-text-size !important;
|
font-size: 18 * $chat-text-size !important;
|
||||||
}
|
}
|
||||||
|
|
@ -984,7 +1009,8 @@ $admin-fg: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-32.clickable,
|
.avatar-32.clickable,
|
||||||
.avatar-48.clickable {
|
.avatar-48.clickable,
|
||||||
|
.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="pa-4">
|
<div class="home">
|
||||||
<RoomList showInvites showCreate :title="$t('room.room_list_rooms')" :invitesTitle="$t('room.room_list_invites')" v-on:newroom="createRoom" />
|
<YouAre class="mt-4" v-if="!loading" />
|
||||||
<v-btn block depressed class="outlined-button" @click.stop="logout">{{$t('menu.logout')}}</v-btn>
|
<v-card class="members ma-3" flat>
|
||||||
|
<v-card-title class="h2">{{ $t("room.room_list_rooms") }}</v-card-title>
|
||||||
|
<v-card-text class="pa-0">
|
||||||
|
<RoomList
|
||||||
|
showInvites
|
||||||
|
showCreate
|
||||||
|
title=""
|
||||||
|
:invitesTitle="$t('room.room_list_invites')"
|
||||||
|
v-on:newroom="createRoom"
|
||||||
|
/>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
<!-- Loading indicator -->
|
<!-- Loading indicator -->
|
||||||
<v-container
|
<v-container
|
||||||
|
|
@ -23,16 +34,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import RoomList from '../components/RoomList';
|
import RoomList from "../components/RoomList";
|
||||||
|
import YouAre from "../components/YouAre.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
RoomList
|
RoomList,
|
||||||
|
YouAre,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
loading() {
|
loading() {
|
||||||
return !this.$matrix.ready;
|
return !this.$matrix.ready;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout() {
|
logout() {
|
||||||
|
|
@ -40,13 +53,13 @@ export default {
|
||||||
this.$store.dispatch("logout");
|
this.$store.dispatch("logout");
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$navigation.push({ path: "/login" }, -1);
|
this.$navigation.push({ path: "/login" }, -1);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
createRoom() {
|
createRoom() {
|
||||||
this.$navigation.push({ name: "CreateRoom" });
|
this.$navigation.push({ name: "CreateRoom" });
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
59
src/components/YouAre.vue
Normal file
59
src/components/YouAre.vue
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
<template>
|
||||||
|
<div class="d-flex flex-row-reverse">
|
||||||
|
<v-chip
|
||||||
|
@click="viewProfile"
|
||||||
|
class="ma-2"
|
||||||
|
:color="dark ? 'black' : '#ededed'"
|
||||||
|
:text-color="dark ? 'white' : 'black'"
|
||||||
|
:outlined="!dark"
|
||||||
|
style="white-space: pre"
|
||||||
|
>{{ $t("profile_info_popup.you_are") }}
|
||||||
|
<span v-if="$matrix.currentUser.is_guest">
|
||||||
|
<i18n path="profile_info_popup.identity_temporary" tag="span">
|
||||||
|
<template v-slot:displayName>
|
||||||
|
<b>{{ displayName }}</b>
|
||||||
|
</template>
|
||||||
|
</i18n>
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
<i18n path="profile_info_popup.identity" tag="span">
|
||||||
|
<template v-slot:displayName>
|
||||||
|
<b>{{ displayName }}</b>
|
||||||
|
</template>
|
||||||
|
</i18n>
|
||||||
|
</span>
|
||||||
|
<v-avatar color="#e0e0e0" right @click.stop="showProfileInfo = true">
|
||||||
|
<img v-if="userAvatar" :src="userAvatar" />
|
||||||
|
<span v-else class="white--text">{{ userAvatarLetter }}</span>
|
||||||
|
</v-avatar>
|
||||||
|
</v-chip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import profileInfoMixin from "./profileInfoMixin";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "YouAre",
|
||||||
|
mixins: [profileInfoMixin],
|
||||||
|
props: {
|
||||||
|
dark: {
|
||||||
|
type: Boolean,
|
||||||
|
default: function () {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
viewProfile() {
|
||||||
|
this.$navigation.push({ name: "Profile" }, 1);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "@/assets/css/chat.scss";
|
||||||
|
</style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue