diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-09-22 21:58:08 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-09-22 21:58:08 +0900 |
| commit | 76c5dc8999efaa3c3e72793573801fc99df007d3 (patch) | |
| tree | 47fe1a502d98efba4ed069096157fdc55c19beb8 /src | |
| parent | update deps (diff) | |
| download | sharkey-76c5dc8999efaa3c3e72793573801fc99df007d3.tar.gz sharkey-76c5dc8999efaa3c3e72793573801fc99df007d3.tar.bz2 sharkey-76c5dc8999efaa3c3e72793573801fc99df007d3.zip | |
fix(client): fix #7774
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/ui/_common_/header.vue | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue index eb8a1b9c0a..1e0db9a3a1 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/ui/_common_/header.vue @@ -28,14 +28,14 @@ <span v-if="!tab.iconOnly" class="title">{{ tab.title }}</span> </button> </div> - <div class="buttons right"> - <template v-if="info.actions && !narrow"> - <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> </template> + <div class="buttons right"> + <template v-if="info && info.actions && !narrow"> + <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> @@ -83,6 +83,7 @@ export default defineComponent({ }, shouldShowMenu() { + if (this.info == null) return false; if (this.info.actions != null && this.narrow) return true; if (this.info.menu != null) return true; if (this.info.share != null) return true; |