mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Added fade-in for images
This commit is contained in:
parent
fe06f6d8ff
commit
78c32035f8
@ -205,6 +205,12 @@ main {
|
|||||||
#game-grid .mdl-card img {
|
#game-grid .mdl-card img {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
#game-grid .mdl-card img.fade-in {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
#game-grid .game-title {
|
#game-grid .game-title {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -537,11 +537,10 @@ function showApps(host) {
|
|||||||
}
|
}
|
||||||
host.getBoxArt(app.id).then(function(resolvedPromise) {
|
host.getBoxArt(app.id).then(function(resolvedPromise) {
|
||||||
// put the box art into the image holder
|
// put the box art into the image holder
|
||||||
$(outerDiv).append($("<img \>", {
|
var img = new Image();
|
||||||
src: resolvedPromise,
|
img.src = resolvedPromise;
|
||||||
name: app.title
|
img.onload = e => img.classList.add('fade-in');
|
||||||
}));
|
$(outerDiv).append(img);
|
||||||
|
|
||||||
}, function(failedPromise) {
|
}, function(failedPromise) {
|
||||||
console.log('%c[index.js, showApps]', 'color: green;', 'Error! Failed to retrieve box art for app ID: ' + app.id + '. Returned value was: ' + failedPromise, '\n Host object:', host, host.toString());
|
console.log('%c[index.js, showApps]', 'color: green;', 'Error! Failed to retrieve box art for app ID: ' + app.id + '. Returned value was: ' + failedPromise, '\n Host object:', host, host.toString());
|
||||||
$(outerDiv).append($("<img \>", {
|
$(outerDiv).append($("<img \>", {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user