mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Replaced error box art with new one + lazyload
This commit is contained in:
parent
8f5f383ead
commit
29a105d016
@ -532,19 +532,15 @@ function showApps(host) {
|
|||||||
// apply CSS stylization to indicate whether the app is active
|
// apply CSS stylization to indicate whether the app is active
|
||||||
stylizeBoxArt(host, app.id);
|
stylizeBoxArt(host, app.id);
|
||||||
}
|
}
|
||||||
|
var img = new Image();
|
||||||
host.getBoxArt(app.id).then(function(resolvedPromise) {
|
host.getBoxArt(app.id).then(function(resolvedPromise) {
|
||||||
// put the box art into the image holder
|
|
||||||
var img = new Image();
|
|
||||||
img.src = resolvedPromise;
|
img.src = resolvedPromise;
|
||||||
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 \>", {
|
img.src = 'static/res/placeholder_error.svg'
|
||||||
src: "static/res/no_app_image.png",
|
|
||||||
name: app.title
|
|
||||||
}));
|
|
||||||
});
|
});
|
||||||
|
img.onload = e => img.classList.add('fade-in');
|
||||||
|
$(outerDiv).append(img);
|
||||||
});
|
});
|
||||||
}, function(failedAppList) {
|
}, function(failedAppList) {
|
||||||
$('#naclSpinner').hide();
|
$('#naclSpinner').hide();
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
1
static/res/placeholder_error.svg
Normal file
1
static/res/placeholder_error.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 300 400" width="300" height="400"><defs><clipPath id="_clipPath_7VrBmLEdSmb7vTXt6k0koa8xYu1zCaFz"><rect width="300" height="400"/></clipPath></defs><g clip-path="url(#_clipPath_7VrBmLEdSmb7vTXt6k0koa8xYu1zCaFz)"><rect width="300" height="400" style="fill:rgb(29,29,29)"/><g id="ic_warning_black_48px"><path d=" M 102 152 L 198 152 L 198 248 L 102 248 L 102 152 Z " fill="none"/><path d=" M 106 236 L 194 236 L 150 160 L 106 236 Z M 154 224 L 146 224 L 146 216 L 154 216 L 154 224 Z M 154 208 L 146 208 L 146 192 L 154 192 L 154 208 Z " fill="rgb(39,39,39)"/></g></g></svg>
|
After Width: | Height: | Size: 762 B |
Loading…
x
Reference in New Issue
Block a user