This commit is contained in:
syuilo 2018-05-31 16:38:05 +09:00
parent c23bbf81f1
commit 111dbdcd7f

View File

@ -1,21 +1,23 @@
<template> <template>
<mk-window ref="window" is-modal @closed="$destroy"> <mk-window class="mk-post-form-window" ref="window" is-modal @closed="$destroy">
<span slot="header"> <span slot="header" class="mk-post-form-window--header">
<span :class="$style.icon" v-if="geo">%fa:map-marker-alt%</span> <span class="icon" v-if="geo">%fa:map-marker-alt%</span>
<span v-if="!reply">%i18n:@note%</span> <span v-if="!reply">%i18n:@note%</span>
<span v-if="reply">%i18n:@reply%</span> <span v-if="reply">%i18n:@reply%</span>
<span :class="$style.count" v-if="media.length != 0">{{ '%i18n:@attaches%'.replace('{}', media.length) }}</span> <span class="count" v-if="media.length != 0">{{ '%i18n:@attaches%'.replace('{}', media.length) }}</span>
<span :class="$style.count" v-if="uploadings.length != 0">{{ '%i18n:@uploading-media%'.replace('{}', uploadings.length) }}<mk-ellipsis/></span> <span class="count" v-if="uploadings.length != 0">{{ '%i18n:@uploading-media%'.replace('{}', uploadings.length) }}<mk-ellipsis/></span>
</span> </span>
<mk-note-preview v-if="reply" :class="$style.notePreview" :note="reply"/> <div class="mk-post-form-window--body">
<mk-post-form ref="form" <mk-note-preview v-if="reply" class="notePreview" :note="reply"/>
:reply="reply" <mk-post-form ref="form"
@posted="onPosted" :reply="reply"
@change-uploadings="onChangeUploadings" @posted="onPosted"
@change-attached-media="onChangeMedia" @change-uploadings="onChangeUploadings"
@geo-attached="onGeoAttached" @change-attached-media="onChangeMedia"
@geo-dettached="onGeoDettached"/> @geo-attached="onGeoAttached"
@geo-dettached="onGeoDettached"/>
</div>
</mk-window> </mk-window>
</template> </template>
@ -56,21 +58,33 @@ export default Vue.extend({
}); });
</script> </script>
<style lang="stylus" module> <style lang="stylus" scoped>
.icon root(isDark)
margin-right 8px .mk-post-form-window--header
.icon
margin-right 8px
.count .count
margin-left 8px margin-left 8px
opacity 0.8 opacity 0.8
&:before &:before
content '(' content '('
&:after &:after
content ')' content ')'
.notePreview .mk-post-form-window--body
margin 16px 22px 0 22px .notePreview
if isDark
margin 16px 22px 0 22px
else
margin 16px 22px
.mk-post-form-window[data-darkmode]
root(true)
.mk-post-form-window:not([data-darkmode])
root(false)
</style> </style>