Refactor birthday, olympia, space, and sports animations; enhance symbol management and visual effects
- Updated birthday.js to improve balloon visuals and confetti effects, including new color schemes and enhanced pop animations. - Removed legacy fallback logic in olympia.js and improved image error handling. - Enhanced space.js with configurable counts for planets, astronauts, satellites, ISS, and rockets; improved shooting star animations and added random image swapping. - Simplified sports.js by removing legacy emoji fallback logic and optimizing ball creation based on selected categories. - Adjusted CSS styles across birthday, olympia, space, and sports for better visual consistency and performance. [skip ci]
This commit is contained in:
@@ -389,6 +389,7 @@ public class SportsOptions
|
||||
public bool EnableDifferentDuration { get; set; } = true;
|
||||
public string TurfColor { get; set; } = "#228b22";
|
||||
public string SportsBalls { get; set; } = "football,basketball,tennis,volleyball";
|
||||
public bool EnableTrophy { get; set; } = false;
|
||||
}
|
||||
|
||||
public class OlympiaOptions
|
||||
@@ -402,7 +403,11 @@ public class OlympiaOptions
|
||||
|
||||
public class SpaceOptions
|
||||
{
|
||||
public int SymbolCount { get; set; } = 25;
|
||||
public int PlanetCount { get; set; } = 12;
|
||||
public int AstronautCount { get; set; } = 5;
|
||||
public int SatelliteCount { get; set; } = 2;
|
||||
public int IssCount { get; set; } = 1;
|
||||
public int RocketCount { get; set; } = 1;
|
||||
public bool EnableSpace { get; set; } = true;
|
||||
public bool EnableRandomSymbols { get; set; } = true;
|
||||
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
||||
@@ -429,7 +434,8 @@ public class UnderwaterOptions
|
||||
|
||||
public class BirthdayOptions
|
||||
{
|
||||
public int SymbolCount { get; set; } = 25;
|
||||
public int SymbolCount { get; set; } = 5;
|
||||
public int ConfettiCount { get; set; } = 60;
|
||||
public bool EnableBirthday { get; set; } = true;
|
||||
public bool EnableRandomSymbols { get; set; } = true;
|
||||
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
||||
|
||||
@@ -70,16 +70,13 @@
|
||||
<option value="carnival">Carnival (Confetti)</option>
|
||||
<option value="cherryblossom">Cherry Blossom</option>
|
||||
<option value="resurrection">Resurrection by Bioflash257</option>
|
||||
<option value="championships" disabled>European/World Championships (not implemented yet. Please commit ideas/implementation in a issue or PR)</option>
|
||||
<option value="patrick" disabled>St. Patrick's Day (not implemented yet. Please commit ideas/implementation in a issue or PR)</option>
|
||||
<option value="thanksgiving" disabled>Thanksgiving (not implemented yet. Please commit ideas/implementation in a issue or PR)</option>
|
||||
<option value="earthday">Earth Day (Growing Vines)</option>
|
||||
<option value="eurovision">Eurovision (Dancing Notes)</option>
|
||||
<option value="oscar">Oscar Awards (Glamour & Flashes)</option>
|
||||
<option value="matrix">Matrix</option>
|
||||
<option value="pride">Pride (Rainbow Border)</option>
|
||||
<option value="rain">Rain (Pure Rain)</option>
|
||||
<option value="storm">Storm (Heavy Rain & Lightning (⚠️Epilepsy Warning))</option>
|
||||
<option value="storm">Storm (Heavy Rain & Lightning (⚠️Epilepsy Warning⚠️))</option>
|
||||
<option value="frost">Frost / Ice</option>
|
||||
<option value="filmnoir">Film-Noir (Classic B&W Cinema)</option>
|
||||
<option value="marioday">Mario Day (March 10)</option>
|
||||
@@ -88,6 +85,8 @@
|
||||
<option value="friday13">Friday the 13th</option>
|
||||
<option value="eidalfitr">Eid al-Fitr (Sugar Feast)</option>
|
||||
<option value="spooky">Spooky</option>
|
||||
<option value="patrick" disabled>St. Patrick's Day (not implemented yet. Please commit ideas/implementation in a issue or PR)</option>
|
||||
<option value="thanksgiving" disabled>Thanksgiving (not implemented yet. Please commit ideas/implementation in a issue or PR)</option>
|
||||
</select>
|
||||
<div class="fieldDescription">The season to display if automation is disabled or no "Auto Selection" rule matches the current date.</div>
|
||||
</div>
|
||||
@@ -935,6 +934,13 @@
|
||||
<span>Enable Different Duration</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="EnableTrophy" name="EnableTrophy" type="checkbox" is="emby-checkbox" />
|
||||
<span>Enable Trophy</span>
|
||||
</label>
|
||||
<div class="fieldDescription">Enable the flying trophy animation.</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="TurfColor">Turf Color</label>
|
||||
<input is="emby-input" type="color" id="TurfColor" name="TurfColor" value="#228b22" />
|
||||
@@ -1054,9 +1060,29 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="SpaceSymbolCount">Symbol Count</label>
|
||||
<input is="emby-input" type="number" id="SpaceSymbolCount" name="SpaceSymbolCount" />
|
||||
<div class="fieldDescription">Number of additional symbols displayed (if enabled).</div>
|
||||
<label class="inputLabel" for="PlanetCount">Planet Count</label>
|
||||
<input is="emby-input" type="number" id="PlanetCount" name="PlanetCount" />
|
||||
<div class="fieldDescription">Number of planets displayed (if enabled).</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="AstronautCount">Astronaut Count</label>
|
||||
<input is="emby-input" type="number" id="AstronautCount" name="AstronautCount" />
|
||||
<div class="fieldDescription">Number of astronauts displayed (if enabled).</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="SatelliteCount">Satellite Count</label>
|
||||
<input is="emby-input" type="number" id="SatelliteCount" name="SatelliteCount" />
|
||||
<div class="fieldDescription">Number of satellites displayed (if enabled).</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="IssCount">ISS Count</label>
|
||||
<input is="emby-input" type="number" id="IssCount" name="IssCount" />
|
||||
<div class="fieldDescription">Number of ISS symbols displayed (if enabled).</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="RocketCount">Rocket Count</label>
|
||||
<input is="emby-input" type="number" id="RocketCount" name="RocketCount" />
|
||||
<div class="fieldDescription">Number of rockets displayed (if enabled).</div>
|
||||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label class="emby-checkbox-label">
|
||||
@@ -1171,6 +1197,11 @@
|
||||
<input is="emby-input" type="number" id="BirthdaySymbolCount" name="BirthdaySymbolCount" />
|
||||
<div class="fieldDescription">Number of additional symbols displayed (if enabled).</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel" for="BirthdayConfettiCount">Confetti Count</label>
|
||||
<input is="emby-input" type="number" id="BirthdayConfettiCount" name="BirthdayConfettiCount" />
|
||||
<div class="fieldDescription">Number of confetti pieces created when a balloon bursts.</div>
|
||||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label class="emby-checkbox-label">
|
||||
<input id="EnableDifferentDurationBirthday" name="EnableDifferentDurationBirthday" type="checkbox" is="emby-checkbox" />
|
||||
@@ -1810,7 +1841,11 @@
|
||||
document.querySelector('#EnableRandomSymbolsSpace').checked = config.Space.EnableRandomSymbols || false;
|
||||
document.querySelector('#EnableRandomSymbolsMobileSpace').checked = config.Space.EnableRandomSymbolsMobile || false;
|
||||
document.querySelector('#EnableDifferentDurationSpace').checked = config.Space.EnableDifferentDuration || false;
|
||||
document.querySelector('#SpaceSymbolCount').value = config.Space.SymbolCount || 25;
|
||||
document.querySelector('#PlanetCount').value = config.Space.PlanetCount !== undefined ? config.Space.PlanetCount : 12;
|
||||
document.querySelector('#AstronautCount').value = config.Space.AstronautCount !== undefined ? config.Space.AstronautCount : 5;
|
||||
document.querySelector('#SatelliteCount').value = config.Space.SatelliteCount !== undefined ? config.Space.SatelliteCount : 2;
|
||||
document.querySelector('#IssCount').value = config.Space.IssCount !== undefined ? config.Space.IssCount : 1;
|
||||
document.querySelector('#RocketCount').value = config.Space.RocketCount !== undefined ? config.Space.RocketCount : 1;
|
||||
|
||||
// Underwater
|
||||
document.querySelector('#EnableUnderwater').checked = config.Underwater.EnableUnderwater || false;
|
||||
@@ -1833,6 +1868,7 @@
|
||||
document.querySelector('#EnableRandomSymbolsMobileBirthday').checked = config.Birthday.EnableRandomSymbolsMobile || false;
|
||||
document.querySelector('#EnableDifferentDurationBirthday').checked = config.Birthday.EnableDifferentDuration || false;
|
||||
document.querySelector('#BirthdaySymbolCount').value = config.Birthday.SymbolCount || 25;
|
||||
document.querySelector('#BirthdayConfettiCount').value = config.Birthday.ConfettiCount || 60;
|
||||
|
||||
// Sports
|
||||
if (!config.Sports) config.Sports = { EnableSports: true, SymbolCount: 25, EnableRandomSymbols: true, EnableRandomSymbolsMobile: false, EnableDifferentDuration: true };
|
||||
@@ -1842,6 +1878,7 @@
|
||||
document.querySelector('#EnableDifferentDurationSports').checked = config.Sports.EnableDifferentDuration !== false;
|
||||
document.querySelector('#SportsSymbolCount').value = config.Sports.SymbolCount || 25;
|
||||
document.querySelector('#TurfColor').value = config.Sports.TurfColor || '#228b22';
|
||||
document.querySelector('#EnableTrophy').checked = config.Sports.EnableTrophy !== false;
|
||||
|
||||
// Load Checkboxes
|
||||
const savedBallsString = config.Sports.SportsBalls || 'football,basketball,tennis,volleyball';
|
||||
@@ -2012,6 +2049,7 @@
|
||||
document.querySelector('#EnableBirthday').checked = config.Birthday.EnableBirthday !== false;
|
||||
document.querySelector('#EnableGarland').checked = config.Birthday.EnableGarland !== false;
|
||||
document.querySelector('#BirthdaySymbolCount').value = config.Birthday.SymbolCount || 25;
|
||||
document.querySelector('#BirthdayConfettiCount').value = config.Birthday.ConfettiCount || 60;
|
||||
document.querySelector('#EnableRandomSymbolsBirthday').checked = config.Birthday.EnableRandomSymbols !== false;
|
||||
document.querySelector('#EnableRandomSymbolsMobileBirthday').checked = config.Birthday.EnableRandomSymbolsMobile === true;
|
||||
document.querySelector('#EnableDifferentDurationBirthday').checked = config.Birthday.EnableDifferentDuration !== false;
|
||||
@@ -2069,6 +2107,7 @@
|
||||
config.Sports.EnableDifferentDuration = document.querySelector('#EnableDifferentDurationSports').checked;
|
||||
config.Sports.SymbolCount = parseInt(document.querySelector('#SportsSymbolCount').value);
|
||||
config.Sports.TurfColor = document.querySelector('#TurfColor').value;
|
||||
config.Sports.EnableTrophy = document.querySelector('#EnableTrophy').checked;
|
||||
|
||||
// Save Checkboxes
|
||||
const selectedBalls = Array.from(document.querySelectorAll('.sport-ball-cb'))
|
||||
@@ -2091,7 +2130,11 @@
|
||||
config.Space.EnableRandomSymbols = document.querySelector('#EnableRandomSymbolsSpace').checked;
|
||||
config.Space.EnableRandomSymbolsMobile = document.querySelector('#EnableRandomSymbolsMobileSpace').checked;
|
||||
config.Space.EnableDifferentDuration = document.querySelector('#EnableDifferentDurationSpace').checked;
|
||||
config.Space.SymbolCount = parseInt(document.querySelector('#SpaceSymbolCount').value);
|
||||
config.Space.PlanetCount = parseInt(document.querySelector('#PlanetCount').value);
|
||||
config.Space.AstronautCount = parseInt(document.querySelector('#AstronautCount').value);
|
||||
config.Space.SatelliteCount = parseInt(document.querySelector('#SatelliteCount').value);
|
||||
config.Space.IssCount = parseInt(document.querySelector('#IssCount').value);
|
||||
config.Space.RocketCount = parseInt(document.querySelector('#RocketCount').value);
|
||||
|
||||
// Underwater
|
||||
if (!config.Underwater) config.Underwater = {};
|
||||
@@ -2117,6 +2160,7 @@
|
||||
config.Birthday.EnableRandomSymbolsMobile = document.querySelector('#EnableRandomSymbolsMobileBirthday').checked;
|
||||
config.Birthday.EnableDifferentDuration = document.querySelector('#EnableDifferentDurationBirthday').checked;
|
||||
config.Birthday.SymbolCount = parseInt(document.querySelector('#BirthdaySymbolCount').value);
|
||||
config.Birthday.ConfettiCount = parseInt(document.querySelector('#BirthdayConfettiCount').value);
|
||||
|
||||
// Snowflakes
|
||||
config.Snowflakes.SnowflakeCount = parseInt(document.querySelector('#SnowflakesCount').value);
|
||||
@@ -2383,6 +2427,7 @@
|
||||
config.Birthday.EnableBirthday = document.querySelector('#EnableBirthday').checked;
|
||||
config.Birthday.EnableGarland = document.querySelector('#EnableGarland').checked;
|
||||
config.Birthday.SymbolCount = parseInt(document.querySelector('#BirthdaySymbolCount').value);
|
||||
config.Birthday.ConfettiCount = parseInt(document.querySelector('#BirthdayConfettiCount').value);
|
||||
config.Birthday.EnableRandomSymbols = document.querySelector('#EnableRandomSymbolsBirthday').checked;
|
||||
config.Birthday.EnableRandomSymbolsMobile = document.querySelector('#EnableRandomSymbolsMobileBirthday').checked;
|
||||
config.Birthday.EnableDifferentDuration = document.querySelector('#EnableDifferentDurationBirthday').checked;
|
||||
|
||||
Reference in New Issue
Block a user