mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2026-08-05 16:12:41 +02:00
fix: autofit resolution if restarting container
This commit is contained in:
+2
File diff suppressed because one or more lines are too long
@@ -325,6 +325,15 @@
|
||||
<script src="core/util.js"></script>
|
||||
<script src="app/webutil.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 -->
|
||||
|
||||
</body>
|
||||
|
||||
@@ -91,6 +91,14 @@ def index():
|
||||
return HTML_INDEX
|
||||
|
||||
|
||||
@app.route('/api/status')
|
||||
def status():
|
||||
global FIRST
|
||||
return json.dumps({
|
||||
'default_resolution': FIRST
|
||||
})
|
||||
|
||||
|
||||
@app.route('/redirect.html')
|
||||
def redirectme():
|
||||
global FIRST
|
||||
|
||||
Reference in New Issue
Block a user