diff --git a/index.js b/index.js index 242d60b2d..cb9352331 100644 --- a/index.js +++ b/index.js @@ -149,19 +149,10 @@ function refreshLibrary() { } panelbody.innerHTML = visibleApps.map((app,idx) => { - var icon = "icon-upload"; - var versionInfo = app.version || ""; - if (app.custom) - icon = "icon-menu"; - if (appsInstalled.find(a=>a.id==app.id)) { - icon = "icon-delete"; - versionInfo+=" installed"; - } - var buttons = ""; + var appInstalled = appsInstalled.find(a=>a.id==app.id); + var version = getVersionInfo(app, appInstalled); + var versionInfo = version.text; if (versionInfo) versionInfo = " ("+versionInfo+")"; - if (app.allow_emulator) - buttons += ``; - buttons += ``; return `
${escapeHtml(app.name)} (${version})
+${escapeHtml(app.name)} (${version.text})
${escapeHtml(app.description)}