mirror of
https://github.com/thelounge/thelounge
synced 2024-12-03 09:19:14 +00:00
22 lines
408 B
Vue
22 lines
408 B
Vue
<template>
|
|
<button
|
|
v-if="link.type !== 'loading'"
|
|
:class="['toggle-button', 'toggle-preview', { opened: link.shown }]"
|
|
@click="onClick" />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "LinkPreviewToggle",
|
|
props: {
|
|
link: Object,
|
|
},
|
|
methods: {
|
|
onClick() {
|
|
this.link.shown = !this.link.shown;
|
|
|
|
this.$parent.$emit("linkPreviewToggle", this.link, this.$parent.message);
|
|
},
|
|
},
|
|
};
|
|
</script>
|