Small improvements, lint fixes
parent
030f75b4df
commit
ae445abff3
|
@ -30,21 +30,6 @@
|
|||
|
||||
<!-- Back Button -->
|
||||
<button id="backButton" onclick="window.history.back()">Go back</button>
|
||||
|
||||
<!-- Advanced Button -->
|
||||
<button id="advancedButton" class="buttonSecondary" onclick="toggleAdvanced()" style="display: none;"></button>
|
||||
|
||||
<div id="advancedPanelContainer">
|
||||
<div id="badCertAdvancedPanel" class="advanced-panel" style="display: none;">
|
||||
<p id="badCertTechnicalInfo"></p>
|
||||
<div id="advancedPanelBackButtonContainer" class="advancedPanelButtonContainer">
|
||||
<button id="advancedPanelBackButton" onClick="window.history.back()"></button>
|
||||
</div>
|
||||
<div id="advancedPanelAcceptButtonContainer" class="advancedPanelButtonContainer">
|
||||
<button id="advancedPanelAcceptButton" class="buttonSecondary" onClick="acceptAndContinue(true)"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -70,31 +70,9 @@ button {
|
|||
background-image: none;
|
||||
}
|
||||
|
||||
button.inProgress {
|
||||
background-image: linear-gradient(-45deg, #dfe8ee, #dfe8ee 33%,
|
||||
#ecf0f3 33%, #ecf0f3 66%,
|
||||
#dfe8ee 66%, #dfe8ee);
|
||||
background-size: 37px 5px;
|
||||
background-repeat: repeat-x;
|
||||
animation: progress 6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes progress {
|
||||
from { background-position: 0 100%; }
|
||||
to { background-position: 100% 100%; }
|
||||
}
|
||||
|
||||
#errorPageContainer {
|
||||
/* If the page is greater than 550px center the content.
|
||||
* This number should be kept in sync with the media query for tablets below */
|
||||
max-width: 550px;
|
||||
margin: 0 auto;
|
||||
transform: translateY(var(--moz-background-height));
|
||||
padding-bottom: var(--moz-vertical-spacing);
|
||||
|
||||
min-height: calc(100% - var(--moz-background-height) - var(--moz-vertical-spacing));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* On large width devices, apply specific styles here. Often triggered by landscape mode or tablets */
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
<button id="errorTryAgain" onclick="window.location.reload()"></button>
|
||||
|
||||
<!-- Advanced Button -->
|
||||
<button id="advancedButton" class="buttonSecondary" onclick="toggleAdvancedAndScroll()" style="display: none;"></button>
|
||||
<button id="advancedButton" class="buttonSecondary hidden" onclick="toggleAdvancedAndScroll()"></button>
|
||||
|
||||
<hr id="horizontalLine" style="display: none;">
|
||||
<hr id="horizontalLine" class="hidden">
|
||||
<div id="advancedPanelContainer">
|
||||
<div id="badCertAdvancedPanel" class="advanced-panel" style="display: none;">
|
||||
<div id="badCertAdvancedPanel" class="advanced-panel hidden">
|
||||
<p id="badCertTechnicalInfo"></p>
|
||||
<div id="advancedPanelBackButtonContainer" class="advancedPanelButtonContainer">
|
||||
<button id="advancedPanelBackButton" onClick="window.history.back()"></button>
|
||||
|
@ -57,26 +57,15 @@ function toggleAdvancedAndScroll() {
|
|||
const horizontalLine = document.getElementById("horizontalLine");
|
||||
const advancedPanelAcceptButton = document.getElementById("advancedPanelAcceptButton");
|
||||
const badCertAdvancedPanel = document.getElementById("badCertAdvancedPanel");
|
||||
/*
|
||||
horizontalLine.style.display = "block";
|
||||
advancedPanelAcceptButton.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"});
|
||||
|
||||
*/
|
||||
|
||||
// We know that the button is being displayed
|
||||
|
||||
if (badCertAdvancedPanel.style.display === "block") {
|
||||
horizontalLine.style.display = "block";
|
||||
if (badCertAdvancedPanel.classList.has("hidden")) {
|
||||
horizontalLine.classList.remove("hidden");
|
||||
advancedPanelAcceptButton.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"});
|
||||
} else if (badCertAdvancedPanel.style.display === "none") {
|
||||
horizontalLine.style.display = "none";
|
||||
} else if (badCertAdvancedPanel.classList.has("hidden")) {
|
||||
horizontalLine.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function overrideAdvancedButtonStyling() {
|
||||
const advancedButton = document.getElementById("advancedButton");
|
||||
advancedButton.style.display = "inline-flex";
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="./errorPageScripts.js"></script>
|
||||
|
|
|
@ -98,6 +98,10 @@ hr {
|
|||
min-height: 100%;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* On large width devices, apply specific styles here. Often triggered by landscape mode or tablets */
|
||||
@media (min-width: 550px) {
|
||||
button {
|
||||
|
|
|
@ -6,7 +6,6 @@ package org.mozilla.fenix
|
|||
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.content.getSystemService
|
||||
import mozilla.components.browser.errorpages.ErrorPages
|
||||
import mozilla.components.browser.errorpages.ErrorType
|
||||
|
@ -123,16 +122,13 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
|
|||
}
|
||||
|
||||
internal enum class RiskLevel(val htmlRes: String) {
|
||||
|
||||
Low(LOW_AND_MEDIUM_RISK_ERROR_PAGES),
|
||||
Medium(LOW_AND_MEDIUM_RISK_ERROR_PAGES),
|
||||
High(HIGH_RISK_ERROR_PAGES),
|
||||
}
|
||||
|
||||
|
||||
companion object {
|
||||
internal const val LOW_AND_MEDIUM_RISK_ERROR_PAGES = "low_and_medium_risk_error_pages.html"
|
||||
internal const val HIGH_RISK_ERROR_PAGES = "high_risk_error_pages.html"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue