From a8f690894008faef57566a9dd2b17ef12d204a6c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 3 Mar 2018 16:39:53 +0900 Subject: [PATCH] :v: --- src/web/app/desktop/api/choose-drive-file.ts | 2 +- src/web/app/desktop/views/components/drive.vue | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/web/app/desktop/api/choose-drive-file.ts b/src/web/app/desktop/api/choose-drive-file.ts index 8920362445..fbda600e6e 100644 --- a/src/web/app/desktop/api/choose-drive-file.ts +++ b/src/web/app/desktop/api/choose-drive-file.ts @@ -23,7 +23,7 @@ export default function(opts) { }; window.open(url + '/selectdrive', - 'drive_window', + 'choose_drive_window', 'height=500, width=800'); } }); diff --git a/src/web/app/desktop/views/components/drive.vue b/src/web/app/desktop/views/components/drive.vue index 99036bed83..0fafa8cf23 100644 --- a/src/web/app/desktop/views/components/drive.vue +++ b/src/web/app/desktop/views/components/drive.vue @@ -62,6 +62,7 @@ import XFolder from './drive.folder.vue'; import XFile from './drive.file.vue'; import contains from '../../../common/scripts/contains'; import contextmenu from '../../api/contextmenu'; +import { url } from '../../../config'; export default Vue.extend({ components: { @@ -389,9 +390,15 @@ export default Vue.extend({ }, newWindow(folder) { - (this as any).os.new(MkDriveWindow, { - folder: folder - }); + if (document.body.clientWidth > 800) { + (this as any).os.new(MkDriveWindow, { + folder: folder + }); + } else { + window.open(url + '/i/drive/folder/' + folder.id, + 'drive_window', + 'height=500, width=800'); + } }, move(target) {