Skip to content

Commit

Permalink
Use consistent media types in UI Components editors (openhab#843)
Browse files Browse the repository at this point in the history
Signed-off-by: Yannick Schaus <[email protected]>
Signed-off-by: Brian Homeyer <[email protected]>
  • Loading branch information
ghys authored and bigbasec committed Jan 28, 2021
1 parent 1b71f2c commit b8e2d0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit b8e2d0a

Please sign in to comment.