MissketDeck: Implement media view tl
This commit is contained in:
parent
72c4ccaee8
commit
f9d5af0600
6 changed files with 63 additions and 10 deletions
|
@ -668,6 +668,10 @@ desktop/views/components/window.vue:
|
||||||
popout: "ポップアウト"
|
popout: "ポップアウト"
|
||||||
close: "閉じる"
|
close: "閉じる"
|
||||||
|
|
||||||
|
desktop/views/pages/deck/deck.tl-column.vue:
|
||||||
|
is-media-only: "メディア投稿のみ"
|
||||||
|
is-media-view: "メディアビュー"
|
||||||
|
|
||||||
desktop/views/pages/welcome.vue:
|
desktop/views/pages/welcome.vue:
|
||||||
about: "詳しく..."
|
about: "詳しく..."
|
||||||
gotit: "わかった"
|
gotit: "わかった"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<x-notes ref="timeline" :more="existMore ? more : null"/>
|
<x-notes ref="timeline" :more="existMore ? more : null" :media-view="mediaView"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -23,6 +23,11 @@ export default Vue.extend({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
mediaView: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="zyjjkidcqjnlegkqebitfviomuqmseqk" :class="{ renote: isRenote }">
|
<div v-if="!mediaView" class="zyjjkidcqjnlegkqebitfviomuqmseqk" :class="{ renote: isRenote }">
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="p.reply"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,6 +55,14 @@
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="srwrkujossgfuhrbnvqkybtzxpblgchi">
|
||||||
|
<div v-if="note.media.length > 0">
|
||||||
|
<mk-media-list :media-list="note.media"/>
|
||||||
|
</div>
|
||||||
|
<div v-if="note.renote && note.renote.media.length > 0">
|
||||||
|
<mk-media-list :media-list="note.renote.media"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -71,7 +79,17 @@ export default Vue.extend({
|
||||||
XSub
|
XSub
|
||||||
},
|
},
|
||||||
|
|
||||||
props: ['note'],
|
props: {
|
||||||
|
note: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
mediaView: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -199,6 +217,16 @@ export default Vue.extend({
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
|
mediaRoot(isDark)
|
||||||
|
font-size 13px
|
||||||
|
margin 4px 12px
|
||||||
|
|
||||||
|
&:first-child
|
||||||
|
margin-top 12px
|
||||||
|
|
||||||
|
&:last-child
|
||||||
|
margin-bottom 12px
|
||||||
|
|
||||||
root(isDark)
|
root(isDark)
|
||||||
font-size 13px
|
font-size 13px
|
||||||
border-bottom solid 1px isDark ? #1c2023 : #eaeaea
|
border-bottom solid 1px isDark ? #1c2023 : #eaeaea
|
||||||
|
@ -257,7 +285,7 @@ root(isDark)
|
||||||
|
|
||||||
> article
|
> article
|
||||||
display flex
|
display flex
|
||||||
padding 16px 16px 9px
|
padding 16px 16px 4px
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
flex-shrink 0
|
flex-shrink 0
|
||||||
|
@ -408,7 +436,7 @@ root(isDark)
|
||||||
> footer
|
> footer
|
||||||
> button
|
> button
|
||||||
margin 0
|
margin 0
|
||||||
padding 8px
|
padding 4px 8px 8px 8px
|
||||||
background transparent
|
background transparent
|
||||||
border none
|
border none
|
||||||
box-shadow none
|
box-shadow none
|
||||||
|
@ -436,4 +464,10 @@ root(isDark)
|
||||||
.zyjjkidcqjnlegkqebitfviomuqmseqk:not([data-darkmode])
|
.zyjjkidcqjnlegkqebitfviomuqmseqk:not([data-darkmode])
|
||||||
root(false)
|
root(false)
|
||||||
|
|
||||||
|
.srwrkujossgfuhrbnvqkybtzxpblgchi[data-darkmode]
|
||||||
|
mediaRoot(true)
|
||||||
|
|
||||||
|
.srwrkujossgfuhrbnvqkybtzxpblgchi:not([data-darkmode])
|
||||||
|
mediaRoot(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<transition-group name="mk-notes" class="transition">
|
<transition-group name="mk-notes" class="transition">
|
||||||
<template v-for="(note, i) in _notes">
|
<template v-for="(note, i) in _notes">
|
||||||
<x-note :note="note" :key="note.id" @update:note="onNoteUpdated(i, $event)"/>
|
<x-note :note="note" :key="note.id" @update:note="onNoteUpdated(i, $event)" :media-view="mediaView"/>
|
||||||
<p class="date" :key="note.id + '_date'" v-if="i != notes.length - 1 && note._date != _notes[i + 1]._date">
|
<p class="date" :key="note.id + '_date'" v-if="i != notes.length - 1 && note._date != _notes[i + 1]._date">
|
||||||
<span>%fa:angle-up%{{ note._datetext }}</span>
|
<span>%fa:angle-up%{{ note._datetext }}</span>
|
||||||
<span>%fa:angle-down%{{ _notes[i + 1]._datetext }}</span>
|
<span>%fa:angle-down%{{ _notes[i + 1]._datetext }}</span>
|
||||||
|
@ -44,6 +44,11 @@ export default Vue.extend({
|
||||||
more: {
|
more: {
|
||||||
type: Function,
|
type: Function,
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
mediaView: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
<span>{{ name }}</span>
|
<span>{{ name }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="editor" v-if="edit">
|
<div class="editor" style="padding:0 12px" v-if="edit">
|
||||||
<mk-switch v-model="column.isMediaOnly" @change="onChangeSettings" text="%i18n:@is-media-only%"/>
|
<mk-switch v-model="column.isMediaOnly" @change="onChangeSettings" text="%i18n:@is-media-only%"/>
|
||||||
<mk-switch v-model="column.isMediaView" @change="onChangeSettings" text="%i18n:@is-media-view%"/>
|
<mk-switch v-model="column.isMediaView" @change="onChangeSettings" text="%i18n:@is-media-view%"/>
|
||||||
</div>
|
</div>
|
||||||
<x-list-tl v-if="column.type == 'list'" :list="column.list" :media-only="column.isMediaOnly"/>
|
<x-list-tl v-if="column.type == 'list'" :list="column.list" :media-only="column.isMediaOnly" :media-view="column.isMediaView"/>
|
||||||
<x-tl v-else :src="column.type" :media-only="column.isMediaOnly"/>
|
<x-tl v-else :src="column.type" :media-only="column.isMediaOnly" :media-view="column.isMediaView"/>
|
||||||
</x-column>
|
</x-column>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<x-notes ref="timeline" :more="existMore ? more : null"/>
|
<x-notes ref="timeline" :more="existMore ? more : null" :media-view="mediaView"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -23,6 +23,11 @@ export default Vue.extend({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
mediaView: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue