Add mobile-specific flower count configuration for Earth Day [skip ci]

This commit is contained in:
CodeDevMLH
2026-02-28 14:11:45 +01:00
parent 3dffd847de
commit c684651cef
3 changed files with 14 additions and 5 deletions

View File

@@ -160,6 +160,7 @@ public class ChristmasOptions {
public class EarthDayOptions {
public bool EnableEarthDay { get; set; } = true;
public int FlowersCount { get; set; } = 60;
public int FlowersCountMobile { get; set; } = 20;
}
public class EasterOptions {

View File

@@ -125,8 +125,6 @@
<!-- Advanced Tab -->
<div id="seasonals-advanced" class="seasonals-tab-content" style="display: none;">
<h2 class="sectionTitle">Configure specific settings for each seasonal theme</h2>
<!-- <p>All symbol count settings add this number in addition to the standard 12 symbols (if additional symbols is enabled).</p> -->
<p>All symbol count settings add this number in addition to the standard 12 symbols (if additional symbols is enabled).</p>
<details>
<summary>Autumn</summary>
<div class="checkboxContainer checkboxContainer-withDescription">
@@ -735,6 +733,11 @@
<input is="emby-input" type="number" id="EarthDayFlowersCount" name="EarthDayFlowersCount" />
<div class="fieldDescription">Number of flowers in the lawn.</div>
</div>
<div class="inputContainer">
<label class="inputLabel" for="EarthDayFlowersCountMobile">Flowers Count (Mobile)</label>
<input is="emby-input" type="number" id="EarthDayFlowersCountMobile" name="EarthDayFlowersCountMobile" />
<div class="fieldDescription">Number of flowers on mobile devices.</div>
</div>
</details>
<hr style="max-width: 800px; margin: 1em 0;">
@@ -1664,7 +1667,8 @@
// EarthDay
document.querySelector('#EnableEarthDay').checked = config.EarthDay.EnableEarthDay;
document.querySelector('#EarthDayFlowersCount').value = config.EarthDay.FlowersCount;
document.querySelector('#EarthDayFlowersCount').value = config.EarthDay.FlowersCount !== undefined ? config.EarthDay.FlowersCount : 60;
document.querySelector('#EarthDayFlowersCountMobile').value = config.EarthDay.FlowersCountMobile !== undefined ? config.EarthDay.FlowersCountMobile : 20;
// Easter
@@ -2044,6 +2048,7 @@
// Earth Day
config.EarthDay.EnableEarthDay = document.querySelector('#EnableEarthDay').checked;
config.EarthDay.FlowersCount = parseInt(document.querySelector('#EarthDayFlowersCount').value);
config.EarthDay.FlowersCountMobile = parseInt(document.querySelector('#EarthDayFlowersCountMobile').value);
// Eurovision
config.Eurovision.EnableEurovision = document.querySelector('#EnableEurovision').checked;
@@ -2167,6 +2172,7 @@
// Earth Day
config.EarthDay.EnableEarthDay = document.querySelector('#EnableEarthDay').checked;
config.EarthDay.FlowersCount = parseInt(document.querySelector('#EarthDayFlowersCount').value);
config.EarthDay.FlowersCountMobile = parseInt(document.querySelector('#EarthDayFlowersCountMobile').value);
// Eurovision (second pass - deduplicated)
config.Eurovision.EnableEurovision = document.querySelector('#EnableEurovision').checked;