2018-05-27 09:12:39 +00:00
|
|
|
import OS from '../../mios';
|
2018-02-20 13:53:34 +00:00
|
|
|
import PostFormWindow from '../views/components/post-form-window.vue';
|
2018-04-07 17:30:37 +00:00
|
|
|
import RenoteFormWindow from '../views/components/renote-form-window.vue';
|
2018-02-20 13:53:34 +00:00
|
|
|
|
2018-05-27 09:12:39 +00:00
|
|
|
export default (os: OS) => opts => {
|
2018-02-21 17:15:46 +00:00
|
|
|
const o = opts || {};
|
2018-04-07 17:30:37 +00:00
|
|
|
if (o.renote) {
|
2018-05-27 09:12:39 +00:00
|
|
|
const vm = os.new(RenoteFormWindow, {
|
2018-06-05 19:00:48 +00:00
|
|
|
note: o.renote
|
2018-05-27 09:12:39 +00:00
|
|
|
});
|
2018-02-21 17:15:46 +00:00
|
|
|
document.body.appendChild(vm.$el);
|
|
|
|
} else {
|
2018-05-27 09:12:39 +00:00
|
|
|
const vm = os.new(PostFormWindow, {
|
|
|
|
reply: o.reply
|
|
|
|
});
|
2018-02-21 17:15:46 +00:00
|
|
|
document.body.appendChild(vm.$el);
|
|
|
|
}
|
2018-05-27 09:12:39 +00:00
|
|
|
};
|