CWが適用されない箇所を修正
This commit is contained in:
parent
44099c551c
commit
700f8c9bb4
@ -37,20 +37,26 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="text">
|
<p v-if="p.cw != null" class="cw">
|
||||||
<span v-if="p.isHidden" style="opacity: 0.5">%i18n:@private%</span>
|
<span class="text" v-if="p.cw != ''">{{ p.cw }}</span>
|
||||||
<span v-if="p.deletedAt" style="opacity: 0.5">%i18n:@deleted%</span>
|
<span class="toggle" @click="showContent = !showContent">{{ showContent ? '%i18n:@hide%' : '%i18n:@see-more%' }}</span>
|
||||||
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
|
</p>
|
||||||
</div>
|
<div class="content" v-show="p.cw == null || showContent">
|
||||||
<div class="files" v-if="p.files.length > 0">
|
<div class="text">
|
||||||
<mk-media-list :media-list="p.files" :raw="true"/>
|
<span v-if="p.isHidden" style="opacity: 0.5">%i18n:@private%</span>
|
||||||
</div>
|
<span v-if="p.deletedAt" style="opacity: 0.5">%i18n:@deleted%</span>
|
||||||
<mk-poll v-if="p.poll" :note="p"/>
|
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
|
</div>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<div class="files" v-if="p.files.length > 0">
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<mk-media-list :media-list="p.files" :raw="true"/>
|
||||||
<div class="renote" v-if="p.renote">
|
</div>
|
||||||
<mk-note-preview :note="p.renote"/>
|
<mk-poll v-if="p.poll" :note="p"/>
|
||||||
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
|
||||||
|
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
|
<div class="map" v-if="p.geo" ref="map"></div>
|
||||||
|
<div class="renote" v-if="p.renote">
|
||||||
|
<mk-note-preview :note="p.renote"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
@ -105,6 +111,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showContent: false,
|
||||||
conversation: [],
|
conversation: [],
|
||||||
conversationFetching: false,
|
conversationFetching: false,
|
||||||
replies: []
|
replies: []
|
||||||
@ -118,17 +125,21 @@ export default Vue.extend({
|
|||||||
this.note.fileIds.length == 0 &&
|
this.note.fileIds.length == 0 &&
|
||||||
this.note.poll == null);
|
this.note.poll == null);
|
||||||
},
|
},
|
||||||
|
|
||||||
p(): any {
|
p(): any {
|
||||||
return this.isRenote ? this.note.renote : this.note;
|
return this.isRenote ? this.note.renote : this.note;
|
||||||
},
|
},
|
||||||
|
|
||||||
reactionsCount(): number {
|
reactionsCount(): number {
|
||||||
return this.p.reactionCounts
|
return this.p.reactionCounts
|
||||||
? sum(Object.values(this.p.reactionCounts))
|
? sum(Object.values(this.p.reactionCounts))
|
||||||
: 0;
|
: 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
title(): string {
|
title(): string {
|
||||||
return new Date(this.p.createdAt).toLocaleString();
|
return new Date(this.p.createdAt).toLocaleString();
|
||||||
},
|
},
|
||||||
|
|
||||||
urls(): string[] {
|
urls(): string[] {
|
||||||
if (this.p.text) {
|
if (this.p.text) {
|
||||||
const ast = parse(this.p.text);
|
const ast = parse(this.p.text);
|
||||||
@ -183,22 +194,26 @@ export default Vue.extend({
|
|||||||
this.conversation = conversation.reverse();
|
this.conversation = conversation.reverse();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
reply() {
|
reply() {
|
||||||
(this as any).os.new(MkPostFormWindow, {
|
(this as any).os.new(MkPostFormWindow, {
|
||||||
reply: this.p
|
reply: this.p
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
renote() {
|
renote() {
|
||||||
(this as any).os.new(MkRenoteFormWindow, {
|
(this as any).os.new(MkRenoteFormWindow, {
|
||||||
note: this.p
|
note: this.p
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
react() {
|
react() {
|
||||||
(this as any).os.new(MkReactionPicker, {
|
(this as any).os.new(MkReactionPicker, {
|
||||||
source: this.$refs.reactButton,
|
source: this.$refs.reactButton,
|
||||||
note: this.p
|
note: this.p
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
(this as any).os.new(MkNoteMenu, {
|
(this as any).os.new(MkNoteMenu, {
|
||||||
source: this.$refs.menuButton,
|
source: this.$refs.menuButton,
|
||||||
@ -326,37 +341,62 @@ root(isDark)
|
|||||||
> .body
|
> .body
|
||||||
padding 8px 0
|
padding 8px 0
|
||||||
|
|
||||||
> .text
|
> .cw
|
||||||
cursor default
|
cursor default
|
||||||
display block
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1.5em
|
|
||||||
color isDark ? #fff : #717171
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
> .renote
|
> .text
|
||||||
margin 8px 0
|
margin-right 8px
|
||||||
|
|
||||||
> .mk-note-preview
|
> .toggle
|
||||||
padding 16px
|
display inline-block
|
||||||
border dashed 1px #c0dac6
|
padding 4px 8px
|
||||||
border-radius 8px
|
font-size 0.7em
|
||||||
|
color isDark ? #393f4f : #fff
|
||||||
|
background isDark ? #687390 : #b1b9c1
|
||||||
|
border-radius 2px
|
||||||
|
cursor pointer
|
||||||
|
user-select none
|
||||||
|
|
||||||
> .location
|
&:hover
|
||||||
margin 4px 0
|
background isDark ? #707b97 : #bbc4ce
|
||||||
font-size 12px
|
|
||||||
color #ccc
|
|
||||||
|
|
||||||
> .map
|
> .content
|
||||||
width 100%
|
> .text
|
||||||
height 300px
|
cursor default
|
||||||
|
display block
|
||||||
|
margin 0
|
||||||
|
padding 0
|
||||||
|
overflow-wrap break-word
|
||||||
|
font-size 1.5em
|
||||||
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
&:empty
|
> .renote
|
||||||
display none
|
margin 8px 0
|
||||||
|
|
||||||
> .mk-url-preview
|
> *
|
||||||
margin-top 8px
|
padding 16px
|
||||||
|
border dashed 1px #c0dac6
|
||||||
|
border-radius 8px
|
||||||
|
|
||||||
|
> .location
|
||||||
|
margin 4px 0
|
||||||
|
font-size 12px
|
||||||
|
color #ccc
|
||||||
|
|
||||||
|
> .map
|
||||||
|
width 100%
|
||||||
|
height 300px
|
||||||
|
|
||||||
|
&:empty
|
||||||
|
display none
|
||||||
|
|
||||||
|
> .mk-url-preview
|
||||||
|
margin-top 8px
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
font-size 1.2em
|
font-size 1.2em
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-note-preview" :title="title">
|
<div class="qiziqtywpuaucsgarwajitwaakggnisj" :title="title">
|
||||||
<mk-avatar class="avatar" :user="note.user" v-if="!mini"/>
|
<mk-avatar class="avatar" :user="note.user" v-if="!mini"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="note" :mini="true"/>
|
<mk-note-header class="header" :note="note" :mini="true"/>
|
||||||
<div class="body">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,6 +31,13 @@ export default Vue.extend({
|
|||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showContent: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
title(): string {
|
title(): string {
|
||||||
return new Date(this.note.createdAt).toLocaleString();
|
return new Date(this.note.createdAt).toLocaleString();
|
||||||
@ -52,16 +65,41 @@ root(isDark)
|
|||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
|
||||||
> .text
|
> .cw
|
||||||
cursor default
|
cursor default
|
||||||
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 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
|
||||||
|
|
||||||
|
.qiziqtywpuaucsgarwajitwaakggnisj[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
|
||||||
.mk-note-preview:not([data-darkmode])
|
.qiziqtywpuaucsgarwajitwaakggnisj:not([data-darkmode])
|
||||||
root(false)
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub" :title="title">
|
<div class="tkfdzaxtkdeianobciwadajxzbddorql" :title="title">
|
||||||
<mk-avatar class="avatar" :user="note.user"/>
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="note"/>
|
<mk-note-header class="header" :note="note"/>
|
||||||
<div class="body">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -14,7 +20,19 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['note'],
|
props: {
|
||||||
|
note: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showContent: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
title(): string {
|
title(): string {
|
||||||
return new Date(this.note.createdAt).toLocaleString();
|
return new Date(this.note.createdAt).toLocaleString();
|
||||||
@ -48,20 +66,45 @@ root(isDark)
|
|||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
|
||||||
> .text
|
> .cw
|
||||||
cursor default
|
cursor default
|
||||||
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
color isDark ? #959ba7 : #717171
|
overflow-wrap break-word
|
||||||
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
pre
|
> .text
|
||||||
max-height 120px
|
margin-right 8px
|
||||||
font-size 80%
|
|
||||||
|
|
||||||
.sub[data-darkmode]
|
> .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
|
||||||
|
|
||||||
|
pre
|
||||||
|
max-height 120px
|
||||||
|
font-size 80%
|
||||||
|
|
||||||
|
.tkfdzaxtkdeianobciwadajxzbddorql[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
|
||||||
.sub:not([data-darkmode])
|
.tkfdzaxtkdeianobciwadajxzbddorql:not([data-darkmode])
|
||||||
root(false)
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
|
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
|
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<div class="map" v-if="p.geo" ref="map"></div>
|
||||||
<div class="renote" v-if="p.renote">
|
<div class="renote" v-if="p.renote"><mk-note-preview :note="p.renote"/></div>
|
||||||
<mk-note-preview :note="p.renote"/>
|
|
||||||
</div>
|
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -96,7 +94,12 @@ export default Vue.extend({
|
|||||||
XSub
|
XSub
|
||||||
},
|
},
|
||||||
|
|
||||||
props: ['note'],
|
props: {
|
||||||
|
note: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -469,7 +472,7 @@ root(isDark)
|
|||||||
> .renote
|
> .renote
|
||||||
margin 8px 0
|
margin 8px 0
|
||||||
|
|
||||||
> .mk-note-preview
|
> *
|
||||||
padding 16px
|
padding 16px
|
||||||
border dashed 1px isDark ? #4e945e : #c0dac6
|
border dashed 1px isDark ? #4e945e : #c0dac6
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-renote-form">
|
<div class="mk-renote-form">
|
||||||
<mk-note-preview :note="note"/>
|
<mk-note-preview class="preview" :note="note"/>
|
||||||
<template v-if="!quote">
|
<template v-if="!quote">
|
||||||
<footer>
|
<footer>
|
||||||
<a class="quote" v-if="!quote" @click="onQuote">%i18n:@quote%</a>
|
<a class="quote" v-if="!quote" @click="onQuote">%i18n:@quote%</a>
|
||||||
@ -61,7 +61,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
root(isDark)
|
root(isDark)
|
||||||
|
|
||||||
> .mk-note-preview
|
> .preview
|
||||||
margin 16px 22px
|
margin 16px 22px
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
|
@ -394,7 +394,7 @@ root(isDark)
|
|||||||
> .renote
|
> .renote
|
||||||
margin 8px 0
|
margin 8px 0
|
||||||
|
|
||||||
> .mk-note-preview
|
> *
|
||||||
padding 16px
|
padding 16px
|
||||||
border dashed 1px isDark ? #4e945e : #c0dac6
|
border dashed 1px isDark ? #4e945e : #c0dac6
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
@ -35,20 +35,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="text">
|
<p v-if="p.cw != null" class="cw">
|
||||||
<span v-if="p.isHidden" style="opacity: 0.5">(%i18n:@private%)</span>
|
<span class="text" v-if="p.cw != ''">{{ p.cw }}</span>
|
||||||
<span v-if="p.deletedAt" style="opacity: 0.5">(%i18n:@deleted%)</span>
|
<span class="toggle" @click="showContent = !showContent">{{ showContent ? '%i18n:@hide%' : '%i18n:@see-more%' }}</span>
|
||||||
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
|
</p>
|
||||||
</div>
|
<div class="content" v-show="p.cw == null || showContent">
|
||||||
<div class="files" v-if="p.files.length > 0">
|
<div class="text">
|
||||||
<mk-media-list :media-list="p.files" :raw="true"/>
|
<span v-if="p.isHidden" style="opacity: 0.5">(%i18n:@private%)</span>
|
||||||
</div>
|
<span v-if="p.deletedAt" style="opacity: 0.5">(%i18n:@deleted%)</span>
|
||||||
<mk-poll v-if="p.poll" :note="p"/>
|
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
|
</div>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<div class="files" v-if="p.files.length > 0">
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<mk-media-list :media-list="p.files" :raw="true"/>
|
||||||
<div class="renote" v-if="p.renote">
|
</div>
|
||||||
<mk-note-preview :note="p.renote"/>
|
<mk-poll v-if="p.poll" :note="p"/>
|
||||||
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
|
||||||
|
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
|
<div class="map" v-if="p.geo" ref="map"></div>
|
||||||
|
<div class="renote" v-if="p.renote">
|
||||||
|
<mk-note-preview :note="p.renote"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<router-link class="time" :to="p | notePage">
|
<router-link class="time" :to="p | notePage">
|
||||||
@ -104,6 +110,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showContent: false,
|
||||||
conversation: [],
|
conversation: [],
|
||||||
conversationFetching: false,
|
conversationFetching: false,
|
||||||
replies: []
|
replies: []
|
||||||
@ -334,44 +341,70 @@ root(isDark)
|
|||||||
> .body
|
> .body
|
||||||
padding 8px 0
|
padding 8px 0
|
||||||
|
|
||||||
> .text
|
> .cw
|
||||||
|
cursor default
|
||||||
display block
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 16px
|
|
||||||
color isDark ? #fff : #717171
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
@media (min-width 500px)
|
> .text
|
||||||
font-size 24px
|
margin-right 8px
|
||||||
|
|
||||||
> .renote
|
> .toggle
|
||||||
margin 8px 0
|
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
|
||||||
|
|
||||||
> .mk-note-preview
|
&:hover
|
||||||
padding 16px
|
background isDark ? #707b97 : #bbc4ce
|
||||||
border dashed 1px #c0dac6
|
|
||||||
border-radius 8px
|
|
||||||
|
|
||||||
> .location
|
> .content
|
||||||
margin 4px 0
|
|
||||||
font-size 12px
|
|
||||||
color #ccc
|
|
||||||
|
|
||||||
> .map
|
> .text
|
||||||
width 100%
|
|
||||||
height 200px
|
|
||||||
|
|
||||||
&:empty
|
|
||||||
display none
|
|
||||||
|
|
||||||
> .mk-url-preview
|
|
||||||
margin-top 8px
|
|
||||||
|
|
||||||
> .files
|
|
||||||
> img
|
|
||||||
display block
|
display block
|
||||||
max-width 100%
|
margin 0
|
||||||
|
padding 0
|
||||||
|
overflow-wrap break-word
|
||||||
|
font-size 16px
|
||||||
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
|
@media (min-width 500px)
|
||||||
|
font-size 24px
|
||||||
|
|
||||||
|
> .renote
|
||||||
|
margin 8px 0
|
||||||
|
|
||||||
|
> *
|
||||||
|
padding 16px
|
||||||
|
border dashed 1px #c0dac6
|
||||||
|
border-radius 8px
|
||||||
|
|
||||||
|
> .location
|
||||||
|
margin 4px 0
|
||||||
|
font-size 12px
|
||||||
|
color #ccc
|
||||||
|
|
||||||
|
> .map
|
||||||
|
width 100%
|
||||||
|
height 200px
|
||||||
|
|
||||||
|
&:empty
|
||||||
|
display none
|
||||||
|
|
||||||
|
> .mk-url-preview
|
||||||
|
margin-top 8px
|
||||||
|
|
||||||
|
> .files
|
||||||
|
> img
|
||||||
|
display block
|
||||||
|
max-width 100%
|
||||||
|
|
||||||
> .time
|
> .time
|
||||||
font-size 16px
|
font-size 16px
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
<template>
|
<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'"/>
|
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle != 'smart'"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="note" :mini="true"/>
|
<mk-note-header class="header" :note="note" :mini="true"/>
|
||||||
<div class="body">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -14,7 +20,18 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['note']
|
props: {
|
||||||
|
note: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showContent: false
|
||||||
|
};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -65,16 +82,41 @@ root(isDark)
|
|||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
|
||||||
> .text
|
> .cw
|
||||||
cursor default
|
cursor default
|
||||||
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 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)
|
root(true)
|
||||||
|
|
||||||
.mk-note-preview:not([data-darkmode])
|
.yohlumlkhizgfkvvscwfcrcggkotpvry:not([data-darkmode])
|
||||||
root(false)
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub" :class="{ smart: $store.state.device.postStyle == 'smart' }">
|
<div class="zlrxdaqttccpwhpaagdmkawtzklsccam" :class="{ smart: $store.state.device.postStyle == 'smart' }">
|
||||||
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle != 'smart'"/>
|
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle != 'smart'"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="note" :mini="true"/>
|
<mk-note-header class="header" :note="note" :mini="true"/>
|
||||||
<div class="body">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -24,6 +30,12 @@ export default Vue.extend({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showContent: false
|
||||||
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -77,20 +89,44 @@ root(isDark)
|
|||||||
margin-bottom 2px
|
margin-bottom 2px
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
|
> .cw
|
||||||
> .text
|
cursor default
|
||||||
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
color isDark ? #959ba7 : #717171
|
overflow-wrap break-word
|
||||||
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
pre
|
> .text
|
||||||
max-height 120px
|
margin-right 8px
|
||||||
font-size 80%
|
|
||||||
|
|
||||||
.sub[data-darkmode]
|
> .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
|
||||||
|
margin 0
|
||||||
|
padding 0
|
||||||
|
color isDark ? #959ba7 : #717171
|
||||||
|
|
||||||
|
pre
|
||||||
|
max-height 120px
|
||||||
|
font-size 80%
|
||||||
|
|
||||||
|
.zlrxdaqttccpwhpaagdmkawtzklsccam[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
|
||||||
.sub:not([data-darkmode])
|
.zlrxdaqttccpwhpaagdmkawtzklsccam:not([data-darkmode])
|
||||||
root(false)
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -35,9 +35,7 @@
|
|||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<div class="map" v-if="p.geo" ref="map"></div>
|
||||||
<div class="renote" v-if="p.renote">
|
<div class="renote" v-if="p.renote"><mk-note-preview :note="p.renote"/></div>
|
||||||
<mk-note-preview :note="p.renote"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
||||||
</div>
|
</div>
|
||||||
@ -436,7 +434,7 @@ root(isDark)
|
|||||||
> .renote
|
> .renote
|
||||||
margin 8px 0
|
margin 8px 0
|
||||||
|
|
||||||
> .mk-note-preview
|
> *
|
||||||
padding 16px
|
padding 16px
|
||||||
border dashed 1px isDark ? #4e945e : #c0dac6
|
border dashed 1px isDark ? #4e945e : #c0dac6
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<mk-note-preview v-if="reply" :note="reply"/>
|
<mk-note-preview class="preview" v-if="reply" :note="reply"/>
|
||||||
<mk-note-preview v-if="renote" :note="renote"/>
|
<mk-note-preview class="preview" v-if="renote" :note="renote"/>
|
||||||
<div v-if="visibility == 'specified'" class="visibleUsers">
|
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||||
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
||||||
@ -387,7 +387,7 @@ root(isDark)
|
|||||||
max-width 500px
|
max-width 500px
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
|
||||||
> .mk-note-preview
|
> .preview
|
||||||
padding 16px
|
padding 16px
|
||||||
|
|
||||||
> .visibleUsers
|
> .visibleUsers
|
||||||
|
Loading…
Reference in New Issue
Block a user