mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2026-06-18 06:41:11 +00:00
Added graphic when gamelist empty
This commit is contained in:
committed by
Jorys Paulin
parent
3234ffd4ea
commit
7815f3fa5f
+7
-5
@@ -487,16 +487,18 @@ function showApps(host) {
|
||||
$("div.game-container").remove();
|
||||
|
||||
host.getAppList().then(function(appList) {
|
||||
if(appList.length == 0) { // TODO: Add placeholder graphic
|
||||
$('#naclSpinner').hide();
|
||||
$("#game-grid").show();
|
||||
|
||||
if(appList.length == 0) {
|
||||
console.error('%c[index.js, showApps]', 'User\'s applist is empty')
|
||||
var img = new Image()
|
||||
img.src = 'static/res/applist_empty.svg'
|
||||
document.getElementById('game-grid').appendChild(img)
|
||||
snackbarLog('Your game list is empty')
|
||||
return; // We stop the function right here
|
||||
}
|
||||
// if game grid is populated, empty it
|
||||
|
||||
$('#naclSpinner').hide();
|
||||
$("#game-grid").show();
|
||||
|
||||
const sortedAppList = sortTitles(appList, 'ASC');
|
||||
|
||||
sortedAppList.forEach(function(app) {
|
||||
|
||||
Reference in New Issue
Block a user