diff options
Diffstat (limited to 'src/vue/Components/Theming/PreviewTheme.vue')
-rw-r--r-- | src/vue/Components/Theming/PreviewTheme.vue | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/vue/Components/Theming/PreviewTheme.vue b/src/vue/Components/Theming/PreviewTheme.vue new file mode 100644 index 0000000..be3f210 --- /dev/null +++ b/src/vue/Components/Theming/PreviewTheme.vue @@ -0,0 +1,36 @@ +<template> + <iframe :src="url" class="theme-preview"/> +</template> + +<script> + export default { + props: { + theme: { + type: String + } + }, + + data() { + return { + url: 'about:blank' + }; + }, + + mounted() { + this.url = 'preview.html'; + }, + + watch: { + theme(value, oldValue) { + if(oldValue !== null) this.$el.contentWindow.location.reload(); + } + } + }; +</script> + +<style lang="scss"> + .theme-preview { + height : 360px; + border : 1px solid var(--element-hover-bg-color); + } +</style>
\ No newline at end of file |