Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b4434c51c | ||
|
|
dd6583c055 | ||
|
|
a0b0514159 | ||
|
|
e977c83e8f | ||
|
|
e281f5c579 | ||
|
|
e6b646e478 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,4 +5,5 @@ obj/
|
|||||||
artifacts
|
artifacts
|
||||||
|
|
||||||
test-site.html
|
test-site.html
|
||||||
|
test-site-new.html
|
||||||
RELEASE_GUIDE.md
|
RELEASE_GUIDE.md
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||||
<Title>Jellyfin Seasonals Plugin</Title>
|
<Title>Jellyfin Seasonals Plugin</Title>
|
||||||
<Authors>CodeDevMLH</Authors>
|
<Authors>CodeDevMLH</Authors>
|
||||||
<Version>1.6.0.0</Version>
|
<Version>1.6.2.0</Version>
|
||||||
<RepositoryUrl>https://github.com/CodeDevMLH/Jellyfin-Seasonals</RepositoryUrl>
|
<RepositoryUrl>https://github.com/CodeDevMLH/Jellyfin-Seasonals</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -265,63 +265,36 @@ function createSettingsPopup(anchorElement) {
|
|||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
zIndex: '10000',
|
zIndex: '10000',
|
||||||
backgroundColor: '#202020',
|
backgroundColor: '#202020',
|
||||||
padding: '1em',
|
padding: '1.5em',
|
||||||
borderRadius: '4px',
|
borderRadius: '1em',
|
||||||
boxShadow: '0 0 20px rgba(0,0,0,0.5)',
|
boxShadow: '0 0 20px rgba(0,0,0,0.5)',
|
||||||
minWidth: '200px',
|
minWidth: '250px',
|
||||||
color: '#fff'
|
color: '#fff',
|
||||||
|
maxWidth: '300px'
|
||||||
});
|
});
|
||||||
|
|
||||||
const rect = anchorElement.getBoundingClientRect();
|
const rect = anchorElement.getBoundingClientRect();
|
||||||
popup.style.top = `${rect.bottom + 10}px`;
|
popup.style.top = `${rect.bottom + 10}px`;
|
||||||
popup.style.right = `${window.innerWidth - rect.right}px`;
|
popup.style.right = `${window.innerWidth - rect.right}px`;
|
||||||
|
|
||||||
const enabledContainer = document.createElement('div');
|
popup.innerHTML = `
|
||||||
enabledContainer.style.marginBottom = '1em';
|
<div class="checkboxContainer checkboxContainer-withDescription" style="margin-bottom: 1.5em;">
|
||||||
enabledContainer.style.display = 'flex';
|
<label class="emby-checkbox-label">
|
||||||
enabledContainer.style.alignItems = 'center';
|
<input id="seasonal-enable-toggle" type="checkbox" is="emby-checkbox" class="emby-checkbox" />
|
||||||
enabledContainer.style.justifyContent = 'space-between';
|
<span class="checkboxLabel">Enable Seasonals</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
const enabledLabel = document.createElement('label');
|
<div class="selectContainer">
|
||||||
enabledLabel.textContent = 'Enable Seasonals';
|
<label class="selectLabel" for="seasonal-theme-select" style="margin-bottom: 0.5em; display: block; color: inherit;">Force Theme</label>
|
||||||
enabledLabel.style.marginRight = '10px';
|
<select is="emby-select" id="seasonal-theme-select" class="emby-select-withcolor emby-select" style="width: 100%; padding: 0.5em; background-color: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); color: inherit; border-radius: 4px;">
|
||||||
|
<option value="auto">Auto (Date Based)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
const enabledCheckbox = document.createElement('input');
|
// Populate Select Options
|
||||||
enabledCheckbox.type = 'checkbox';
|
const themeSelect = popup.querySelector('#seasonal-theme-select');
|
||||||
enabledCheckbox.checked = getSavedSetting('seasonals-enabled', 'true') === 'true';
|
|
||||||
enabledCheckbox.addEventListener('change', (e) => {
|
|
||||||
setSavedSetting('seasonals-enabled', e.target.checked);
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
enabledContainer.appendChild(enabledLabel);
|
|
||||||
enabledContainer.appendChild(enabledCheckbox);
|
|
||||||
popup.appendChild(enabledContainer);
|
|
||||||
|
|
||||||
// Theme Selector
|
|
||||||
const themeContainer = document.createElement('div');
|
|
||||||
themeContainer.style.display = 'flex';
|
|
||||||
themeContainer.style.flexDirection = 'column';
|
|
||||||
|
|
||||||
const themeLabel = document.createElement('label');
|
|
||||||
themeLabel.textContent = 'Force Theme';
|
|
||||||
themeLabel.style.marginBottom = '0.5em';
|
|
||||||
|
|
||||||
const themeSelect = document.createElement('select');
|
|
||||||
themeSelect.style.width = '100%';
|
|
||||||
themeSelect.style.padding = '0.5em';
|
|
||||||
themeSelect.style.backgroundColor = '#333';
|
|
||||||
themeSelect.style.color = '#fff';
|
|
||||||
themeSelect.style.border = '1px solid #444';
|
|
||||||
themeSelect.style.borderRadius = '4px';
|
|
||||||
|
|
||||||
// Add Auto option
|
|
||||||
const autoOption = document.createElement('option');
|
|
||||||
autoOption.value = 'auto';
|
|
||||||
autoOption.textContent = 'Auto (Date Based)';
|
|
||||||
themeSelect.appendChild(autoOption);
|
|
||||||
|
|
||||||
// Add available themes
|
|
||||||
Object.keys(themeConfigs).forEach(key => {
|
Object.keys(themeConfigs).forEach(key => {
|
||||||
if (key === 'none') return;
|
if (key === 'none') return;
|
||||||
const option = document.createElement('option');
|
const option = document.createElement('option');
|
||||||
@@ -331,18 +304,23 @@ function createSettingsPopup(anchorElement) {
|
|||||||
themeSelect.appendChild(option);
|
themeSelect.appendChild(option);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set current value
|
// Set Initial Values
|
||||||
|
const enabledCheckbox = popup.querySelector('#seasonal-enable-toggle');
|
||||||
|
enabledCheckbox.checked = getSavedSetting('seasonals-enabled', 'true') === 'true';
|
||||||
|
|
||||||
themeSelect.value = getSavedSetting('seasonals-theme', 'auto');
|
themeSelect.value = getSavedSetting('seasonals-theme', 'auto');
|
||||||
|
|
||||||
|
// Event Listeners
|
||||||
|
enabledCheckbox.addEventListener('change', (e) => {
|
||||||
|
setSavedSetting('seasonals-enabled', e.target.checked);
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
themeSelect.addEventListener('change', (e) => {
|
themeSelect.addEventListener('change', (e) => {
|
||||||
setSavedSetting('seasonals-theme', e.target.value);
|
setSavedSetting('seasonals-theme', e.target.value);
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
themeContainer.appendChild(themeLabel);
|
|
||||||
themeContainer.appendChild(themeSelect);
|
|
||||||
popup.appendChild(themeContainer);
|
|
||||||
|
|
||||||
// Close on click outside
|
// Close on click outside
|
||||||
const closeHandler = (e) => {
|
const closeHandler = (e) => {
|
||||||
if (!popup.contains(e.target) && e.target !== anchorElement && !anchorElement.contains(e.target)) {
|
if (!popup.contains(e.target) && e.target !== anchorElement && !anchorElement.contains(e.target)) {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/raw/branch/main/logo.png",
|
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/raw/branch/main/logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"version": "1.6.0.0",
|
"version": "1.6.2.0",
|
||||||
"changelog": "- feat: Add client-side toggle option for seasonal settings",
|
"changelog": "- feat: Add client-side toggle option for seasonal settings",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.6.0.0/Jellyfin.Plugin.Seasonals.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.6.2.0/Jellyfin.Plugin.Seasonals.zip",
|
||||||
"checksum": "9b66d6f1c03b284ac9fe7e87540f7759",
|
"checksum": "22e876cf0a20118e14f8e2a2c35bdd50",
|
||||||
"timestamp": "2026-02-03T17:49:05Z"
|
"timestamp": "2026-02-03T18:18:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.5.1.0",
|
"version": "1.5.1.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user