Add logo and sitename to the side drawer area

This commit is contained in:
taehoon 2019-02-03 14:47:02 -05:00
parent 3cd1deb133
commit 537631002b
2 changed files with 29 additions and 2 deletions

View file

@ -26,6 +26,12 @@ const SideDrawer = {
}, },
suggestionsEnabled () { suggestionsEnabled () {
return this.$store.state.instance.suggestionsEnabled return this.$store.state.instance.suggestionsEnabled
},
logo () {
return this.$store.state.instance.logo
},
sitename () {
return this.$store.state.instance.name
} }
}, },
methods: { methods: {

View file

@ -8,8 +8,11 @@
@touchmove="touchMove" @touchmove="touchMove"
> >
<div class="side-drawer-heading" @click="toggleDrawer"> <div class="side-drawer-heading" @click="toggleDrawer">
<user-card-content :user="currentUser" :switcher="false" :hideBio="true" v-if="currentUser"> <div class="side-drawer__logo-wrapper">
</user-card-content> <img :src="logo"/>
<span>{{sitename}}</span>
</div>
<user-card-content :user="currentUser" :switcher="false" :hideBio="true" v-if="currentUser"/>
</div> </div>
<ul> <ul>
<li v-if="currentUser" @click="toggleDrawer"> <li v-if="currentUser" @click="toggleDrawer">
@ -139,6 +142,24 @@
box-shadow: var(--panelShadow); box-shadow: var(--panelShadow);
background-color: $fallback--bg; background-color: $fallback--bg;
background-color: var(--bg, $fallback--bg); background-color: var(--bg, $fallback--bg);
&__logo-wrapper {
display: flex;
align-items: center;
padding: 0.85em;
img {
flex: none;
height: 50px;
margin-right: 0.85em;
}
span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
} }
.side-drawer-click-outside-closed { .side-drawer-click-outside-closed {