mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
fix(frontend): keep mobile timeline avatar visible
This commit is contained in:
parent
c0a8c7f93a
commit
3ebbe29cc2
1 changed files with 3 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template>
|
||||
<div v-if="show" ref="el" :class="[$style.root]">
|
||||
<div :class="[$style.upper, { [$style.slim]: narrow, [$style.thin]: thin_ }]">
|
||||
<div v-if="!thin_ && narrow && props.displayMyAvatar && $i" class="_button" @click="openAccountMenu">
|
||||
<div v-if="shouldDisplayMyAvatar" class="_button" @click="openAccountMenu">
|
||||
<MkAvatar :class="$style.avatar" :user="$i"/>
|
||||
</div>
|
||||
<div v-else-if="!thin_ && narrow && !hideTitle" :class="$style.buttons"></div>
|
||||
|
|
@ -64,6 +64,7 @@ import XTabs from './MkPageHeader.tabs.vue';
|
|||
import { getAccountMenu } from '@/accounts.js';
|
||||
import { $i } from '@/i.js';
|
||||
import { DI } from '@/di.js';
|
||||
import { deviceKind } from '@/utility/device-kind.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const props = withDefaults(defineProps<PageHeaderProps>(), {
|
||||
|
|
@ -80,6 +81,7 @@ const pageMetadata = computed(() => props.overridePageMetadata ?? injectedPageMe
|
|||
|
||||
const hideTitle = computed(() => inject('shouldOmitHeaderTitle', false) || props.hideTitle || (props.canOmitTitle && props.tabs.length > 0));
|
||||
const thin_ = props.thin || inject('shouldHeaderThin', false);
|
||||
const shouldDisplayMyAvatar = computed(() => !thin_ && props.displayMyAvatar && $i && (narrow.value || deviceKind === 'smartphone'));
|
||||
|
||||
const el = useTemplateRef('el');
|
||||
const narrow = ref(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue