mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
wip
This commit is contained in:
parent
73029df58a
commit
0c092b8050
2 changed files with 21 additions and 13 deletions
|
@ -1,9 +1,27 @@
|
|||
import PostForm from '../views/components/post-form.vue';
|
||||
import RepostForm from '../views/components/repost-form.vue';
|
||||
//import RepostForm from '../views/components/repost-form.vue';
|
||||
import getPostSummary from '../../../../common/get-post-summary';
|
||||
|
||||
export default function(opts) {
|
||||
export default (os) => (opts) => {
|
||||
const o = opts || {};
|
||||
|
||||
if (o.repost) {
|
||||
/*const vm = new RepostForm({
|
||||
propsData: {
|
||||
repost: o.repost
|
||||
}
|
||||
}).$mount();
|
||||
vm.$once('cancel', recover);
|
||||
vm.$once('post', recover);
|
||||
document.body.appendChild(vm.$el);*/
|
||||
|
||||
const text = window.prompt(`「${getPostSummary(o.repost)}」をRepost`);
|
||||
if (text == null) return;
|
||||
os.api('posts/create', {
|
||||
repost_id: o.repost.id,
|
||||
text: text == '' ? undefined : text
|
||||
});
|
||||
} else {
|
||||
const app = document.getElementById('app');
|
||||
app.style.display = 'none';
|
||||
|
||||
|
@ -11,16 +29,6 @@ export default function(opts) {
|
|||
app.style.display = 'block';
|
||||
}
|
||||
|
||||
if (o.repost) {
|
||||
const vm = new RepostForm({
|
||||
propsData: {
|
||||
repost: o.repost
|
||||
}
|
||||
}).$mount();
|
||||
vm.$once('cancel', recover);
|
||||
vm.$once('post', recover);
|
||||
document.body.appendChild(vm.$el);
|
||||
} else {
|
||||
const vm = new PostForm({
|
||||
propsData: {
|
||||
reply: o.reply
|
||||
|
@ -30,4 +38,4 @@ export default function(opts) {
|
|||
vm.$once('post', recover);
|
||||
document.body.appendChild(vm.$el);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ init((launch) => {
|
|||
chooseDriveFile,
|
||||
dialog,
|
||||
input,
|
||||
post,
|
||||
post: post(os),
|
||||
notify
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue