Removed unused load error page.
This commit is contained in:
parent
a82f2d5780
commit
e0d0fb8379
7 changed files with 8 additions and 54 deletions
|
@ -220,9 +220,6 @@ namespace SafeExamBrowser.Browser
|
|||
window.UpdateAddress(address);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TODO: LoadError.html is not used, as navigating back from it doesn't work! Remove page if no better solution can be found.
|
||||
/// </summary>
|
||||
private void Control_LoadFailed(int errorCode, string errorText, string url)
|
||||
{
|
||||
if (errorCode == (int) CefErrorCode.None)
|
||||
|
@ -239,8 +236,8 @@ namespace SafeExamBrowser.Browser
|
|||
}
|
||||
else
|
||||
{
|
||||
var title = text.Get(TextKey.Browser_LoadErrorPageTitle);
|
||||
var message = text.Get(TextKey.Browser_LoadErrorPageMessage).Replace("%%URL%%", url) + $" {errorText} ({errorCode})";
|
||||
var title = text.Get(TextKey.Browser_LoadErrorTitle);
|
||||
var message = text.Get(TextKey.Browser_LoadErrorMessage).Replace("%%URL%%", url) + $" {errorText} ({errorCode})";
|
||||
|
||||
logger.Warn($"Request for '{url}' failed: {errorText} ({errorCode}).");
|
||||
|
||||
|
|
|
@ -54,23 +54,5 @@ namespace SafeExamBrowser.Browser.Pages
|
|||
return html;
|
||||
}
|
||||
}
|
||||
|
||||
internal string LoadErrorPage()
|
||||
{
|
||||
var assembly = Assembly.GetAssembly(typeof(HtmlLoader));
|
||||
var path = $"{typeof(HtmlLoader).Namespace}.LoadError.html";
|
||||
|
||||
using (var stream = assembly.GetManifestResourceStream(path))
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
var html = reader.ReadToEnd();
|
||||
|
||||
html = html.Replace("%%MESSAGE%%", text.Get(TextKey.Browser_LoadErrorPageMessage));
|
||||
html = html.Replace("%%RETRY_BUTTON%%", text.Get(TextKey.Browser_LoadErrorPageButton));
|
||||
html = html.Replace("%%TITLE%%", text.Get(TextKey.Browser_LoadErrorPageTitle));
|
||||
|
||||
return html;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html style="height: 100%; width: 100%">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>%%TITLE%%</title>
|
||||
</head>
|
||||
<body style="background-color: lightgray; display: table; font-family: 'Segoe UI'; height: 98%; text-align: center; width: 99%">
|
||||
<div style="display: table-cell; vertical-align: middle">
|
||||
<h1 style="color: red">%%TITLE%%</h1>
|
||||
<p>%%MESSAGE%%</p>
|
||||
<p style="font-weight: bold">%%STATUS%%</p>
|
||||
<button onclick="window.location.replace('%%URL%%')" style="cursor: pointer">↻ %%RETRY_BUTTON%%</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -134,9 +134,6 @@
|
|||
<EmbeddedResource Include="Pages\BlockedContent.html" />
|
||||
<EmbeddedResource Include="Pages\BlockedPage.html" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Pages\LoadError.html" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
|
|
|
@ -20,9 +20,8 @@ namespace SafeExamBrowser.I18n.Contracts
|
|||
Browser_BlockedPageButton,
|
||||
Browser_BlockedPageMessage,
|
||||
Browser_BlockedPageTitle,
|
||||
Browser_LoadErrorPageMessage,
|
||||
Browser_LoadErrorPageButton,
|
||||
Browser_LoadErrorPageTitle,
|
||||
Browser_LoadErrorMessage,
|
||||
Browser_LoadErrorTitle,
|
||||
Browser_Name,
|
||||
Browser_Tooltip,
|
||||
BrowserWindow_DeveloperConsoleMenuItem,
|
||||
|
|
|
@ -18,13 +18,10 @@
|
|||
<Entry key="Browser_BlockedPageTitle">
|
||||
Seite blockiert
|
||||
</Entry>
|
||||
<Entry key="Browser_LoadErrorPageMessage">
|
||||
<Entry key="Browser_LoadErrorMessage">
|
||||
Beim Laden der Seite "%%URL%%" ist folgender Fehler aufgetreten:
|
||||
</Entry>
|
||||
<Entry key="Browser_LoadErrorPageButton">
|
||||
Erneut versuchen
|
||||
</Entry>
|
||||
<Entry key="Browser_LoadErrorPageTitle">
|
||||
<Entry key="Browser_LoadErrorTitle">
|
||||
Seiten-Ladefehler
|
||||
</Entry>
|
||||
<Entry key="Browser_Name">
|
||||
|
|
|
@ -18,13 +18,10 @@
|
|||
<Entry key="Browser_BlockedPageTitle">
|
||||
Page Blocked
|
||||
</Entry>
|
||||
<Entry key="Browser_LoadErrorPageMessage">
|
||||
<Entry key="Browser_LoadErrorMessage">
|
||||
An error occurred while loading page "%%URL%%":
|
||||
</Entry>
|
||||
<Entry key="Browser_LoadErrorPageButton">
|
||||
Retry
|
||||
</Entry>
|
||||
<Entry key="Browser_LoadErrorPageTitle">
|
||||
<Entry key="Browser_LoadErrorTitle">
|
||||
Page Load Error
|
||||
</Entry>
|
||||
<Entry key="Browser_Name">
|
||||
|
|
Loading…
Reference in a new issue