From 714bcf28d5158dead53feb7365fbbd9607421744 Mon Sep 17 00:00:00 2001 From: fuyu <54523771+mfmfuyu@users.noreply.github.com> Date: Sun, 16 Feb 2020 20:20:02 +0900 Subject: テーマの切り替え時に時計の色が変わるように (#5959) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * テーマの切り替え時に時計の色が変わるように * ディレイを追加 --- src/client/components/analog-clock.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/components/analog-clock.vue b/src/client/components/analog-clock.vue index b8fb4cf7be..b689266780 100644 --- a/src/client/components/analog-clock.vue +++ b/src/client/components/analog-clock.vue @@ -55,15 +55,17 @@ export default Vue.extend({ handsTailLength: 0.7, hHandLengthRatio: 0.75, mHandLengthRatio: 1, - sHandLengthRatio: 1 + sHandLengthRatio: 1, + + computedStyle: getComputedStyle(document.documentElement) }; }, computed: { dark(): boolean { - return tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--bg')).isDark(); + return tinycolor(this.computedStyle.getPropertyValue('--bg')).isDark(); }, - + majorGraduationColor(): string { return this.dark ? 'rgba(255, 255, 255, 0.3)' : 'rgba(0, 0, 0, 0.3)'; }, @@ -75,10 +77,10 @@ export default Vue.extend({ return this.dark ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.3)'; }, mHandColor(): string { - return tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--fg')).toHexString(); + return tinycolor(this.computedStyle.getPropertyValue('--fg')).toHexString(); }, hHandColor(): string { - return tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--accent')).toHexString(); + return tinycolor(this.computedStyle.getPropertyValue('--accent')).toHexString(); }, ms(): number { @@ -123,6 +125,16 @@ export default Vue.extend({ } }; update(); + + this.$store.subscribe((mutation, state) => { + if (mutation.type !== 'device/set') return; + + if (mutation?.payload?.key !== 'theme') return; + + setTimeout(() => { + this.computedStyle = getComputedStyle(document.documentElement); + }, 250); + }); }, beforeDestroy() { -- cgit v1.2.3-freya From 237f366aa28238e50ec7af2d04fe38ae6fa90d36 Mon Sep 17 00:00:00 2001 From: okpierre <1679025+okpierre@users.noreply.github.com> Date: Sun, 16 Feb 2020 06:21:05 -0500 Subject: Update notification (#5956) * Add icon for messaging This will add icon within messaging * Update messaging-room.message.vue Link to missing icon * Update notification.vue fix renote icon in notification https://github.com/syuilo/misskey/issues/5955 --- src/client/components/notification.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/components/notification.vue b/src/client/components/notification.vue index 50aff29dd7..7572b75fe9 100644 --- a/src/client/components/notification.vue +++ b/src/client/components/notification.vue @@ -169,7 +169,7 @@ export default Vue.extend({ background: #36aed2; } - &.retweet { + &.renote { padding: 3px; background: #36d298; } -- cgit v1.2.3-freya