mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-04-17 21:24:48 +10:00
Changed the UI and fixed bugs.
This commit is contained in:
@@ -328,7 +328,7 @@ progress.win-ring:indeterminate::-ms-fill {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-height: 10%;
|
||||
min-height: 5%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: calc(100% - 10.5em);
|
||||
@@ -648,4 +648,24 @@ progress.win-ring:indeterminate::-ms-fill {
|
||||
.page.installsuccess>.controls>.command button:nth-of-type(2),
|
||||
.page.installfailed>.controls>.command button:nth-of-type(2) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page .content .pkgsupport {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page.preinstall .content .pkgsupport.preinstall {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.page .content .pkgsupport>* {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page .content .pkgsupport.support>.support {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.page .content .pkgsupport.not-support>.not-support {
|
||||
display: block;
|
||||
}
|
||||
@@ -257,7 +257,12 @@
|
||||
<p class="pkgtitle multiple" data-res-byname="IDS_PREINSTALL_MPKGNAME"></p>
|
||||
<p class="pkgapplabel" data-res-byname="IDS_MSAPP"></p>
|
||||
<p class="pkgpublisher" data-res-byname="IDS_PUBLISHER"></p>
|
||||
<p class="pkgversion" data-res-byname="IDS_VERSION"></p><br />
|
||||
<p class="pkgversion" data-res-byname="IDS_VERSION"></p>
|
||||
<p class="pkgsupport preinstall">
|
||||
<span class="support" data-res-byname="IDS_PREINSTALL_SUPPOS"></span>
|
||||
<span class="not-support" data-res-byname="IDS_PREINSTALL_NOSUPPOS"></span>
|
||||
</p>
|
||||
<br />
|
||||
<p class="pkgfunctions-label" data-res-byname="IDS_FUNCTIONNAME"></p>
|
||||
<div class="functions">
|
||||
<ul>
|
||||
@@ -317,6 +322,7 @@
|
||||
var slfilter = storelogo.querySelector(".filter");
|
||||
var pi = Bridge.Package.pkginfo(this.value);
|
||||
var reason = page.querySelector(".reason textarea");
|
||||
var support = page.querySelector(".pkgsupport");
|
||||
if (pi && pi.valid) {
|
||||
var res = Bridge.Resources;
|
||||
pkgtitle.textContent = strutils.format(res.byname("IDS_PREINSTALL_MPKGNAME"), pi.properties.display_name);
|
||||
@@ -355,7 +361,16 @@
|
||||
storelogo.style.backgroundColor = bc;
|
||||
slfilter.style.background = Color.genTileBackFilter(bc);
|
||||
}
|
||||
setFlyoutDisplayInfo(pi);
|
||||
var support = setFlyoutDisplayInfo(pi);
|
||||
var supportDisplay = page.querySelector(".pkgsupport");
|
||||
if (support.architectureSupport && support.osminversionSupport) {
|
||||
supportDisplay.classList.add("support");
|
||||
supportDisplay.classList.remove("not-support");
|
||||
} else {
|
||||
supportDisplay.classList.add("not-support");
|
||||
supportDisplay.classList.remove("support");
|
||||
}
|
||||
supportDisplay.setAttribute("title", strutils.format("OS Min Version: {0}, Architecture: {1}", support.showOsminversionText, support.showArchitectureText));
|
||||
var hres = Bridge.Package.installResult(this.value);
|
||||
if (hres && hres.failed) {
|
||||
reason.textContent = hres.message;
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
push_nonull(titlepart, content.querySelector(".pkgapplabel"));
|
||||
push_nonull(titlepart, content.querySelector(".pkgpublisher"));
|
||||
push_nonull(titlepart, content.querySelector(".pkgversion"));
|
||||
push_nonull(titlepart, content.querySelector(".pkgsupport"));
|
||||
push_nonull(textpart, content.querySelector(".pkgfunctions-label"));
|
||||
push_nonull(textpart, content.querySelector(".functions"));
|
||||
push_nonull(textpart, content.querySelector(".moreinfo"));
|
||||
@@ -320,6 +321,13 @@
|
||||
function setFlyoutDisplayInfo(pkginfo) {
|
||||
var flyout = document.getElementById("moreinfo-flyout");
|
||||
var content = document.getElementById("moreinfo-flyout-content");
|
||||
var ret = {
|
||||
architectureSupport: false,
|
||||
osminversionSupport: false,
|
||||
showArchitectureText: "",
|
||||
showOsminversionText: "",
|
||||
};
|
||||
var sysArch = Bridge.External.System.Archievement;
|
||||
(function() {
|
||||
var name = content.querySelector(".id.name");
|
||||
name.textContent = pkginfo.identity.name;
|
||||
@@ -328,32 +336,52 @@
|
||||
var version = content.querySelector(".id.version");
|
||||
version.textContent = stringifyVersion(pkginfo.identity.realver);
|
||||
var arch = content.querySelector(".id.arch");
|
||||
console.log(pkginfo.identity.architecture);
|
||||
if (pkginfo.type === 1) {
|
||||
switch (pkginfo.identity.architecture) {
|
||||
case 1:
|
||||
arch.textContent = "x86";
|
||||
if (sysArch == 0 || sysArch == 9) ret.architectureSupport = true;
|
||||
break;
|
||||
case 2:
|
||||
arch.textContent = "x64";
|
||||
if (sysArch == 9) ret.architectureSupport = true;
|
||||
break;
|
||||
case 4:
|
||||
arch.textContent = "ARM";
|
||||
if (sysArch == 5 || sysArch == 12) ret.architectureSupport = true;
|
||||
break;
|
||||
case 8:
|
||||
arch.textContent = "ARM64";
|
||||
if (sysArch == 12) ret.architectureSupport = true;
|
||||
break;
|
||||
case 16:
|
||||
case 15:
|
||||
arch.textContent = "Neutral";
|
||||
if (sysArch != 6 && sysArch > 0) ret.architectureSupport = true;
|
||||
break;
|
||||
}
|
||||
ret.showArchitectureText = arch.textContent;
|
||||
} else if (pkginfo.type === 2) {
|
||||
var varch = pkginfo.identity.architecture;
|
||||
var strarr = [];
|
||||
if (varch & 1) strarr.push("x86");
|
||||
if (varch & 2) strarr.push("x64");
|
||||
if (varch & 4) strarr.push("ARM");
|
||||
if (varch & 8) strarr.push("ARM64");
|
||||
if (varch & 1) {
|
||||
strarr.push("x86");
|
||||
if (sysArch == 0 || sysArch == 9) ret.architectureSupport = true;
|
||||
}
|
||||
if (varch & 2) {
|
||||
strarr.push("x64");
|
||||
if (sysArch == 9) ret.architectureSupport = true;
|
||||
}
|
||||
if (varch & 4) {
|
||||
strarr.push("ARM");
|
||||
if (sysArch == 5 || sysArch == 12) ret.architectureSupport = true;
|
||||
}
|
||||
if (varch & 8) {
|
||||
strarr.push("ARM64");
|
||||
if (sysArch == 12) ret.architectureSupport = true;
|
||||
}
|
||||
arch.textContent = strarr.join(", ");
|
||||
ret.showArchitectureText = arch.textContent;
|
||||
}
|
||||
var family = content.querySelector(".id.family");
|
||||
family.textContent = pkginfo.identity.package_family_name;
|
||||
@@ -370,6 +398,24 @@
|
||||
var sys = content.querySelector(".info.sys");
|
||||
var strutils = Bridge.External.String;
|
||||
sys.textContent = strutils.format(Bridge.Resources.byname("IDS_MOREINFO_INFOSYS_VALUE"), pkginfo.prerequisites.os_min_version_description, stringifyVersion(pkginfo.prerequisites.os_min_version));
|
||||
var pkgSupportVer = pkginfo.prerequisites.os_min_version;
|
||||
var systemSupportVer = Bridge.External.System.Version;
|
||||
ret.showOsminversionText = stringifyVersion(pkgSupportVer);
|
||||
if (pkgSupportVer.major < systemSupportVer.major) {
|
||||
ret.osminversionSupport = true;
|
||||
} else if (pkgSupportVer.major == systemSupportVer.major) {
|
||||
if (pkgSupportVer.minor < systemSupportVer.minor) {
|
||||
ret.osminversionSupport = true;
|
||||
} else if (pkgSupportVer.minor == systemSupportVer.minor) {
|
||||
if (pkgSupportVer.major == 6 && pkgSupportVer.minor == 3 && pkgSupportVer.build == 1) {
|
||||
if (pkginfo.identity.architecture & (4 | 8)) {
|
||||
ret.osminversionSupport = true;
|
||||
}
|
||||
} else {
|
||||
ret.osminversionSupport = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
var lang = content.querySelector(".info.langs");
|
||||
lang.innerHTML = "";
|
||||
for (var i = 0; i < pkginfo.resources.languages.length; i++) {
|
||||
@@ -379,6 +425,7 @@
|
||||
lang.appendChild(li);
|
||||
}
|
||||
})();
|
||||
return ret;
|
||||
}
|
||||
|
||||
function noticeLoadPreinstallPage(ismul) {
|
||||
@@ -451,7 +498,16 @@
|
||||
funclist.appendChild(li);
|
||||
}
|
||||
}
|
||||
setFlyoutDisplayInfo(pkginfo);
|
||||
var support = setFlyoutDisplayInfo(pkginfo);
|
||||
var supportDisplay = page.querySelector(".pkgsupport");
|
||||
if (support.architectureSupport && support.osminversionSupport) {
|
||||
supportDisplay.classList.add("support");
|
||||
supportDisplay.classList.remove("not-support");
|
||||
} else {
|
||||
supportDisplay.classList.add("not-support");
|
||||
supportDisplay.classList.remove("support");
|
||||
}
|
||||
supportDisplay.setAttribute("title", strutils.format("OS Min Version: {0}, Architecture: {1}", support.showOsminversionText, support.showArchitectureText));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,20 @@
|
||||
}
|
||||
|
||||
.page .reason textarea {
|
||||
background-color: rgba (255, 255, 255, 0);
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
color: white;
|
||||
border: 2px solid white;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.page .content .pkgsupport.support>.support {
|
||||
color: rgb(84, 197, 52);
|
||||
}
|
||||
|
||||
.page .content .pkgsupport.not-support>.not-support {
|
||||
color: rgb(209, 57, 46);
|
||||
}
|
||||
|
||||
|
||||
/* App Launch List */
|
||||
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
color: #0078d7;
|
||||
}
|
||||
|
||||
.page .content .pkgsupport.support>.support {
|
||||
color: rgb(0, 138, 23);
|
||||
}
|
||||
|
||||
.page .content .pkgsupport.not-support>.not-support {
|
||||
color: rgb(236, 28, 36);
|
||||
}
|
||||
|
||||
|
||||
/* App Launch List */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user