summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/views
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-08 02:09:15 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-08 02:09:15 +0900
commit3261d54cd34468f3ddbf555fd79b199ba90b131f (patch)
tree6c61adf312c0b65d0eeb3293f7c7f259a18e44ee /src/client/app/desktop/views
parentFix bug (diff)
downloadmisskey-3261d54cd34468f3ddbf555fd79b199ba90b131f.tar.gz
misskey-3261d54cd34468f3ddbf555fd79b199ba90b131f.tar.bz2
misskey-3261d54cd34468f3ddbf555fd79b199ba90b131f.zip
Resolve #2320
Diffstat (limited to 'src/client/app/desktop/views')
-rw-r--r--src/client/app/desktop/views/components/index.ts2
-rw-r--r--src/client/app/desktop/views/components/media-image-dialog.vue69
-rw-r--r--src/client/app/desktop/views/components/media-image.vue4
3 files changed, 2 insertions, 73 deletions
diff --git a/src/client/app/desktop/views/components/index.ts b/src/client/app/desktop/views/components/index.ts
index 38b1547448..ff4e845f62 100644
--- a/src/client/app/desktop/views/components/index.ts
+++ b/src/client/app/desktop/views/components/index.ts
@@ -10,7 +10,6 @@ import window from './window.vue';
import noteFormWindow from './post-form-window.vue';
import renoteFormWindow from './renote-form-window.vue';
import mediaImage from './media-image.vue';
-import mediaImageDialog from './media-image-dialog.vue';
import mediaVideo from './media-video.vue';
import notifications from './notifications.vue';
import noteForm from './post-form.vue';
@@ -39,7 +38,6 @@ Vue.component('mk-window', window);
Vue.component('mk-post-form-window', noteFormWindow);
Vue.component('mk-renote-form-window', renoteFormWindow);
Vue.component('mk-media-image', mediaImage);
-Vue.component('mk-media-image-dialog', mediaImageDialog);
Vue.component('mk-media-video', mediaVideo);
Vue.component('mk-notifications', notifications);
Vue.component('mk-post-form', noteForm);
diff --git a/src/client/app/desktop/views/components/media-image-dialog.vue b/src/client/app/desktop/views/components/media-image-dialog.vue
deleted file mode 100644
index 89a340d3ae..0000000000
--- a/src/client/app/desktop/views/components/media-image-dialog.vue
+++ /dev/null
@@ -1,69 +0,0 @@
-<template>
-<div class="mk-media-image-dialog">
- <div class="bg" @click="close"></div>
- <img :src="image.url" :alt="image.name" :title="image.name" @click="close"/>
-</div>
-</template>
-
-<script lang="ts">
-import Vue from 'vue';
-import * as anime from 'animejs';
-
-export default Vue.extend({
- props: ['image'],
- mounted() {
- anime({
- targets: this.$el,
- opacity: 1,
- duration: 100,
- easing: 'linear'
- });
- },
- methods: {
- close() {
- anime({
- targets: this.$el,
- opacity: 0,
- duration: 100,
- easing: 'linear',
- complete: () => this.destroyDom()
- });
- }
- }
-});
-</script>
-
-<style lang="stylus" scoped>
-.mk-media-image-dialog
- 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(#000, 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>
diff --git a/src/client/app/desktop/views/components/media-image.vue b/src/client/app/desktop/views/components/media-image.vue
index 9e1a293336..510fdbc4ee 100644
--- a/src/client/app/desktop/views/components/media-image.vue
+++ b/src/client/app/desktop/views/components/media-image.vue
@@ -17,7 +17,7 @@
<script lang="ts">
import Vue from 'vue';
-import MkMediaImageDialog from './media-image-dialog.vue';
+import ImageViewer from '../../../common/views/components/image-viewer.vue';
export default Vue.extend({
props: {
@@ -58,7 +58,7 @@ export default Vue.extend({
},
onClick() {
- (this as any).os.new(MkMediaImageDialog, {
+ (this as any).os.new(ImageViewer, {
image: this.image
});
}