Merge pull request #20 from prayag17/master

Fix set skin for skin having options
This commit is contained in:
Daniel
2020-12-29 23:36:44 +01:00
committed by GitHub
3 changed files with 48 additions and 57 deletions

View File

@@ -212,7 +212,7 @@
return "";
}
html ="";
html += '<div class="tooltip"> 🛈<span class="tooltiptext">'
html += '<div class="tooltip"><span class="material-icons">info</span><span class="tooltiptext">'
html += '<img src="' + option.preview + '">';
html += '</span></div>'
return html;
@@ -382,48 +382,43 @@
Dashboard.processPluginConfigurationUpdateResult(res);});
});
}
function getValue(option){
var result = "";
switch(option.type){
case "checkBox":
document.getElementsByClassName("checkbox emby-checkbox").forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.checked?"true":"false";
}
})
case "number":
document.getElementsByClassName("number emby-input").forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.value;
}
})
case "colorPicker":
document.getElementsByClassName("color").forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.value;
}
})
case "slider":
document.getElementsByClassName("slider").forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.value;
}
})
case "selector":
document.getElementsByClassName("selector emby-select-withcolor emby-select").forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.selectedOptions[0].innerText;;
}
})
}
return result;
}
var result = "";
switch(option.type){
case "checkBox":
Array.from(document.getElementsByClassName("checkbox emby-checkbox")).forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.checked?"true":"false";
}
})
case "number":
Array.from(document.getElementsByClassName("number emby-input")).forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.value;
}
})
case "colorPicker":
Array.from(document.getElementsByClassName("color")).forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.value;
}
})
case "slider":
Array.from(document.getElementsByClassName("slider")).forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.value;
}
})
case "selector":
Array.from(document.getElementsByClassName("selector emby-select-withcolor emby-select")).forEach(element =>{
if(option.css == element.getAttribute("data-css")){
result = element.selectedOptions[0].innerText;;
}
})
}
return result;
}
function checkEasterEggs(){
var d = new Date();
@@ -441,14 +436,7 @@
maxSize: 25
});
});
}
function setSkin() {
saveConfig()
ApiClient.getServerConfiguration().then(function (config) {
@@ -538,6 +526,12 @@
.tooltip:hover .tooltiptext {
visibility: visible;
}
input#favcolor {
width: 100%;
height: 3em !important;
background: none;
border: none;
}
</style>
</div>
</body>

View File

@@ -308,8 +308,9 @@
"mode": "rgba",
"name": "Accent color",
"description": "Choose a custom accent color to use with the theme.",
"css": ".countIndicator {background: rgba($,0.8);}.playedIndicator, .innerCardFooter /*Accenting*/.button-flat:hover {background: rgba($,0.25);}.paper-icon-button-light:hover { background-color: rgba($,0.25) !important;}.subtitleappearance-preview { background: linear-gradient(140deg,rgba($),#111) !important;}.navMenuOption-selected, .selectionCommandsPanel { background: rgba($, 0.8) !important;}.raised,.fab,a[data-role='button'] { background: rgba($, 0.8) !important;transition: all 0.2s !important;} /*Glow accent*/ .raised.homeLibraryButton {box-shadow: 0px 0px 5px rgba($, 0) !important; border: solid 1px rgba($,0) !important;}.cardOverlayContainer:hover,.dialog,..raised.homeLibraryButton:hover { box-shadow: 0px 0px 5px rgb($) !important; border: solid 1px rgba($,0.6) !important;}.cardOverlayContainer { border: solid 1px rgba($,0.0) !important;}"
},
"css": ".countIndicator {background: rgba($,0.8);}.playedIndicator, .innerCardFooter /*Accenting*/.button-flat:hover {background: rgba($,0.25);}.paper-icon-button-light:hover { background-color: rgba($,0.25) !important;}.subtitleappearance-preview { background: linear-gradient(140deg,rgba($),#111) !important;}.navMenuOption-selected, .selectionCommandsPanel { background: rgba($, 0.8) !important;}.raised,.fab,a[data-role='button'] { background: rgba($, 0.8) !important;transition: all 0.2s !important;} /*Glow accent*/ .raised.homeLibraryButton {box-shadow: 0px 0px 5px rgba($, 0) !important; border: solid 1px rgba($,0) !important;}.cardOverlayContainer:hover,.dialog,..raised.homeLibraryButton:hover { box-shadow: 0px 0px 5px rgb($) !important; border: solid 1px rgba($,0.6) !important;}.cardOverlayContainer { border: solid 1px rgba($,0.0) !important;}",
"default": "#303030"
},
{
"type": "colorPicker",
"mode": "hex",
@@ -341,7 +342,7 @@
"name": "Custom Background Color",
"description": "Change background color.",
"css": ".backgroundContainer, .dialog, html { background-color: $;}",
"default": "#000000"
"default": "rgba(0,0,0,.86)"
}
]
},
@@ -356,17 +357,13 @@
"css": ".headerRight { color: $; }",
"default": "#ffffff"
},
{
"type": "section",
"name": "Buttons"
},
{
"type": "colorPicker",
"mode": "hex",
"name": "Interact Buttons Color",
"description": "This modifies the color of interact buttons.",
"css": ".paper-icon-button-light { color: $ !important; } .paper-icon-button-light:hover:not(:disabled) { color:$ !important; background-color: $ !important; } .paper-icon-button-light:focus:not(:disabled) { color:$ !important; background-color: $ !important; }",
"default": "#00a4dc",
"default": "#ffffff",
"preview": "https://github.com/LambadaCorez/custom_css_jellyfin/blob/master/ui/buttons/colored_interact_buttons/colored_buttons_example3.png?raw=true"
},
{

View File

@@ -9,7 +9,7 @@
<body>
<div class="header" align="center">
<div class="innerHeader nav">
<a href="" class="https://github.com/danieladov/jellyfin-plugin-skin-manager"class="link text"><li>See on Github</li></a>
<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager" class="link text"><li>See on Github</li></a>
<a href="https://github.com/danieladov/jellyfin-plugin-skin-manager/issues" class="link text"><li>Request a skin</li></a>
<a href="https://prayag17.github.io/jellyfin-plugin-skin-manager/src/html/about.html#" class="link text"><li>About</li></a>
<a href="https://jellyfin.org" class="logo link"><li><img src="https://jellyfin.org/images/banner-dark.svg" style="size: 1em;height: 50px;max-width: 80%;float: right;z-index: 1;"></li></a>