Newer
Older
import parseAcct from '../../../../../acct/parse';
const applyBg = v =>
document.documentElement.style.setProperty('background', v ? '#191b22' : '#fff', 'important');
this.$nextTick(() => applyBg(this.$store.state.device.darkmode));
this.unwatchDarkmode = this.$store.watch(s => {
return s.device.darkmode;
}, applyBg);
beforeDestroy() {
document.documentElement.style.removeProperty('background');
this.unwatchDarkmode();
},
(this as any).api('users/show', parseAcct(this.$route.params.user)).then(user => {
document.title = `%i18n:@messaging%: ${Vue.filter('userName')(this.user)} | Misskey`;