compact user panel
This commit is contained in:
parent
f304fed1e9
commit
862a5a86e7
5 changed files with 32 additions and 1 deletions
|
@ -26,6 +26,11 @@
|
|||
{{ $t('settings.compact_nav_panel') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path="compactUserPanel">
|
||||
{{ $t('settings.compact_user_panel') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
|
|
|
@ -6,6 +6,9 @@ import { mapState } from 'vuex'
|
|||
const UserPanel = {
|
||||
computed: {
|
||||
signedIn () { return this.user },
|
||||
compactUserPanel () {
|
||||
return this.$store.getters.mergedConfig.compactUserPanel || false
|
||||
},
|
||||
...mapState({ user: state => state.users.currentUser })
|
||||
},
|
||||
components: {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<div class="user-panel">
|
||||
<div
|
||||
class="user-panel"
|
||||
:class="{ compact: compactUserPanel }"
|
||||
>
|
||||
<div
|
||||
v-if="signedIn"
|
||||
key="user-panel"
|
||||
|
@ -25,4 +28,22 @@
|
|||
.user-panel .signed-in {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.user-panel.compact {
|
||||
.background-image {
|
||||
mask: unset; -webkit-mask: unset;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.user-info .Avatar { width: 24px; height: 24px; }
|
||||
|
||||
.user-summary { margin-left: 1em; font-weight: bold; }
|
||||
|
||||
.user-info .container { padding-top: 6px; padding-bottom: 0; }
|
||||
|
||||
.bottom-line { display: none; }
|
||||
|
||||
.form-group .visibility-notice { margin: 0; }
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -338,6 +338,7 @@
|
|||
"hide_isp": "Hide instance-specific panel",
|
||||
"show_third_column": "Move Notifications to a seperate column",
|
||||
"compact_nav_panel": "Compact navigation panel",
|
||||
"compact_user_panel": "Compact user panel",
|
||||
"hide_wallpaper": "Hide instance wallpaper",
|
||||
"preload_images": "Preload images",
|
||||
"use_one_click_nsfw": "Open NSFW attachments with just one click",
|
||||
|
|
|
@ -20,6 +20,7 @@ export const defaultState = {
|
|||
customTheme: undefined,
|
||||
showThirdColumn: false,
|
||||
compactNavPanel: false,
|
||||
compactUserPanel: false,
|
||||
customThemeSource: undefined,
|
||||
hideISP: false,
|
||||
hideInstanceWallpaper: false,
|
||||
|
|
Loading…
Reference in a new issue