feat(GODT-2772): HTML placeholder is not loaded from resources anymore.

This commit is contained in:
Xavier Michelon
2023-08-28 18:21:06 +02:00
parent 86cd2437aa
commit 0c7e17701f
6 changed files with 16 additions and 31 deletions

View File

@ -110,7 +110,6 @@
<file>qml/Proton/WebFrame.qml</file>
<file>qml/QuestionItem.qml</file>
<file>qml/Resources/bug_report_flow.json</file>
<file>qml/Resources/ComingSoon.html</file>
<file>qml/SettingsItem.qml</file>
<file>qml/SettingsView.qml</file>
<file>qml/SetupWizard/ClientListItem.qml</file>

View File

@ -176,6 +176,9 @@ ApplicationWindow {
onWizardEnded: {
contentLayout.currentIndex = 0;
}
onShowUnderConstruction: {
webFrameOverlay.showUnderConstruction();
}
}
}
WebFrame {

View File

@ -25,7 +25,17 @@ Item {
property string url: ""
function showBlankPage() {
webView.loadHtml("<!doctype html><meta charset=utf-8><title>blank</title>", "blank.html");
webView.loadHtml("<!doctype html><meta charset=utf-8><title>blank</title>", "");
}
function showUnderConstruction() {
webView.loadHtml(`
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Coming soon</title><style> body { background-color: #888; font-family: sans-serif; } p { font-weight: bold; margin-top: 100px; text-align: center; }</style></head>
<body><p>The content of this page is under construction.</p></body></html>
`, "")
root.visible = true;
}
Rectangle {

View File

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Coming soon</title>
<style>
html {
}
body {
background-color: #888;
font-family: sans-serif;
}
p {
font-weight: bold;
margin-top: 100px;
text-align: center;
}
</style>
</head>
<body>
<p>
The content of this page is under construction.
</p>
</body>
</html>

View File

@ -70,7 +70,7 @@ Item {
root.iconWidth = 265;
}
function showUnderConstruction() {
Backend.showWebFrameOverlay("qrc:/qml/Resources/ComingSoon.html");
wizard.showUnderConstruction();
}
Connections {

View File

@ -43,6 +43,7 @@ Item {
signal bugReportRequested
signal wizardEnded
signal showUnderConstruction
function _showClientConfig() {
showClientConfig(root.user, root.address, false);