Skip to content

Commit

Permalink
Fix oh-clock context in clock card (#2146)
Browse files Browse the repository at this point in the history
This PR fixes an error in the context definition of the `oh-clock` used
in the `oh-clock` card that was causing the clock cards to fail to
render in the updated configuration definition.

See the forum discussion:
https://community.openhab.org/t/oh4-oh-clock-card-empty-since-oh4-1-m2/150518

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
  • Loading branch information
JustinGeorgi authored Oct 22, 2023
1 parent bf377d3 commit 335d149
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<f7-card-content @click.native="performAction" class="clock-card-content text-align-center">
<f7-row v-if="config.showDate && config.datePos !== 'below'">
<f7-col>
<oh-clock :context="{ component: 'oh-clock', config: {} }" :style="{ 'font-size': config.dateFontSize || '1vw', 'font-weight': config.dateFontWeight || 'normal' }" :format="config.dateFormat" />
<oh-clock :context="{ component: { component: 'oh-clock', config: {} }}" :style="{ 'font-size': config.dateFontSize || '1vw', 'font-weight': config.dateFontWeight || 'normal' }" :format="config.dateFormat" />
</f7-col>
</f7-row>
<f7-row>
<f7-col>
<oh-clock :context="{ component: 'oh-clock', config: {} }" :style="{ 'font-size': config.timeFontSize || '2vw', 'font-weight': config.timeFontWeight || 'normal' }" :format="config.timeFormat" />
<oh-clock :context="{ component: { component: 'oh-clock', config: {} }}" :style="{ 'font-size': config.timeFontSize || '2vw', 'font-weight': config.timeFontWeight || 'normal' }" :format="config.timeFormat" />
</f7-col>
</f7-row>
<f7-row v-if="config.showDate && config.datePos === 'below'">
<f7-col>
<oh-clock :context="{ component: 'oh-clock', config: {} }" :style="{ 'font-size': config.dateFontSize || '1vw', 'font-weight': config.dateFontWeight || 'normal' }" :format="config.dateFormat" />
<oh-clock :context="{ component: { component: 'oh-clock', config: {} }}" :style="{ 'font-size': config.dateFontSize || '1vw', 'font-weight': config.dateFontWeight || 'normal' }" :format="config.dateFormat" />
</f7-col>
</f7-row>
</f7-card-content>
Expand Down

0 comments on commit 335d149

Please sign in to comment.