Use consistent media types in UI Components editors (#843)

Signed-off-by: Yannick Schaus <github@schaus.net>
pull/853/head
Yannick Schaus 2021-01-25 02:09:00 +01:00 committed by GitHub
parent 0426ad89a7
commit b1587bc66a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@
<f7-block v-else :key="blockKey + 'b'" class="widget-editor vertical">
<f7-row resizable>
<f7-col resizable style="min-width: 20px" class="widget-code">
<editor class="widget-component-editor" mode="application/vnd.openhab.uicomponent-definition+yaml?type=widget" :value="widgetDefinition" @input="(value) => widgetDefinition = value" />
<editor class="widget-component-editor" mode="application/vnd.openhab.uicomponent+yaml?type=widget" :value="widgetDefinition" @input="(value) => widgetDefinition = value" />
</f7-col>
<f7-col v-if="ready" resizable style="min-width: 20px" class="widget-preview padding-right margin-bottom">
<generic-widget-component :key="widgetKey" :context="context" @command="onCommand" />

View File

@ -31,7 +31,7 @@
/>
</f7-tab>
<f7-tab id="code" @tab:show="() => { this.currentTab = 'code' }" :tab-active="currentTab === 'code'">
<editor v-if="currentTab === 'code'" :style="{ opacity: previewMode ? '0' : '' }" class="page-code-editor" mode="application/vnd.openhab.uicomponent-definition+yaml?type=layout" :value="pageYaml" @input="(value) => pageYaml = value" />
<editor v-if="currentTab === 'code'" :style="{ opacity: previewMode ? '0' : '' }" class="page-code-editor" mode="application/vnd.openhab.uicomponent+yaml?type=layout" :value="pageYaml" @input="(value) => pageYaml = value" />
<!-- <pre class="yaml-message padding-horizontal" :class="[yamlError === 'OK' ? 'text-color-green' : 'text-color-red']">{{yamlError}}</pre> -->
<oh-layout-page class="layout-page" v-if="ready && previewMode" :context="context" :key="pageKey" />

View File

@ -61,7 +61,7 @@
</f7-tab>
<f7-tab id="code" @tab:show="() => { this.currentTab = 'code' }" :tab-active="currentTab === 'code'">
<editor v-if="currentTab === 'code'" class="page-code-editor" mode="text/x-yaml" :value="pageYaml" @input="(value) => pageYaml = value" />
<editor v-if="currentTab === 'code'" class="page-code-editor" mode="application/vnd.openhab.uicomponent+yaml;type=tabs" :value="pageYaml" @input="(value) => pageYaml = value" />
<!-- <pre class="yaml-message padding-horizontal" :class="[yamlError === 'OK' ? 'text-color-green' : 'text-color-red']">{{yamlError}}</pre> -->
</f7-tab>
</f7-tabs>