mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 08:13: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>
|
<template>
|
||||||
<div class="mk-media-image-dialog">
|
<div class="dkjvrdxtkvqrwmhfickhndpmnncsgacq">
|
||||||
<div class="bg" @click="close"></div>
|
<div class="bg" @click="close"></div>
|
||||||
<img :src="image.url" :alt="image.name" :title="image.name" @click="close"/>
|
<img :src="image.url" :alt="image.name" :title="image.name" @click="close"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,7 +34,7 @@ export default Vue.extend({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-media-image-dialog
|
.dkjvrdxtkvqrwmhfickhndpmnncsgacq
|
||||||
display block
|
display block
|
||||||
position fixed
|
position fixed
|
||||||
z-index 2048
|
z-index 2048
|
|
@ -10,7 +10,6 @@ import window from './window.vue';
|
||||||
import noteFormWindow from './post-form-window.vue';
|
import noteFormWindow from './post-form-window.vue';
|
||||||
import renoteFormWindow from './renote-form-window.vue';
|
import renoteFormWindow from './renote-form-window.vue';
|
||||||
import mediaImage from './media-image.vue';
|
import mediaImage from './media-image.vue';
|
||||||
import mediaImageDialog from './media-image-dialog.vue';
|
|
||||||
import mediaVideo from './media-video.vue';
|
import mediaVideo from './media-video.vue';
|
||||||
import notifications from './notifications.vue';
|
import notifications from './notifications.vue';
|
||||||
import noteForm from './post-form.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-post-form-window', noteFormWindow);
|
||||||
Vue.component('mk-renote-form-window', renoteFormWindow);
|
Vue.component('mk-renote-form-window', renoteFormWindow);
|
||||||
Vue.component('mk-media-image', mediaImage);
|
Vue.component('mk-media-image', mediaImage);
|
||||||
Vue.component('mk-media-image-dialog', mediaImageDialog);
|
|
||||||
Vue.component('mk-media-video', mediaVideo);
|
Vue.component('mk-media-video', mediaVideo);
|
||||||
Vue.component('mk-notifications', notifications);
|
Vue.component('mk-notifications', notifications);
|
||||||
Vue.component('mk-post-form', noteForm);
|
Vue.component('mk-post-form', noteForm);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import MkMediaImageDialog from './media-image-dialog.vue';
|
import ImageViewer from '../../../common/views/components/image-viewer.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -58,7 +58,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onClick() {
|
onClick() {
|
||||||
(this as any).os.new(MkMediaImageDialog, {
|
(this as any).os.new(ImageViewer, {
|
||||||
image: this.image
|
image: this.image
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
<span>%i18n:@click-to-show%</span>
|
<span>%i18n:@click-to-show%</span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import ImageViewer from '../../../common/views/components/image-viewer.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -41,6 +42,13 @@ export default Vue.extend({
|
||||||
'background-image': url
|
'background-image': url
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onClick() {
|
||||||
|
(this as any).os.new(ImageViewer, {
|
||||||
|
image: this.image
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue