mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 07:53:09 +02:00
Resolve #2320
This commit is contained in:
parent
e0ec56abb5
commit
3261d54cd3
4 changed files with 13 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="mk-media-image-dialog">
|
||||
<div class="dkjvrdxtkvqrwmhfickhndpmnncsgacq">
|
||||
<div class="bg" @click="close"></div>
|
||||
<img :src="image.url" :alt="image.name" :title="image.name" @click="close"/>
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@ export default Vue.extend({
|
|||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-image-dialog
|
||||
.dkjvrdxtkvqrwmhfickhndpmnncsgacq
|
||||
display block
|
||||
position fixed
|
||||
z-index 2048
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gqnyydlzavusgskkfvwvjiattxdzsqlf" v-else :href="image.url" target="_blank" :style="style" :title="image.name"></a>
|
||||
<a class="gqnyydlzavusgskkfvwvjiattxdzsqlf" v-else :href="image.url" target="_blank" :style="style" :title="image.name" @click.prevent="onClick"></a>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import ImageViewer from '../../../common/views/components/image-viewer.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
|
@ -41,6 +42,13 @@ export default Vue.extend({
|
|||
'background-image': url
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
(this as any).os.new(ImageViewer, {
|
||||
image: this.image
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue