Merge branch 'develop' of github.com:sim1222/misskey into develop
This commit is contained in:
commit
7d1f3cd1e8
@ -1,16 +1,26 @@
|
||||
<template>
|
||||
<div ref="el" class="fdidabkb" :class="{ slim: narrow, thin: thin_ }" :style="{ background: bg }" @click="onClick">
|
||||
<div
|
||||
ref="el"
|
||||
class="fdidabkb"
|
||||
:class="{ slim: narrow, thin: thin_ }"
|
||||
:style="{ background: bg }"
|
||||
@click="onClick"
|
||||
>
|
||||
<template v-if="info">
|
||||
<div v-if="!hideTitle" class="titleContainer" @click="showTabsPopup">
|
||||
<MkAvatar v-if="info.avatar" class="avatar" :user="info.avatar" :disable-preview="true" :show-indicator="true"/>
|
||||
<MkAvatar
|
||||
v-if="info.avatar"
|
||||
class="avatar"
|
||||
:user="info.avatar"
|
||||
:disable-preview="true"
|
||||
:show-indicator="true"
|
||||
/>
|
||||
<i v-else-if="info.icon" class="icon" :class="info.icon"></i>
|
||||
|
||||
<div class="title">
|
||||
<MkUserName v-if="info.userName" :user="info.userName" :nowrap="true" class="title"/>
|
||||
<MkUserName v-if="info.userName" :user="info.userName" :nowrap="true" class="title" />
|
||||
<div v-else-if="info.title" class="title">{{ info.title }}</div>
|
||||
<div v-if="!narrow && info.subtitle" class="subtitle">
|
||||
{{ info.subtitle }}
|
||||
</div>
|
||||
<div v-if="!narrow && info.subtitle" class="subtitle">{{ info.subtitle }}</div>
|
||||
<div v-if="narrow && hasTabs" class="subtitle activeTab">
|
||||
{{ info.tabs.find(tab => tab.active)?.title }}
|
||||
<i class="chevron fas fa-chevron-down"></i>
|
||||
@ -18,22 +28,51 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!narrow || hideTitle" class="tabs">
|
||||
<button v-for="tab in info.tabs" v-tooltip="tab.title" class="tab _button" :class="{ active: tab.active }" @click="tab.onClick">
|
||||
<button
|
||||
v-for="tab in info.tabs"
|
||||
v-tooltip="tab.title"
|
||||
class="tab _button"
|
||||
:class="{ active: tab.active }"
|
||||
@click="tab.onClick"
|
||||
>
|
||||
<i v-if="tab.icon" class="icon" :class="tab.icon"></i>
|
||||
<span v-if="!tab.iconOnly" class="title">{{ tab.title }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="buttons right">
|
||||
<button class="_button button" onclick="location.reload();">
|
||||
<i class="fa-solid fa-arrow-rotate-right"></i>
|
||||
</button>
|
||||
<template v-if="info && info.actions && !narrow">
|
||||
<template v-for="action in info.actions">
|
||||
<MkButton v-if="action.asFullButton" class="fullButton" primary @click.stop="action.handler"><i :class="action.icon" style="margin-right: 6px;"></i>{{ action.text }}</MkButton>
|
||||
<button v-else v-tooltip="action.text" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" @touchstart="preventDrag"><i :class="action.icon"></i></button>
|
||||
<MkButton v-if="action.asFullButton" class="fullButton" primary @click.stop="action.handler">
|
||||
<i :class="action.icon" style="margin-right: 6px;"></i>
|
||||
{{ action.text }}
|
||||
</MkButton>
|
||||
<button
|
||||
v-else
|
||||
v-tooltip="action.text"
|
||||
class="_button button"
|
||||
:class="{ highlighted: action.highlighted }"
|
||||
@click.stop="action.handler"
|
||||
@touchstart="preventDrag"
|
||||
>
|
||||
<i :class="action.icon"></i>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
<button v-if="shouldShowMenu" v-tooltip="$ts.menu" class="_button button" @click.stop="showMenu" @touchstart="preventDrag"><i class="fas fa-ellipsis-h"></i></button>
|
||||
<button
|
||||
v-if="shouldShowMenu"
|
||||
v-tooltip="$ts.menu"
|
||||
class="_button button"
|
||||
@click.stop="showMenu"
|
||||
@touchstart="preventDrag"
|
||||
>
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
Loading…
x
Reference in New Issue
Block a user