CWが適用されない箇所を修正

This commit is contained in:
syuilo
2018-09-13 17:44:36 +09:00
parent 44099c551c
commit 700f8c9bb4
11 changed files with 355 additions and 122 deletions

View File

@ -1,10 +1,16 @@
<template>
<div class="mk-note-preview" :class="{ smart: $store.state.device.postStyle == 'smart' }">
<div class="yohlumlkhizgfkvvscwfcrcggkotpvry" :class="{ smart: $store.state.device.postStyle == 'smart' }">
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle != 'smart'"/>
<div class="main">
<mk-note-header class="header" :note="note" :mini="true"/>
<div class="body">
<mk-sub-note-content class="text" :note="note"/>
<p v-if="note.cw != null" class="cw">
<span class="text" v-if="note.cw != ''">{{ note.cw }}</span>
<span class="toggle" @click="showContent = !showContent">{{ showContent ? '%i18n:@hide%' : '%i18n:@see-more%' }}</span>
</p>
<div class="content" v-show="note.cw == null || showContent">
<mk-sub-note-content class="text" :note="note"/>
</div>
</div>
</div>
</div>
@ -14,7 +20,18 @@
import Vue from 'vue';
export default Vue.extend({
props: ['note']
props: {
note: {
type: Object,
required: true
}
},
data() {
return {
showContent: false
};
}
});
</script>
@ -65,16 +82,41 @@ root(isDark)
> .body
> .text
> .cw
cursor default
display block
margin 0
padding 0
color isDark ? #959ba7 : #717171
overflow-wrap break-word
color isDark ? #fff : #717171
.mk-note-preview[data-darkmode]
> .text
margin-right 8px
> .toggle
display inline-block
padding 4px 8px
font-size 0.7em
color isDark ? #393f4f : #fff
background isDark ? #687390 : #b1b9c1
border-radius 2px
cursor pointer
user-select none
&:hover
background isDark ? #707b97 : #bbc4ce
> .content
> .text
cursor default
margin 0
padding 0
color isDark ? #959ba7 : #717171
.yohlumlkhizgfkvvscwfcrcggkotpvry[data-darkmode]
root(true)
.mk-note-preview:not([data-darkmode])
.yohlumlkhizgfkvvscwfcrcggkotpvry:not([data-darkmode])
root(false)
</style>