diff options
author | Marius David Wieschollek <passwords.public@mdns.eu> | 2020-02-29 18:36:57 +0300 |
---|---|---|
committer | Marius David Wieschollek <passwords.public@mdns.eu> | 2020-02-29 18:36:57 +0300 |
commit | 201c6f2d7a723b17a8bab2309932a420e3c94397 (patch) | |
tree | 85f16de4b142fa026bfd8fea044e826f2f0f5235 /src/vue/Components/Theming/PreviewTheme.vue | |
parent | aa19c1befd5d5cca49483049f1c6af7fb56e9a3c (diff) |
Added theme preview window
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
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 |