summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-14 01:21:28 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-14 01:21:28 +0900
commit52eed29cd0d3b0c1c87bc893b22bbd25eda43a47 (patch)
treea437b829a0c9993e73211ccb43f89b5a19e5bc01 /src/web
parent:art: (diff)
downloadmisskey-52eed29cd0d3b0c1c87bc893b22bbd25eda43a47.tar.gz
misskey-52eed29cd0d3b0c1c87bc893b22bbd25eda43a47.tar.bz2
misskey-52eed29cd0d3b0c1c87bc893b22bbd25eda43a47.zip
ドライブウィンドウもポップアウトできるように
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/desktop/tags/drive/browser-window.tag15
-rw-r--r--src/web/app/desktop/tags/window.tag5
2 files changed, 16 insertions, 4 deletions
diff --git a/src/web/app/desktop/tags/drive/browser-window.tag b/src/web/app/desktop/tags/drive/browser-window.tag
index dc55371da6..b5f368f1f4 100644
--- a/src/web/app/desktop/tags/drive/browser-window.tag
+++ b/src/web/app/desktop/tags/drive/browser-window.tag
@@ -1,11 +1,11 @@
<mk-drive-browser-window>
- <mk-window ref="window" is-modal={ false } width={ '800px' } height={ '500px' }>
+ <mk-window ref="window" is-modal={ false } width={ '800px' } height={ '500px' } popout={ popout }>
<yield to="header">
<p class="info" if={ parent.usage }><b>{ parent.usage.toFixed(1) }%</b> %i18n:desktop.tags.mk-drive-browser-window.used%</p>
<i class="fa fa-cloud"></i>%i18n:desktop.tags.mk-drive-browser-window.drive%
</yield>
<yield to="content">
- <mk-drive-browser multiple={ true } folder={ parent.folder }/>
+ <mk-drive-browser multiple={ true } folder={ parent.folder } ref="browser"/>
</yield>
</mk-window>
<style>
@@ -28,10 +28,21 @@
</style>
<script>
+ import CONFIG from '../../../common/scripts/config';
+
this.mixin('api');
this.folder = this.opts.folder ? this.opts.folder : null;
+ this.popout = () => {
+ const folder = this.refs.window.refs.browser.folder;
+ if (folder) {
+ return `${CONFIG.url}/i/drive/folder/${folder.id}`;
+ } else {
+ return `${CONFIG.url}/i/drive`;
+ }
+ };
+
this.on('mount', () => {
this.refs.window.on('closed', () => {
this.unmount();
diff --git a/src/web/app/desktop/tags/window.tag b/src/web/app/desktop/tags/window.tag
index d7b6326829..ef77b70536 100644
--- a/src/web/app/desktop/tags/window.tag
+++ b/src/web/app/desktop/tags/window.tag
@@ -268,8 +268,9 @@
const x = window.screenX + position.left;
const y = window.screenY + position.top;
- window.open(this.popoutUrl,
- this.popoutUrl,
+ const url = typeof this.popoutUrl == 'function' ? this.popoutUrl() : this.popoutUrl;
+
+ window.open(url, url,
`height=${height},width=${width},left=${x},top=${y}`);
this.close();