From 0083898bd1970ebf00d3e5736da34fe322256e7c Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 8 Nov 2017 20:03:58 +0900 Subject: [PATCH] :v: --- locales/en.yml | 6 +++ locales/ja.yml | 6 +++ src/web/app/desktop/router.js | 26 ++++++++----- src/web/app/desktop/tags/drive/browser.tag | 5 ++- src/web/app/desktop/tags/index.js | 1 + src/web/app/desktop/tags/pages/drive.tag | 37 +++++++++++++++++++ .../app/desktop/tags/pages/selectdrive.tag | 9 +++-- src/web/app/desktop/tags/ui.tag | 2 +- src/web/app/mobile/tags/drive/file.tag | 5 ++- 9 files changed, 81 insertions(+), 16 deletions(-) create mode 100644 src/web/app/desktop/tags/pages/drive.tag diff --git a/locales/en.yml b/locales/en.yml index 15e301d3a..679651033 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -242,6 +242,12 @@ desktop: mk-drive-browser-nav-folder: drive: "Drive" + mk-selectdrive-page: + title: "Choose a file(s)" + ok: "OK" + cancel: "Cancel" + upload: "Upload a file(s) from you PC" + mk-nav-home-widget: about: "About" stats: "Stats" diff --git a/locales/ja.yml b/locales/ja.yml index eeb04fe9c..c146475b2 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -242,6 +242,12 @@ desktop: mk-drive-browser-nav-folder: drive: "ドライブ" + mk-selectdrive-page: + title: "ファイルを選択してください" + ok: "決定" + cancel: "キャンセル" + upload: "PCからドライブにファイルをアップロード" + mk-nav-home-widget: about: "Misskeyについて" stats: "統計" diff --git a/src/web/app/desktop/router.js b/src/web/app/desktop/router.js index 0fe44a578..104b9bbe5 100644 --- a/src/web/app/desktop/router.js +++ b/src/web/app/desktop/router.js @@ -7,15 +7,17 @@ const route = require('page'); let page = null; export default me => { - route('/', index); - route('/selectdrive', selectDrive); - route('/i>mentions', mentions); - route('/post::post', post); - route('/search::query', search); - route('/:user', user.bind(null, 'home')); - route('/:user/graphs', user.bind(null, 'graphs')); - route('/:user/:post', post); - route('*', notFound); + route('/', index); + route('/selectdrive', selectDrive); + route('/i/drive', drive); + route('/i/drive/folder/:folder', drive); + route('/i/mentions', mentions); + route('/post::post', post); + route('/search::query', search); + route('/:user', user.bind(null, 'home')); + route('/:user/graphs', user.bind(null, 'graphs')); + route('/:user/:post', post); + route('*', notFound); function index() { me ? home() : entrance(); @@ -59,6 +61,12 @@ export default me => { mount(document.createElement('mk-selectdrive-page')); } + function drive(ctx) { + const el = document.createElement('mk-drive-page'); + if (ctx.params.folder) el.setAttribute('folder', ctx.params.folder); + mount(el); + } + function notFound() { mount(document.createElement('mk-not-found')); } diff --git a/src/web/app/desktop/tags/drive/browser.tag b/src/web/app/desktop/tags/drive/browser.tag index 93db0a04d..be16a782d 100644 --- a/src/web/app/desktop/tags/drive/browser.tag +++ b/src/web/app/desktop/tags/drive/browser.tag @@ -2,7 +2,8 @@