-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
253 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#changelog-modal { | ||
width: 100%; | ||
height: 100%; | ||
background: rgba(0, 0, 0, 0.6); | ||
overflow: hidden; | ||
z-index: 200; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
#changelog-modal .content { | ||
width: 40%; | ||
height: 50%; | ||
background: rgb(0, 0, 0, 0.8); | ||
padding: 20px 40px; | ||
display: flex; | ||
flex-direction: column; | ||
color: #fff; | ||
font-size: 16px; | ||
border-radius: 10px; | ||
} | ||
|
||
#changelog-modal .content .header { | ||
font-size: 30px; | ||
font-weight: bold; | ||
} | ||
|
||
#changelog-modal .content .body { | ||
position: relative; | ||
flex: 1; | ||
} | ||
|
||
#changelog-modal .content .extra { | ||
bottom: 30px; | ||
position: absolute; | ||
font-size: 13px; | ||
} | ||
|
||
#changelog-modal .content .body .changes { | ||
list-style: square; | ||
padding: 20px 0; | ||
margin: 0; | ||
} | ||
|
||
#changelog-modal .content .body .changes li { | ||
margin: 15px 0; | ||
} | ||
|
||
#changelog-modal .content .body .changes li .change-title { | ||
font-size: 22px; | ||
font-weight: bold; | ||
text-transform: uppercase; | ||
} | ||
|
||
#changelog-modal .content .footer { | ||
display: flex; | ||
justify-content: flex-end; | ||
} | ||
|
||
#changelog-modal .content .footer .button { | ||
display: block; | ||
width: 150px; | ||
color: rgb(0, 0, 0); | ||
background: rgb(244, 117, 33); | ||
font-size: 2rem; | ||
font-weight: bold; | ||
padding: 10px 20px; | ||
border-radius: 5px; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ window.session = { | |
}, | ||
}, | ||
storage: { | ||
version: NaN, | ||
account: { | ||
password: NaN, | ||
username: NaN, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
window.changelog = { | ||
id: "changelog-modal", | ||
data: { | ||
version: "v1.1", | ||
changes: [ | ||
{ | ||
title: "feat: update changelogs", | ||
description: "You will now receive a report like this with each update.", | ||
}, | ||
{ | ||
title: "feat: skip intro beta version", | ||
description: "Anime without delays! Skip the intro with just one button. More action, less waiting.", | ||
}, | ||
{ | ||
title: "fix: solve error when video versions is null", | ||
description: "Playback issues have been resolved in certain anime titles, such as \"The Marginal Service\".", | ||
}, | ||
], | ||
extra: "If you have any issues or suggestions, you can report them on the GitHub jhassan8/crunchyroll-tizen.", | ||
}, | ||
|
||
init: function () { | ||
if (session.storage.version !== changelog.data.version) { | ||
var changelog_element = document.createElement("div"); | ||
changelog_element.id = changelog.id; | ||
|
||
changelog_element.innerHTML = ` | ||
<div class="content"> | ||
<div class="header"> | ||
Crunchyroll ${changelog.data.version} | ||
</div> | ||
<div class="body"> | ||
<ul class="changes"> | ||
${changelog.getChanges()} | ||
</ul> | ||
<div class="extra"> | ||
${changelog.data.extra} | ||
</div> | ||
</div> | ||
<div class="footer"> | ||
<a class="button ${login.id}-option" translate>OK</a> | ||
</div> | ||
</div>`; | ||
|
||
session.storage.version = changelog.data.version; | ||
session.update(); | ||
|
||
document.body.appendChild(changelog_element); | ||
main.state = changelog.id; | ||
} | ||
}, | ||
|
||
destroy: function () { | ||
main.state = home.id; | ||
document.body.removeChild(document.getElementById(changelog.id)); | ||
}, | ||
|
||
getChanges: function (item) { | ||
var content_changes = ""; | ||
changelog.data.changes.forEach((element) => { | ||
content_changes += ` | ||
<li> | ||
<div class="change-title"> | ||
${element.title} | ||
</div> | ||
<div class="change-description"> | ||
${element.description} | ||
</div> | ||
</li>`; | ||
}); | ||
return content_changes; | ||
}, | ||
|
||
keyDown: function (event) { | ||
switch (event.keyCode) { | ||
case tvKey.KEY_PANEL_ENTER: | ||
case tvKey.KEY_ENTER: | ||
case tvKey.KEY_BACK: | ||
case 27: | ||
changelog.destroy(); | ||
break; | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters