From 9a722898d2a49b935c70f1b1c9dcff11e0464be3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 14 Feb 2018 19:03:48 +0900 Subject: [PATCH] wip --- src/web/app/desktop/-tags/drive/file.tag | 217 ---------------- src/web/app/desktop/-tags/drive/folder.tag | 202 --------------- .../desktop/views/components/drive-file.vue | 232 ++++++++++++++++++ .../desktop/views/components/drive-folder.vue | 220 +++++++++++++++++ .../views/components/post-form-window.vue | 4 +- .../desktop/views/components/post-form.vue | 4 +- 6 files changed, 457 insertions(+), 422 deletions(-) delete mode 100644 src/web/app/desktop/-tags/drive/file.tag delete mode 100644 src/web/app/desktop/-tags/drive/folder.tag create mode 100644 src/web/app/desktop/views/components/drive-file.vue create mode 100644 src/web/app/desktop/views/components/drive-folder.vue diff --git a/src/web/app/desktop/-tags/drive/file.tag b/src/web/app/desktop/-tags/drive/file.tag deleted file mode 100644 index 153a038f4..000000000 --- a/src/web/app/desktop/-tags/drive/file.tag +++ /dev/null @@ -1,217 +0,0 @@ - -
-

%i18n:desktop.tags.mk-drive-browser-file.avatar%

-
-
-

%i18n:desktop.tags.mk-drive-browser-file.banner%

-
-
- -
-

{ file.name.lastIndexOf('.') != -1 ? file.name.substr(0, file.name.lastIndexOf('.')) : file.name }{ file.name.substr(file.name.lastIndexOf('.')) }

- - -
diff --git a/src/web/app/desktop/-tags/drive/folder.tag b/src/web/app/desktop/-tags/drive/folder.tag deleted file mode 100644 index ed16bfb0d..000000000 --- a/src/web/app/desktop/-tags/drive/folder.tag +++ /dev/null @@ -1,202 +0,0 @@ - -

{ folder.name }

- - -
diff --git a/src/web/app/desktop/views/components/drive-file.vue b/src/web/app/desktop/views/components/drive-file.vue new file mode 100644 index 000000000..cda561d31 --- /dev/null +++ b/src/web/app/desktop/views/components/drive-file.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/src/web/app/desktop/views/components/drive-folder.vue b/src/web/app/desktop/views/components/drive-folder.vue new file mode 100644 index 000000000..e9e4f1de2 --- /dev/null +++ b/src/web/app/desktop/views/components/drive-folder.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/web/app/desktop/views/components/post-form-window.vue index 90e694c92..39e89ca44 100644 --- a/src/web/app/desktop/views/components/post-form-window.vue +++ b/src/web/app/desktop/views/components/post-form-window.vue @@ -29,7 +29,9 @@ export default Vue.extend({ }; }, mounted() { - (this.$refs.form as any).focus(); + Vue.nextTick(() => { + (this.$refs.form as any).focus(); + }); }, methods: { onChangeUploadings(media) { diff --git a/src/web/app/desktop/views/components/post-form.vue b/src/web/app/desktop/views/components/post-form.vue index 9efca5ddc..c062c57e1 100644 --- a/src/web/app/desktop/views/components/post-form.vue +++ b/src/web/app/desktop/views/components/post-form.vue @@ -111,7 +111,7 @@ export default Vue.extend({ chooseFile() { (this.$refs.file as any).click(); }, - chooseFileFromDrive() { + chooseFileFromDrive() {/* const w = new MkDriveFileSelectorWindow({ propsData: { multiple: true @@ -122,7 +122,7 @@ export default Vue.extend({ w.$once('selected', files => { files.forEach(this.attachMedia); - }); + });*/ }, attachMedia(driveFile) { this.files.push(driveFile);