Work on result page

This commit is contained in:
Pax1601 2024-01-17 20:14:22 +01:00
parent 1568c65492
commit 05f98b2738
3 changed files with 21 additions and 22 deletions

View File

@ -4,6 +4,7 @@
flex-direction: column;
row-gap: 30px;
padding: 60px 120px;
color: var(--offwhite);
}
#result-page .result-summary {
@ -75,20 +76,20 @@
</style>
<div id="result-page">
<div class="result-summary wait">
<div class="title"><img src="./icons/spinner-solid.svg">Please wait while Olympus is being added to <i><%= activeInstance["name"] %></i></div>
<div class="title"><img src="./icons/spinner-solid.svg" style="animation: rotate 2s linear infinite;">Please wait while Olympus is being added to <i><%= activeInstance["name"] %></i></div>
</div>
<div class="result-summary success">
<div class="result-summary success hide">
<div class="title"><img src="./icons/check-solid-background.svg">Olympus successfully added to <i><%= activeInstance["name"] %></i></div>
<div class="description">See the <b>DCS Olympus Wiki</b> for more information on how to use Olympus and for troubleshooting issues. You may now close the installer.</div>
</div>
<div class="result-summary error">
<div class="result-summary error hide">
<div class="title"><img src="./icons/triangle-exclamation-solid-background.svg">An error occurred while adding Olympus to <i><%= activeInstance["name"] %></i></div>
<div class="description">See the manager log located in TODO for more information.</div>
</div>
<div>
<div style="font-size: 18px; font-weight: bold;">
How to launch Olympus
</div>
<div>
<div style="font-size: 13px;">
To launch Olympus, there are shortcuts available in the DCS Olympus folder under Saved Games.
</div>
<div class="usage-instructions">
@ -113,15 +114,15 @@
</div>
</div>
</div>
<div>
<div style="font-size: 13px;">
Alternatively, you can run the Olympus Client instead to replace the first two steps above.
</div>
<div class="buttons-footer">
<div class="button return">
<div class="button back" style="color: var(--offwhite); background-color: var(--background); border: 1px solid var(--offwhite);" onclick="signal('onReturnClicked')">
Return to main menu
</div>
<div class="button close">
<div class="button next" style="color: var(--background); background-color: var(--offwhite);" onclick="signal('onCloseManagerClicked')">
Close manager
</div>
</div>

View File

@ -68,7 +68,6 @@
background-color: var(--background-warning);
border-left: 5px solid var(--orange);
}
</style>
<div class="wizard-page">
<div class="cancel" style="font-size: 14px; font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px;">

View File

@ -344,43 +344,42 @@ class DCSInstance {
}
/* Install this instance */
install() {
install() {
installHooks(getManager().getActiveInstance().folder).then(
() => {
},
() => {},
(err) => {
return Promise.reject(err);
}
).then(() => installMod(getManager().getActiveInstance().folder, getManager().getActiveInstance().name)).then(
() => {
},
() => {},
(err) => {
return Promise.reject(err);
}
).then(() => installJSON(getManager().getActiveInstance().folder)).then(
() => {
},
() => {},
(err) => {
return Promise.reject(err);
}
).then(() => applyConfiguration(getManager().getActiveInstance().folder, getManager().getActiveInstance())).then(
() => {
},
() => {},
(err) => {
return Promise.reject(err);
}
).then(() => installShortCuts(getManager().getActiveInstance().folder, getManager().getActiveInstance().name)).then(
() => {
},
() => {},
(err) => {
return Promise.reject(err);
}
).then(
() => {
//getManager().resultPage.getElement()
getManager().resultPage.getElement().querySelector(".result-summary.wait").classList.add("hide");
getManager().resultPage.getElement().querySelector(".result-summary.success").classList.remove("hide");
getManager().resultPage.getElement().querySelector(".result-summary.error").classList.add("hide");
},
() => {
//getManager().resultPage.getElement()
getManager().resultPage.getElement().querySelector(".result-summary.wait").classList.add("hide");
getManager().resultPage.getElement().querySelector(".result-summary.success").classList.add("hide");
getManager().resultPage.getElement().querySelector(".result-summary.error").classList.remove("hide");
}
);
}