* Fix: Firefoxで自分のメニューが開けないなど * 自分のユーザーメニューにはミュートなどを表示しないようになど
This commit is contained in:
parent
342e48ed77
commit
b128b593c2
2 changed files with 18 additions and 26 deletions
|
@ -7,7 +7,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../../../i18n';
|
import i18n from '../../../i18n';
|
||||||
import copyToClipboard from '../../../common/scripts/copy-to-clipboard';
|
|
||||||
import { faExclamationCircle, faMicrophoneSlash } from '@fortawesome/free-solid-svg-icons';
|
import { faExclamationCircle, faMicrophoneSlash } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faSnowflake } from '@fortawesome/free-regular-svg-icons';
|
import { faSnowflake } from '@fortawesome/free-regular-svg-icons';
|
||||||
|
|
||||||
|
@ -27,7 +26,10 @@ export default Vue.extend({
|
||||||
icon: ['fas', 'list'],
|
icon: ['fas', 'list'],
|
||||||
text: this.$t('push-to-list'),
|
text: this.$t('push-to-list'),
|
||||||
action: this.pushList
|
action: this.pushList
|
||||||
}, null, {
|
}] as any;
|
||||||
|
|
||||||
|
if (this.$store.getters.isSignedIn && this.$store.state.i.id != this.user.id) {
|
||||||
|
menu = menu.concat([null, {
|
||||||
icon: this.user.isMuted ? ['fas', 'eye'] : ['far', 'eye-slash'],
|
icon: this.user.isMuted ? ['fas', 'eye'] : ['far', 'eye-slash'],
|
||||||
text: this.user.isMuted ? this.$t('unmute') : this.$t('mute'),
|
text: this.user.isMuted ? this.$t('unmute') : this.$t('mute'),
|
||||||
action: this.toggleMute
|
action: this.toggleMute
|
||||||
|
@ -39,7 +41,8 @@ export default Vue.extend({
|
||||||
icon: faExclamationCircle,
|
icon: faExclamationCircle,
|
||||||
text: this.$t('report-abuse'),
|
text: this.$t('report-abuse'),
|
||||||
action: this.reportAbuse
|
action: this.reportAbuse
|
||||||
}];
|
}]);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.$store.getters.isSignedIn && (this.$store.state.i.isAdmin || this.$store.state.i.isModerator)) {
|
if (this.$store.getters.isSignedIn && (this.$store.state.i.isAdmin || this.$store.state.i.isModerator)) {
|
||||||
menu = menu.concat([null, {
|
menu = menu.concat([null, {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="header" :class="{ shadow: $store.state.device.useShadow, round: $store.state.device.roundedCorners }">
|
<div class="header" :class="{ shadow: $store.state.device.useShadow, round: $store.state.device.roundedCorners }">
|
||||||
<div class="banner-container" :style="style">
|
<div class="banner-container" :style="style">
|
||||||
<div class="banner" ref="banner" :style="style" @click="onBannerClick"></div>
|
<div class="banner" ref="banner" :style="style"></div>
|
||||||
<div class="fade"></div>
|
<div class="fade"></div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<p class="name">
|
<p class="name">
|
||||||
|
@ -105,14 +105,6 @@ export default Vue.extend({
|
||||||
if (blur <= 10) banner.style.filter = `blur(${blur}px)`;
|
if (blur <= 10) banner.style.filter = `blur(${blur}px)`;
|
||||||
},
|
},
|
||||||
|
|
||||||
onBannerClick() {
|
|
||||||
if (!this.$store.getters.isSignedIn || this.$store.state.i.id != this.user.id) return;
|
|
||||||
|
|
||||||
this.$updateBanner().then(i => {
|
|
||||||
this.user.bannerUrl = i.bannerUrl;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
this.$root.new(XUserMenu, {
|
this.$root.new(XUserMenu, {
|
||||||
source: this.$refs.menu,
|
source: this.$refs.menu,
|
||||||
|
@ -171,9 +163,6 @@ export default Vue.extend({
|
||||||
|
|
||||||
> .menu
|
> .menu
|
||||||
height 100%
|
height 100%
|
||||||
display block
|
|
||||||
position absolute
|
|
||||||
left -42px
|
|
||||||
padding 0 14px
|
padding 0 14px
|
||||||
color #fff
|
color #fff
|
||||||
text-shadow 0 0 8px #000
|
text-shadow 0 0 8px #000
|
||||||
|
|
Loading…
Reference in a new issue