Skip to content

Commit 0f09e05

Browse files
committed
Fix blank page when OAuth2 verification is finished
1 parent e42fa85 commit 0f09e05

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

resources/resources.qrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
<qresource prefix="/sounds">
1313
<file alias="proximity_alarm.wav">sounds/proximity_alarm.wav</file>
1414
</qresource>
15+
<qresource prefix="/oauth2method">
16+
<file alias="oauth2_verification_finished.html">templates/oauth2_verification_finished.html</file>
17+
</qresource>
1518
</RCC>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script>
5+
// push any fragment as a query string to redirect server
6+
window.onload = function hashFunction() {
7+
var query = location.hash.substr(1);
8+
if (query != "") {
9+
var xhttp = new XMLHttpRequest();
10+
xhttp.open("GET", "/?" + query, true);
11+
xhttp.send();
12+
}
13+
};
14+
</script>
15+
<style>
16+
body {
17+
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
18+
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
19+
}
20+
</style>
21+
</head>
22+
<body>
23+
<!-- Replacement of below placeholders is done by src/auth/oauth2/core/qgso2.cpp -->
24+
25+
<h2>QField OAuth2 verification has finished</h2>
26+
27+
<p>If you have not been returned to QField, bring the application to the forefront.</p>
28+
29+
<p><a href="#" onclick="window.close()">Close window</a></p>
30+
</body>
31+
</html>

0 commit comments

Comments
 (0)