summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-12-14 12:32:23 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-12-14 12:32:23 +0900
commitd408d19f72e0ac930e55d8383fecc0109f8afced (patch)
tree816b256f72ff6509a052972a527db1db5edfdff9 /src
parentMerge branches 'master' and 'master' of https://github.com/syuilo/misskey (diff)
downloadsharkey-d408d19f72e0ac930e55d8383fecc0109f8afced.tar.gz
sharkey-d408d19f72e0ac930e55d8383fecc0109f8afced.tar.bz2
sharkey-d408d19f72e0ac930e55d8383fecc0109f8afced.zip
Refactor
Diffstat (limited to 'src')
-rw-r--r--src/web/app/desktop/tags/image-dialog.tag61
-rw-r--r--src/web/app/desktop/tags/images.tag62
-rw-r--r--src/web/app/desktop/tags/index.ts1
3 files changed, 62 insertions, 62 deletions
diff --git a/src/web/app/desktop/tags/image-dialog.tag b/src/web/app/desktop/tags/image-dialog.tag
deleted file mode 100644
index 39d16ca139..0000000000
--- a/src/web/app/desktop/tags/image-dialog.tag
+++ /dev/null
@@ -1,61 +0,0 @@
-<mk-image-dialog>
- <div class="bg" ref="bg" onclick={ close }></div><img ref="img" src={ image.url } alt={ image.name } title={ image.name } onclick={ close }/>
- <style>
- :scope
- display block
- position fixed
- z-index 2048
- top 0
- left 0
- width 100%
- height 100%
- opacity 0
-
- > .bg
- display block
- position fixed
- z-index 1
- top 0
- left 0
- width 100%
- height 100%
- background rgba(0, 0, 0, 0.7)
-
- > img
- position fixed
- z-index 2
- top 0
- right 0
- bottom 0
- left 0
- max-width 100%
- max-height 100%
- margin auto
- cursor zoom-out
-
- </style>
- <script>
- import anime from 'animejs';
-
- this.image = this.opts.image;
-
- this.on('mount', () => {
- anime({
- targets: this.root,
- opacity: 1,
- duration: 100,
- easing: 'linear'
- });
- });
-
- this.close = () => {
- anime({
- targets: this.root,
- opacity: 0,
- duration: 100,
- easing: 'linear',
- complete: () => this.unmount()
- });
- };
- </script>
-</mk-image-dialog>
diff --git a/src/web/app/desktop/tags/images.tag b/src/web/app/desktop/tags/images.tag
index 29540747f8..0cd408576f 100644
--- a/src/web/app/desktop/tags/images.tag
+++ b/src/web/app/desktop/tags/images.tag
@@ -108,3 +108,65 @@
};
</script>
</mk-images-image>
+
+<mk-image-dialog>
+ <div class="bg" ref="bg" onclick={ close }></div><img ref="img" src={ image.url } alt={ image.name } title={ image.name } onclick={ close }/>
+ <style>
+ :scope
+ display block
+ position fixed
+ z-index 2048
+ top 0
+ left 0
+ width 100%
+ height 100%
+ opacity 0
+
+ > .bg
+ display block
+ position fixed
+ z-index 1
+ top 0
+ left 0
+ width 100%
+ height 100%
+ background rgba(0, 0, 0, 0.7)
+
+ > img
+ position fixed
+ z-index 2
+ top 0
+ right 0
+ bottom 0
+ left 0
+ max-width 100%
+ max-height 100%
+ margin auto
+ cursor zoom-out
+
+ </style>
+ <script>
+ import anime from 'animejs';
+
+ this.image = this.opts.image;
+
+ this.on('mount', () => {
+ anime({
+ targets: this.root,
+ opacity: 1,
+ duration: 100,
+ easing: 'linear'
+ });
+ });
+
+ this.close = () => {
+ anime({
+ targets: this.root,
+ opacity: 0,
+ duration: 100,
+ easing: 'linear',
+ complete: () => this.unmount()
+ });
+ };
+ </script>
+</mk-image-dialog>
diff --git a/src/web/app/desktop/tags/index.ts b/src/web/app/desktop/tags/index.ts
index 30a13b584d..4edda83534 100644
--- a/src/web/app/desktop/tags/index.ts
+++ b/src/web/app/desktop/tags/index.ts
@@ -77,7 +77,6 @@ require('./set-banner-suggestion.tag');
require('./repost-form.tag');
require('./sub-post-content.tag');
require('./images.tag');
-require('./image-dialog.tag');
require('./donation.tag');
require('./users-list.tag');
require('./user-following.tag');