added option to disable aspect ratio for profiles
This commit is contained in:
parent
4280ce709f
commit
4dc9bdf54d
9 changed files with 32 additions and 4 deletions
|
|
@ -263,6 +263,11 @@
|
||||||
{{ $t('settings.hide_wallpaper') }}
|
{{ $t('settings.hide_wallpaper') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="compactProfiles">
|
||||||
|
{{ $t('settings.compact_profiles') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,12 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
// Disable forced 3:1 aspect ratio
|
||||||
|
compact: {
|
||||||
|
required: false,
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
DialogModal,
|
DialogModal,
|
||||||
|
|
|
||||||
|
|
@ -165,12 +165,15 @@
|
||||||
|
|
||||||
.user-identity {
|
.user-identity {
|
||||||
position: relative;
|
position: relative;
|
||||||
aspect-ratio: 3;
|
|
||||||
min-height: 6em;
|
min-height: 6em;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
container: user-card / inline-size;
|
container: user-card / inline-size;
|
||||||
|
|
||||||
|
&:not(.-compact) {
|
||||||
|
aspect-ratio: 3;
|
||||||
|
}
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@
|
||||||
<div class="user-card">
|
<div class="user-card">
|
||||||
<div class="user-card-inner">
|
<div class="user-card-inner">
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<div class="user-identity">
|
<div
|
||||||
|
class="user-identity"
|
||||||
|
:class="{ '-compact': compact }"
|
||||||
|
>
|
||||||
<div class="header-overlay">
|
<div class="header-overlay">
|
||||||
<div class="banner-image">
|
<div class="banner-image">
|
||||||
<img
|
<img
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
<template #content="{close}">
|
<template #content="{close}">
|
||||||
<UserCard
|
<UserCard
|
||||||
class="user-popover"
|
class="user-popover"
|
||||||
|
:compact="true"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
:show-expand="true"
|
:show-expand="true"
|
||||||
:user-id="userId"
|
:user-id="userId"
|
||||||
|
|
@ -37,7 +38,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-identity {
|
.user-identity {
|
||||||
aspect-ratio: unset;
|
|
||||||
min-width: calc(min(30em, 98vw));
|
min-width: calc(min(30em, 98vw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import get from 'lodash/get'
|
import get from 'lodash/get'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
|
||||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||||
import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
||||||
|
|
@ -9,6 +10,7 @@ import List from '../list/list.vue'
|
||||||
import Timeline from '../timeline/timeline.vue'
|
import Timeline from '../timeline/timeline.vue'
|
||||||
import UserCard from '../user_card/user_card.vue'
|
import UserCard from '../user_card/user_card.vue'
|
||||||
|
|
||||||
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||||
|
|
||||||
|
|
@ -94,6 +96,9 @@ const UserProfile = {
|
||||||
!this.user.hide_favorites)
|
!this.user.hide_favorites)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
compactProfiles() {
|
||||||
|
return useMergedConfigStore().mergedConfig.compactProfiles
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setFooterRef(el) {
|
setFooterRef(el) {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
:user-id="userId"
|
:user-id="userId"
|
||||||
:switcher="true"
|
:switcher="true"
|
||||||
:selected="timeline.viewing"
|
:selected="timeline.viewing"
|
||||||
|
:compact="compactProfiles"
|
||||||
avatar-action="zoom"
|
avatar-action="zoom"
|
||||||
:has-note-editor="true"
|
:has-note-editor="true"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1141,7 +1141,8 @@
|
||||||
"hard_reset_value_tooltip": "Remove setting from storage, forcing use of default value",
|
"hard_reset_value_tooltip": "Remove setting from storage, forcing use of default value",
|
||||||
"cache": "Cache",
|
"cache": "Cache",
|
||||||
"clear_asset_cache": "Clear asset cache",
|
"clear_asset_cache": "Clear asset cache",
|
||||||
"clear_emoji_cache": "Clear emoji cache"
|
"clear_emoji_cache": "Clear emoji cache",
|
||||||
|
"compact_profiles": "Reduce profile height on user pages"
|
||||||
},
|
},
|
||||||
"admin_dash": {
|
"admin_dash": {
|
||||||
"window_title": "Administration",
|
"window_title": "Administration",
|
||||||
|
|
|
||||||
|
|
@ -542,6 +542,10 @@ export const INSTANCE_DEFAULT_CONFIG_DEFINITIONS = {
|
||||||
required: true,
|
required: true,
|
||||||
default: 'none',
|
default: 'none',
|
||||||
},
|
},
|
||||||
|
compactProfiles: {
|
||||||
|
description: 'Reduce profile height on user pages',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
export const INSTANCE_DEFAULT_CONFIG = convertDefinitions(
|
export const INSTANCE_DEFAULT_CONFIG = convertDefinitions(
|
||||||
INSTANCE_DEFAULT_CONFIG_DEFINITIONS,
|
INSTANCE_DEFAULT_CONFIG_DEFINITIONS,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue