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);
|
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)
|
private void Control_LoadFailed(int errorCode, string errorText, string url)
|
||||||
{
|
{
|
||||||
if (errorCode == (int) CefErrorCode.None)
|
if (errorCode == (int) CefErrorCode.None)
|
||||||
|
@ -239,8 +236,8 @@ namespace SafeExamBrowser.Browser
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var title = text.Get(TextKey.Browser_LoadErrorPageTitle);
|
var title = text.Get(TextKey.Browser_LoadErrorTitle);
|
||||||
var message = text.Get(TextKey.Browser_LoadErrorPageMessage).Replace("%%URL%%", url) + $" {errorText} ({errorCode})";
|
var message = text.Get(TextKey.Browser_LoadErrorMessage).Replace("%%URL%%", url) + $" {errorText} ({errorCode})";
|
||||||
|
|
||||||
logger.Warn($"Request for '{url}' failed: {errorText} ({errorCode}).");
|
logger.Warn($"Request for '{url}' failed: {errorText} ({errorCode}).");
|
||||||
|
|
||||||
|
|
|
@ -54,23 +54,5 @@ namespace SafeExamBrowser.Browser.Pages
|
||||||
return html;
|
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\BlockedContent.html" />
|
||||||
<EmbeddedResource Include="Pages\BlockedPage.html" />
|
<EmbeddedResource Include="Pages\BlockedPage.html" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Pages\LoadError.html" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
|
|
@ -20,9 +20,8 @@ namespace SafeExamBrowser.I18n.Contracts
|
||||||
Browser_BlockedPageButton,
|
Browser_BlockedPageButton,
|
||||||
Browser_BlockedPageMessage,
|
Browser_BlockedPageMessage,
|
||||||
Browser_BlockedPageTitle,
|
Browser_BlockedPageTitle,
|
||||||
Browser_LoadErrorPageMessage,
|
Browser_LoadErrorMessage,
|
||||||
Browser_LoadErrorPageButton,
|
Browser_LoadErrorTitle,
|
||||||
Browser_LoadErrorPageTitle,
|
|
||||||
Browser_Name,
|
Browser_Name,
|
||||||
Browser_Tooltip,
|
Browser_Tooltip,
|
||||||
BrowserWindow_DeveloperConsoleMenuItem,
|
BrowserWindow_DeveloperConsoleMenuItem,
|
||||||
|
|
|
@ -18,13 +18,10 @@
|
||||||
<Entry key="Browser_BlockedPageTitle">
|
<Entry key="Browser_BlockedPageTitle">
|
||||||
Seite blockiert
|
Seite blockiert
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="Browser_LoadErrorPageMessage">
|
<Entry key="Browser_LoadErrorMessage">
|
||||||
Beim Laden der Seite "%%URL%%" ist folgender Fehler aufgetreten:
|
Beim Laden der Seite "%%URL%%" ist folgender Fehler aufgetreten:
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="Browser_LoadErrorPageButton">
|
<Entry key="Browser_LoadErrorTitle">
|
||||||
Erneut versuchen
|
|
||||||
</Entry>
|
|
||||||
<Entry key="Browser_LoadErrorPageTitle">
|
|
||||||
Seiten-Ladefehler
|
Seiten-Ladefehler
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="Browser_Name">
|
<Entry key="Browser_Name">
|
||||||
|
|
|
@ -18,13 +18,10 @@
|
||||||
<Entry key="Browser_BlockedPageTitle">
|
<Entry key="Browser_BlockedPageTitle">
|
||||||
Page Blocked
|
Page Blocked
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="Browser_LoadErrorPageMessage">
|
<Entry key="Browser_LoadErrorMessage">
|
||||||
An error occurred while loading page "%%URL%%":
|
An error occurred while loading page "%%URL%%":
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="Browser_LoadErrorPageButton">
|
<Entry key="Browser_LoadErrorTitle">
|
||||||
Retry
|
|
||||||
</Entry>
|
|
||||||
<Entry key="Browser_LoadErrorPageTitle">
|
|
||||||
Page Load Error
|
Page Load Error
|
||||||
</Entry>
|
</Entry>
|
||||||
<Entry key="Browser_Name">
|
<Entry key="Browser_Name">
|
||||||
|
|
Loading…
Reference in a new issue