From 43ee5267c2111257889849bcf0ead7fc82a326db Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 18 Feb 2018 22:14:51 +0900 Subject: [PATCH] wip --- src/web/app/desktop/api/input.ts | 3 ++- .../components/choose-file-from-drive-window.vue | 2 +- .../app/desktop/views/components/drive-file.vue | 3 ++- .../views/components/drive-nav-folder.vue | 7 ++++++- .../desktop/views/components/input-dialog.vue | 16 ++++++++-------- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/web/app/desktop/api/input.ts b/src/web/app/desktop/api/input.ts index a5ab07138..ce26a8112 100644 --- a/src/web/app/desktop/api/input.ts +++ b/src/web/app/desktop/api/input.ts @@ -8,7 +8,8 @@ export default function(opts) { title: o.title, placeholder: o.placeholder, default: o.default, - type: o.type || 'text' + type: o.type || 'text', + allowEmpty: o.allowEmpty } }).$mount(); d.$once('done', text => { diff --git a/src/web/app/desktop/views/components/choose-file-from-drive-window.vue b/src/web/app/desktop/views/components/choose-file-from-drive-window.vue index 89058bc3e..232282745 100644 --- a/src/web/app/desktop/views/components/choose-file-from-drive-window.vue +++ b/src/web/app/desktop/views/components/choose-file-from-drive-window.vue @@ -41,7 +41,7 @@ export default Vue.extend({ this.files = [file]; this.ok(); }, - onChangeselection(files) { + onChangeSelection(files) { this.files = files; }, upload() { diff --git a/src/web/app/desktop/views/components/drive-file.vue b/src/web/app/desktop/views/components/drive-file.vue index 0681b5f03..772b9baf5 100644 --- a/src/web/app/desktop/views/components/drive-file.vue +++ b/src/web/app/desktop/views/components/drive-file.vue @@ -148,7 +148,8 @@ export default Vue.extend({ (this as any).apis.input({ title: '%i18n:desktop.tags.mk-drive-browser-file-contextmenu.rename-file%', placeholder: '%i18n:desktop.tags.mk-drive-browser-file-contextmenu.input-new-file-name%', - default: this.file.name + default: this.file.name, + allowEmpty: false }).then(name => { (this as any).api('drive/files/update', { file_id: this.file.id, diff --git a/src/web/app/desktop/views/components/drive-nav-folder.vue b/src/web/app/desktop/views/components/drive-nav-folder.vue index b6eb36535..44821087a 100644 --- a/src/web/app/desktop/views/components/drive-nav-folder.vue +++ b/src/web/app/desktop/views/components/drive-nav-folder.vue @@ -15,13 +15,18 @@