Compare commits
13 Commits
135aca08ab
...
43cbb80eec
Author | SHA1 | Date | |
---|---|---|---|
43cbb80eec | |||
95876f1a53 | |||
42caebf458 | |||
ddee459aa2 | |||
6952bcaa1d | |||
|
4cd06bd0e0 | ||
|
d138094a66 | ||
|
d1dfeadb80 | ||
c315237d64 | |||
|
830252c8a7 | ||
|
54731e74e3 | ||
|
53bb83faca | ||
|
b03918ab5c |
@ -168,6 +168,11 @@ function ChangeStyleSheet(sheet){
|
|||||||
PostData(uri);
|
PostData(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function RefreshLibraryMetadata() {
|
||||||
|
var uri = `${apiUri}/Jobs/UpdateMetadata`;
|
||||||
|
PostData(uri);
|
||||||
|
}
|
||||||
|
|
||||||
function UpdateKomga(komgaUrl, komgaAuth){
|
function UpdateKomga(komgaUrl, komgaAuth){
|
||||||
var uri = `${apiUri}/LibraryConnectors/Update?libraryConnector=Komga&komgaUrl=${komgaUrl}&komgaAuth=${komgaAuth}`;
|
var uri = `${apiUri}/LibraryConnectors/Update?libraryConnector=Komga&komgaUrl=${komgaUrl}&komgaAuth=${komgaAuth}`;
|
||||||
PostData(uri);
|
PostData(uri);
|
||||||
|
@ -98,12 +98,15 @@
|
|||||||
<label for="ntfyAuth"></label><input placeholder="Auth" id="ntfyAuth" type="text">
|
<label for="ntfyAuth"></label><input placeholder="Auth" id="ntfyAuth" type="text">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="mangaHoverCheckbox" name="css-style" value="style_mangahover.css">
|
<input type="checkbox" id="mangaHoverCheckbox" name="css-style" value="style_mangahover.css" onclick="updateCSS()">
|
||||||
<label for="css-style"> Show manga titles and sources on hover</label><br>
|
<label for="css-style"> Show manga titles and sources on hover</label><br>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" value="Update" onclick="UpdateSettings()">
|
<input type="submit" value="Update" onclick="UpdateSettings()">
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="submit" value="Refresh Library Metadata" style="width: fit-content;"onclick="RefreshLibraryMetadata()">
|
||||||
|
</div>
|
||||||
</popup-content>
|
</popup-content>
|
||||||
</popup-window>
|
</popup-window>
|
||||||
</popup>
|
</popup>
|
||||||
|
@ -101,6 +101,18 @@ function Setup(){
|
|||||||
}
|
}
|
||||||
Setup();
|
Setup();
|
||||||
|
|
||||||
|
function updateCSS(){
|
||||||
|
if (document.getElementById("mangaHoverCheckbox").checked == true){
|
||||||
|
ChangeStyleSheet('hover')
|
||||||
|
document.getElementById('pagestyle').setAttribute('href', 'styles/style_mangahover.css');
|
||||||
|
//console.log('Changing theme to mangahover')
|
||||||
|
} else {
|
||||||
|
ChangeStyleSheet('default');
|
||||||
|
document.getElementById('pagestyle').setAttribute('href', 'styles/style_default.css');
|
||||||
|
//console.log('Changing theme to default')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function ResetContent(){
|
function ResetContent(){
|
||||||
//Delete everything
|
//Delete everything
|
||||||
tasksContent.replaceChildren();
|
tasksContent.replaceChildren();
|
||||||
@ -163,21 +175,54 @@ function GetNewMangaItems(){
|
|||||||
|
|
||||||
//Returns a new "Publication" Item to display in the jobs section
|
//Returns a new "Publication" Item to display in the jobs section
|
||||||
function CreateManga(manga, connector){
|
function CreateManga(manga, connector){
|
||||||
|
//Create a new publication and set an internal ID
|
||||||
var mangaElement = document.createElement('publication');
|
var mangaElement = document.createElement('publication');
|
||||||
mangaElement.id = GetValidSelector(manga.internalId);
|
mangaElement.id = GetValidSelector(manga.internalId);
|
||||||
|
|
||||||
|
//Append the cover image to the publication
|
||||||
var mangaImage = document.createElement('img');
|
var mangaImage = document.createElement('img');
|
||||||
mangaImage.src = GetCoverUrl(manga.internalId);
|
mangaImage.src = GetCoverUrl(manga.internalId);
|
||||||
mangaElement.appendChild(mangaImage);
|
mangaElement.appendChild(mangaImage);
|
||||||
|
|
||||||
|
//Append the publication information to the publication
|
||||||
|
//console.log(manga);
|
||||||
var info = document.createElement('publication-information');
|
var info = document.createElement('publication-information');
|
||||||
var connectorName = document.createElement('connector-name');
|
var connectorName = document.createElement('connector-name');
|
||||||
connectorName.innerText = connector;
|
connectorName.innerText = connector;
|
||||||
connectorName.className = "pill";
|
connectorName.className = "pill";
|
||||||
connectorName.style.backgroundColor = stringToColour(connector);
|
connectorName.style.backgroundColor = stringToColour(connector);
|
||||||
info.appendChild(connectorName);
|
info.appendChild(connectorName);
|
||||||
|
|
||||||
var mangaName = document.createElement('publication-name');
|
var mangaName = document.createElement('publication-name');
|
||||||
mangaName.innerText = manga.sortName;
|
mangaName.innerText = manga.sortName;
|
||||||
|
|
||||||
|
//Create the publication status indicator
|
||||||
|
var releaseStatus = document.createElement('publication-status');
|
||||||
|
releaseStatus.setAttribute("release-status", manga.releaseStatus);
|
||||||
|
switch(manga.releaseStatus){
|
||||||
|
case 0:
|
||||||
|
releaseStatus.setAttribute("release-status", "Ongoing");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
releaseStatus.setAttribute("release-status", "Completed");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
releaseStatus.setAttribute("release-status", "On Hiatus");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
releaseStatus.setAttribute("release-status", "Cancelled");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
releaseStatus.setAttribute("release-status", "Upcoming");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
releaseStatus.setAttribute("release-status", "Status Unavailable");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
info.appendChild(mangaName);
|
info.appendChild(mangaName);
|
||||||
mangaElement.appendChild(info);
|
mangaElement.appendChild(info);
|
||||||
|
mangaElement.appendChild(releaseStatus); //Append the release status indicator to the publication element
|
||||||
return mangaElement;
|
return mangaElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,15 +424,6 @@ function UpdateSettings(){
|
|||||||
setCookie("apiUri", apiUri);
|
setCookie("apiUri", apiUri);
|
||||||
Setup();
|
Setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the checkbox is checked, set the style to style_mangahover.css and
|
|
||||||
if (document.getElementById("mangaHoverCheckbox").checked == true){
|
|
||||||
ChangeStyleSheet('hover')
|
|
||||||
//console.log('Changing theme to mangahover')
|
|
||||||
} else {
|
|
||||||
ChangeStyleSheet('default');
|
|
||||||
//console.log('Changing theme to default')
|
|
||||||
}
|
|
||||||
|
|
||||||
if(settingKomgaUrl.value != "" &&
|
if(settingKomgaUrl.value != "" &&
|
||||||
settingKomgaUser.value != "" &&
|
settingKomgaUser.value != "" &&
|
||||||
|
@ -100,6 +100,8 @@ viewport {
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
scrollbar-color: var(--accent-color) var(--primary-color);
|
||||||
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
@ -203,7 +205,7 @@ publication{
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
padding: 15px 20px;
|
padding: 15px 19px;
|
||||||
position: relative;
|
position: relative;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@ -250,6 +252,69 @@ publication-name{
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publication-status {
|
||||||
|
display:block;
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
z-index: 2;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 10px, rgb(51, 51, 51) 0px 0px 10px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status::after {
|
||||||
|
content: attr(release-status);
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
visibility: hidden;
|
||||||
|
|
||||||
|
/*Text Properties*/
|
||||||
|
font-size:10pt;
|
||||||
|
font-weight:bold;
|
||||||
|
color:white;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
/*Size*/
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 0px;
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status:hover::after{
|
||||||
|
visibility:visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
publication-status[release-status="Ongoing"]{
|
||||||
|
background-color: limegreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Completed"]{
|
||||||
|
background-color: blueviolet;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="On Hiatus"]{
|
||||||
|
background-color: darkorange;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Cancelled"]{
|
||||||
|
background-color: firebrick;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Upcoming"]{
|
||||||
|
background-color: aqua;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Status Unavailable"]{
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
publication img {
|
publication img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -100,6 +100,8 @@ viewport {
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
scrollbar-color: var(--accent-color) var(--primary-color);
|
||||||
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
@ -203,7 +205,7 @@ publication{
|
|||||||
height: 300px;
|
height: 300px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
padding: 15px 20px;
|
padding: 15px 19px;
|
||||||
position: relative;
|
position: relative;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@ -251,6 +253,70 @@ publication-name{
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publication-status {
|
||||||
|
display:block;
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
z-index: 2;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 10px, rgb(51, 51, 51) 0px 0px 10px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status::after {
|
||||||
|
content: attr(release-status);
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
visibility: hidden;
|
||||||
|
|
||||||
|
/*Text Properties*/
|
||||||
|
font-size:10pt;
|
||||||
|
font-weight:bold;
|
||||||
|
color:white;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
/*Size*/
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 0px;
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status:hover::after{
|
||||||
|
visibility:visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
publication-status[release-status="Ongoing"]{
|
||||||
|
background-color: limegreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Completed"]{
|
||||||
|
background-color: blueviolet;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="On Hiatus"]{
|
||||||
|
background-color: darkorange;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Cancelled"]{
|
||||||
|
background-color: firebrick;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Upcoming"]{
|
||||||
|
background-color: aqua;
|
||||||
|
}
|
||||||
|
|
||||||
|
publication-status[release-status="Status Unavailable"]{
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
publication-details {
|
publication-details {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
Loading…
Reference in New Issue
Block a user