public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour
@ 2021-12-20 11:37 Dominik Csapak
  2021-12-20 13:57 ` Aaron Lauterer
  2021-12-20 19:19 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 6+ messages in thread
From: Dominik Csapak @ 2021-12-20 11:37 UTC (permalink / raw)
  To: pve-devel

since the webview seemingly does not allow javascripts 'requestFullscreen',
workaround that by making the whole webview fullscreen and hiding novncs
fullscreen button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 lib/widgets/pve_console_menu_widget.dart | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/widgets/pve_console_menu_widget.dart b/lib/widgets/pve_console_menu_widget.dart
index 2cd2bc9..17573d6 100644
--- a/lib/widgets/pve_console_menu_widget.dart
+++ b/lib/widgets/pve_console_menu_widget.dart
@@ -180,13 +180,11 @@ class PveConsoleMenu extends StatelessWidget {
 
   Route _createHTMLConsoleRoute() {
     return PageRouteBuilder(
-      pageBuilder: (context, animation, secondaryAnimation) => Card(
-        child: PVEWebConsole(
-          apiClient: apiClient,
-          node: node,
-          guestID: guestID,
-          type: type,
-        ),
+      pageBuilder: (context, animation, secondaryAnimation) => PVEWebConsole(
+        apiClient: apiClient,
+        node: node,
+        guestID: guestID,
+        type: type,
       ),
     );
   }
@@ -219,7 +217,7 @@ class PVEWebConsoleState extends State<PVEWebConsole> {
     final ticket = widget.apiClient.credentials.ticket!;
     final baseUrl = widget.apiClient.credentials.apiBaseUrl;
 
-    var consoleUrl = "${baseUrl}/?novnc=1&node=${widget.node}&resize=scale";
+    var consoleUrl = "${baseUrl}/?novnc=1&node=${widget.node}&isFullscreen=true&resize=scale";
     if (widget.guestID != null) {
       final consoleType = widget.type == 'lxc' ? 'lxc' : 'kvm';
       consoleUrl += "&console=${consoleType}&vmid=${widget.guestID}";
-- 
2.30.2





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour
  2021-12-20 11:37 [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour Dominik Csapak
@ 2021-12-20 13:57 ` Aaron Lauterer
  2021-12-20 19:55   ` Thomas Lamprecht
  2021-12-20 19:19 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 1 reply; 6+ messages in thread
From: Aaron Lauterer @ 2021-12-20 13:57 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>

On 12/20/21 12:37, Dominik Csapak wrote:
> since the webview seemingly does not allow javascripts 'requestFullscreen',
> workaround that by making the whole webview fullscreen and hiding novncs
> fullscreen button
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>   lib/widgets/pve_console_menu_widget.dart | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/widgets/pve_console_menu_widget.dart b/lib/widgets/pve_console_menu_widget.dart
> index 2cd2bc9..17573d6 100644
> --- a/lib/widgets/pve_console_menu_widget.dart
> +++ b/lib/widgets/pve_console_menu_widget.dart
> @@ -180,13 +180,11 @@ class PveConsoleMenu extends StatelessWidget {
>   
>     Route _createHTMLConsoleRoute() {
>       return PageRouteBuilder(
> -      pageBuilder: (context, animation, secondaryAnimation) => Card(
> -        child: PVEWebConsole(
> -          apiClient: apiClient,
> -          node: node,
> -          guestID: guestID,
> -          type: type,
> -        ),
> +      pageBuilder: (context, animation, secondaryAnimation) => PVEWebConsole(
> +        apiClient: apiClient,
> +        node: node,
> +        guestID: guestID,
> +        type: type,
>         ),
>       );
>     }
> @@ -219,7 +217,7 @@ class PVEWebConsoleState extends State<PVEWebConsole> {
>       final ticket = widget.apiClient.credentials.ticket!;
>       final baseUrl = widget.apiClient.credentials.apiBaseUrl;
>   
> -    var consoleUrl = "${baseUrl}/?novnc=1&node=${widget.node}&resize=scale";
> +    var consoleUrl = "${baseUrl}/?novnc=1&node=${widget.node}&isFullscreen=true&resize=scale";
>       if (widget.guestID != null) {
>         final consoleType = widget.type == 'lxc' ? 'lxc' : 'kvm';
>         consoleUrl += "&console=${consoleType}&vmid=${widget.guestID}";




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pve-devel] applied: [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour
  2021-12-20 11:37 [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour Dominik Csapak
  2021-12-20 13:57 ` Aaron Lauterer
@ 2021-12-20 19:19 ` Thomas Lamprecht
  2021-12-20 19:55   ` Thomas Lamprecht
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Lamprecht @ 2021-12-20 19:19 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 20/12/2021 12:37, Dominik Csapak wrote:
> since the webview seemingly does not allow javascripts 'requestFullscreen',
> workaround that by making the whole webview fullscreen and hiding novncs
> fullscreen button
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  lib/widgets/pve_console_menu_widget.dart | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] applied: [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour
  2021-12-20 19:19 ` [pve-devel] applied: " Thomas Lamprecht
@ 2021-12-20 19:55   ` Thomas Lamprecht
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2021-12-20 19:55 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 20/12/2021 20:19, Thomas Lamprecht wrote:
> On 20/12/2021 12:37, Dominik Csapak wrote:
>> since the webview seemingly does not allow javascripts 'requestFullscreen',
>> workaround that by making the whole webview fullscreen and hiding novncs
>> fullscreen button
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>>  lib/widgets/pve_console_menu_widget.dart | 14 ++++++--------
>>  1 file changed, 6 insertions(+), 8 deletions(-)
>>
>>
> 
> applied, thanks!


argh, send above out for the wrong patch, this is not yet applied..




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour
  2021-12-20 13:57 ` Aaron Lauterer
@ 2021-12-20 19:55   ` Thomas Lamprecht
  2021-12-21  8:06     ` Aaron Lauterer
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Lamprecht @ 2021-12-20 19:55 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer, Dominik Csapak

On 20/12/2021 14:57, Aaron Lauterer wrote:
> Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
> 

how did you test this if the noVNC patch from Dominik is broken?




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour
  2021-12-20 19:55   ` Thomas Lamprecht
@ 2021-12-21  8:06     ` Aaron Lauterer
  0 siblings, 0 replies; 6+ messages in thread
From: Aaron Lauterer @ 2021-12-21  8:06 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox VE development discussion, Dominik Csapak



On 12/20/21 20:55, Thomas Lamprecht wrote:
> On 20/12/2021 14:57, Aaron Lauterer wrote:
>> Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
>>
> 
> how did you test this if the noVNC patch from Dominik is broken?

Tested the "open in full screen" part of it all, which works with or without the noVNC patches. Meaning, while it opens nicely in full screen and hitting the back button gets me back to where I was before, noVNC still had the fullscreen button in its menu.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-21  8:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 11:37 [pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour Dominik Csapak
2021-12-20 13:57 ` Aaron Lauterer
2021-12-20 19:55   ` Thomas Lamprecht
2021-12-21  8:06     ` Aaron Lauterer
2021-12-20 19:19 ` [pve-devel] applied: " Thomas Lamprecht
2021-12-20 19:55   ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal