mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2025-12-06 08:22:31 +01:00
fix: autofit resolution if restarting container
This commit is contained in:
parent
b8f8d21f1d
commit
91a76e7196
4 changed files with 23 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ server {
|
|||
try_files $uri @proxy2;
|
||||
}
|
||||
|
||||
location ~ ^/api {
|
||||
try_files $uri @proxy2;
|
||||
}
|
||||
|
||||
location = /redirect.html {
|
||||
try_files $uri @proxy2;
|
||||
}
|
||||
|
|
|
|||
2
image/usr/lib/noVNC/app/jquery-3.3.1.min.js
vendored
Normal file
2
image/usr/lib/noVNC/app/jquery-3.3.1.min.js
vendored
Normal file
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue