mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-04 14:16:03 +02:00
23 lines
669 B
TypeScript
23 lines
669 B
TypeScript
import OS from '../../mios';
|
|
import PostFormWindow from '../views/components/post-form-window.vue';
|
|
import RenoteFormWindow from '../views/components/renote-form-window.vue';
|
|
|
|
export default (os: OS) => opts => {
|
|
const o = opts || {};
|
|
if (o.renote) {
|
|
const vm = os.new(RenoteFormWindow, {
|
|
note: o.renote,
|
|
animation: o.animation == null ? true : o.animation
|
|
});
|
|
if (opts.cb) vm.$once('closed', opts.cb);
|
|
document.body.appendChild(vm.$el);
|
|
} else {
|
|
const vm = os.new(PostFormWindow, {
|
|
reply: o.reply,
|
|
animation: o.animation == null ? true : o.animation
|
|
});
|
|
if (opts.cb) vm.$once('closed', opts.cb);
|
|
document.body.appendChild(vm.$el);
|
|
}
|
|
};
|