mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
828c7b66a0
2 changed files with 18 additions and 6 deletions
|
@ -55,13 +55,15 @@ export default Vue.extend({
|
||||||
handsTailLength: 0.7,
|
handsTailLength: 0.7,
|
||||||
hHandLengthRatio: 0.75,
|
hHandLengthRatio: 0.75,
|
||||||
mHandLengthRatio: 1,
|
mHandLengthRatio: 1,
|
||||||
sHandLengthRatio: 1
|
sHandLengthRatio: 1,
|
||||||
|
|
||||||
|
computedStyle: getComputedStyle(document.documentElement)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
dark(): boolean {
|
dark(): boolean {
|
||||||
return tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--bg')).isDark();
|
return tinycolor(this.computedStyle.getPropertyValue('--bg')).isDark();
|
||||||
},
|
},
|
||||||
|
|
||||||
majorGraduationColor(): string {
|
majorGraduationColor(): string {
|
||||||
|
@ -75,10 +77,10 @@ export default Vue.extend({
|
||||||
return this.dark ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.3)';
|
return this.dark ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.3)';
|
||||||
},
|
},
|
||||||
mHandColor(): string {
|
mHandColor(): string {
|
||||||
return tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--fg')).toHexString();
|
return tinycolor(this.computedStyle.getPropertyValue('--fg')).toHexString();
|
||||||
},
|
},
|
||||||
hHandColor(): string {
|
hHandColor(): string {
|
||||||
return tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--accent')).toHexString();
|
return tinycolor(this.computedStyle.getPropertyValue('--accent')).toHexString();
|
||||||
},
|
},
|
||||||
|
|
||||||
ms(): number {
|
ms(): number {
|
||||||
|
@ -123,6 +125,16 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
update();
|
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() {
|
beforeDestroy() {
|
||||||
|
|
|
@ -169,7 +169,7 @@ export default Vue.extend({
|
||||||
background: #36aed2;
|
background: #36aed2;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.retweet {
|
&.renote {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
background: #36d298;
|
background: #36d298;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue