mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2026-08-06 08:12:40 +02:00
fix: autofit resolution if restarting container
This commit is contained in:
@@ -13,6 +13,10 @@ server {
|
|||||||
try_files $uri @proxy2;
|
try_files $uri @proxy2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~ ^/api {
|
||||||
|
try_files $uri @proxy2;
|
||||||
|
}
|
||||||
|
|
||||||
location = /redirect.html {
|
location = /redirect.html {
|
||||||
try_files $uri @proxy2;
|
try_files $uri @proxy2;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
File diff suppressed because one or more lines are too long
@@ -325,6 +325,15 @@
|
|||||||
<script src="core/util.js"></script>
|
<script src="core/util.js"></script>
|
||||||
<script src="app/webutil.js"></script>
|
<script src="app/webutil.js"></script>
|
||||||
<script src="app/ui.js"></script>
|
<script src="app/ui.js"></script>
|
||||||
|
<script src="app/jquery-3.3.1.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$.getJSON("api/status", function(data) {
|
||||||
|
console.log(data);
|
||||||
|
if (data["default_resolution"]) {
|
||||||
|
window.location.href = "/";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<!-- end scripts -->
|
<!-- end scripts -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -91,6 +91,14 @@ def index():
|
|||||||
return HTML_INDEX
|
return HTML_INDEX
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api/status')
|
||||||
|
def status():
|
||||||
|
global FIRST
|
||||||
|
return json.dumps({
|
||||||
|
'default_resolution': FIRST
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
@app.route('/redirect.html')
|
@app.route('/redirect.html')
|
||||||
def redirectme():
|
def redirectme():
|
||||||
global FIRST
|
global FIRST
|
||||||
|
|||||||
Reference in New Issue
Block a user