This commit is contained in:
syuilo
2018-02-18 12:35:18 +09:00
parent 61b95e0c26
commit 99b3499364
103 changed files with 878 additions and 790 deletions

View File

@@ -113,18 +113,12 @@ export default Vue.extend({
chooseFile() {
(this.$refs.file as any).click();
},
chooseFileFromDrive() {/*
const w = new MkDriveFileSelectorWindow({
propsData: {
multiple: true
}
}).$mount();
document.body.appendChild(w.$el);
w.$once('selected', files => {
chooseFileFromDrive() {
(this as any).apis.chooseDriveFile({
multiple: true
}).then(files => {
files.forEach(this.attachMedia);
});*/
});
},
attachMedia(driveFile) {
this.files.push(driveFile);
@@ -196,7 +190,7 @@ export default Vue.extend({
post() {
this.posting = true;
this.$root.$data.os.api('posts/create', {
(this as any).api('posts/create', {
text: this.text == '' ? undefined : this.text,
media_ids: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
reply_id: this.reply ? this.reply.id : undefined,