MisskeyShare

This commit is contained in:
syuilo
2018-06-16 18:42:49 +09:00
parent 792632d726
commit 555a0f276c
9 changed files with 185 additions and 16 deletions

View File

@ -22,6 +22,7 @@ import userTimeline from './user-timeline.vue';
import userListTimeline from './user-list-timeline.vue';
import activity from './activity.vue';
import widgetContainer from './widget-container.vue';
import postForm from './post-form.vue';
Vue.component('mk-ui', ui);
Vue.component('mk-note', note);
@ -45,3 +46,4 @@ Vue.component('mk-user-timeline', userTimeline);
Vue.component('mk-user-list-timeline', userListTimeline);
Vue.component('mk-activity', activity);
Vue.component('mk-widget-container', widgetContainer);
Vue.component('mk-post-form', postForm);

View File

@ -54,7 +54,25 @@ export default Vue.extend({
MkVisibilityChooser
},
props: ['reply', 'renote'],
props: {
reply: {
type: Object,
required: false
},
renote: {
type: Object,
required: false
},
initialText: {
type: String,
required: false
},
instant: {
type: Boolean,
required: false,
default: false
}
},
data() {
return {
@ -112,6 +130,10 @@ export default Vue.extend({
},
mounted() {
if (this.initialText) {
this.text = this.initialText;
}
if (this.reply && this.reply.user.host != null) {
this.text = `@${this.reply.user.username}@${this.reply.user.host} `;
}
@ -252,8 +274,10 @@ export default Vue.extend({
visibleUserIds: this.visibility == 'specified' ? this.visibleUsers.map(u => u.id) : undefined,
viaMobile: viaMobile
}).then(data => {
this.$emit('note');
this.$destroy();
this.$emit('posted');
this.$nextTick(() => {
this.$destroy();
});
}).catch(err => {
this.posting = false;
});