mirror of https://github.com/Lissy93/dashy.git
⚡ Adds option to specify height of frame widget
This commit is contained in:
parent
83f61bec19
commit
c591a03f66
1861
docs/widgets.md
1861
docs/widgets.md
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="iframe-widget">
|
<div class="iframe-widget">
|
||||||
<iframe v-if="frameUrl" :src="frameUrl" :id="frameId" />
|
<iframe
|
||||||
|
v-if="frameUrl"
|
||||||
|
:src="frameUrl"
|
||||||
|
:id="frameId"
|
||||||
|
:style="frameHeight ? `height: ${frameHeight}px` : ''"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -19,6 +24,9 @@ export default {
|
||||||
}
|
}
|
||||||
return usersChoice;
|
return usersChoice;
|
||||||
},
|
},
|
||||||
|
frameHeight() {
|
||||||
|
return this.options.frameHeight;
|
||||||
|
},
|
||||||
/* Generates an ID for the iframe */
|
/* Generates an ID for the iframe */
|
||||||
frameId() {
|
frameId() {
|
||||||
return `iframe-${btoa(this.frameUrl || 'empty').substring(0, 16)}`;
|
return `iframe-${btoa(this.frameUrl || 'empty').substring(0, 16)}`;
|
||||||
|
|
Loading…
Reference in New Issue