diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-08 22:03:06 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-08 22:03:06 +0900 |
| commit | 748a451e233f71dd493f7dd80062278dacaa5e1c (patch) | |
| tree | 7a91b9123f63dcf468f460c3068ae3dbe6210d01 /src/client/ui/_common_ | |
| parent | fix(api): (0 , ms_1.default) is not a function (diff) | |
| download | misskey-748a451e233f71dd493f7dd80062278dacaa5e1c.tar.gz misskey-748a451e233f71dd493f7dd80062278dacaa5e1c.tar.bz2 misskey-748a451e233f71dd493f7dd80062278dacaa5e1c.zip | |
:art:
Diffstat (limited to 'src/client/ui/_common_')
| -rw-r--r-- | src/client/ui/_common_/header.vue | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue index f21be2f9cd..5405c43f8c 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/ui/_common_/header.vue @@ -1,10 +1,5 @@ <template> -<div class="fdidabkb" :class="{ slim: titleOnly || narrow }" :style="`--height:${height};`" :key="key"> - <transition :name="$store.state.animation ? 'header' : ''" mode="out-in" appear> - <div class="buttons left" v-if="backButton"> - <button class="_button button back" @click.stop="$emit('back')" @touchstart="preventDrag" v-tooltip="$ts.goBack"><i class="fas fa-chevron-left"></i></button> - </div> - </transition> +<div class="fdidabkb" :class="{ slim: narrow, thin }" :key="key"> <template v-if="info"> <div class="titleContainer" @click="showTabsPopup"> <i v-if="info.icon" class="icon" :class="info.icon"></i> @@ -34,7 +29,6 @@ <button v-for="action in info.actions" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" @touchstart="preventDrag" v-tooltip="action.text"><i :class="action.icon"></i></button> </template> <button v-if="shouldShowMenu" class="_button button" @click.stop="showMenu" @touchstart="preventDrag" v-tooltip="$ts.menu"><i class="fas fa-ellipsis-h"></i></button> - <button v-if="closeButton" class="_button button" @click.stop="$emit('close')" @touchstart="preventDrag" v-tooltip="$ts.close"><i class="fas fa-times"></i></button> </div> </div> </template> @@ -52,20 +46,9 @@ export default defineComponent({ menu: { required: false }, - backButton: { - type: Boolean, - required: false, - default: false, - }, - closeButton: { - type: Boolean, + thin: { required: false, - default: false, - }, - titleOnly: { - type: Boolean, - required: false, - default: false, + default: false }, }, @@ -99,11 +82,9 @@ export default defineComponent({ }, mounted() { - this.height = this.$el.parentElement.offsetHeight + 'px'; - this.narrow = this.titleOnly || this.$el.parentElement.offsetWidth < 500; + this.narrow = this.$el.offsetWidth < 500; new ResizeObserver((entries, observer) => { - this.height = this.$el.parentElement.offsetHeight + 'px'; - this.narrow = this.titleOnly || this.$el.parentElement.offsetWidth < 500; + this.narrow = this.$el.offsetWidth < 500; }).observe(this.$el); }, @@ -161,8 +142,13 @@ export default defineComponent({ <style lang="scss" scoped> .fdidabkb { + --height: 60px; display: flex; + &.thin { + --height: 50px; + } + &.slim { text-align: center; @@ -220,6 +206,7 @@ export default defineComponent({ text-align: left; font-weight: bold; flex-shrink: 0; + margin-left: 24px; > .avatar { $size: 32px; |