summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-16 20:54:33 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-16 20:54:33 +0900
commit828c7b66a01f4f9299030da231dee28bbca54f44 (patch)
tree2978675da3b05f09ca950351bf34f572ed5a60d7 /src
parent2回目以降の読み込みは30個までフェッチするように (diff)
parentUpdate notification (#5956) (diff)
downloadsharkey-828c7b66a01f4f9299030da231dee28bbca54f44.tar.gz
sharkey-828c7b66a01f4f9299030da231dee28bbca54f44.tar.bz2
sharkey-828c7b66a01f4f9299030da231dee28bbca54f44.zip
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src')
-rw-r--r--src/client/components/analog-clock.vue22
-rw-r--r--src/client/components/notification.vue2
2 files changed, 18 insertions, 6 deletions
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() {
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;
}