Skip to content

Commit

Permalink
Elements: Weather PR refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenberttpingol committed Jul 20, 2023
1 parent 3e237ef commit ec8d489
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions modules/templates/forecast-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,22 @@ if (meta && meta.hasOwnProperty('Attribution')) {
<thumbnail>weather-condition-bg-image</thumbnail>
<startWidth>480</startWidth>
<startHeight>600</startHeight>
<properties>
<property id="roundBorder" type="checkbox">
<title>Round Border</title>
<default>0</default>
<helpText>Should the square have rounded corners?</helpText>
</property>
<property id="borderRadius" type="number">
<title>Border Radius</title>
<default>20</default>
<visibility>
<test type="and">
<condition field="roundBorder" type="eq">1</condition>
</test>
</visibility>
</property>
</properties>
<stencil>
<hbs><![CDATA[
{{#if data.icon}}
Expand Down Expand Up @@ -309,6 +325,9 @@ if (meta && meta.hasOwnProperty('Attribution')) {
left: 0;
top: 0;
z-index: -1;
{{#if roundBorder}}
{{#if borderRadius}}border-radius: {{borderRadius}}px;{{/if}}
{{/if}}
}
{{else}}
.bg-cloudy, .bg-partly-cloudy-day, .bg-clear-day, .bg-fog, .bg-sleet, .bg-clear-night, .bg-partly-cloudy-night, .bg-rain, .bg-snow, .bg-wind {
Expand Down
2 changes: 1 addition & 1 deletion modules/templates/global-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<title>Date</title>
<default></default>
</property>
<property id="dateFormat" type="text" variant="dateFormat">
<property id="dateFormat" type="text">
<title>Date Format</title>
<default>DD/MM/YYYY HH:mm:ss</default>
</property>
Expand Down

0 comments on commit ec8d489

Please sign in to comment.