Commit Graph

89 Commits

Author SHA1 Message Date
Ganesh Varadarajan 494b407a0a Add hash fragment as an optional method to supply config variables.
Any config variable like host, port, password, token may be
specified either in the query string (like now), or in the URL hash
fragment. In case a given variable is present in both, the value in the
fragment takes precedence. Supplying variables in the fragment avoids
leaking them to the web server hosting the noVNC viewer HTML.
2015-10-23 18:54:08 +05:30
samhed 045d922406 Moved resizeTimout to the UI object, no reason to have it outside anymore.. 2015-09-22 14:59:44 +02:00
Solly Ross 340290fa1d UI: Fix typo preventing reconnect after password
There was a typo in ui.js preventing the use of the connect button
after a password was entered.
2015-08-24 16:41:00 -04:00
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00
samhed a6357e8276 * Hide the fullscreen toggle button on Safari since alphanumerical
keyboard input doesn't work in fullscreen.
* Force clipping mode in Internet Explorer while in fullscreen since
  scrollbars doesn't work in fullscreen.
2015-06-25 22:37:05 +02:00
samhed 7d1dc09ad0 Fixes #498 - Add the ability to toggle fullscreen mode 2015-06-25 22:37:05 +02:00
samhed b098afc234 Fix error from a previous commit, there is no data type called 'text'.. 2015-06-25 22:34:44 +02:00
samhed 74f2ac968d Renamed popupStatusPanel to popupStatus and removed the global variable
which kept track on if it was open or not (it automatically closes after
1.5 seconds anyway).
2015-06-25 17:04:55 +02:00
samhed 30bfff81d9 Clarified enableDisableClip (now called enableDisableViewClip) and
moved it to where the other clipping functions are.
2015-06-25 15:29:23 +02:00
samhed 4f19e5c697 Allow the popupStatusPanel to show any text but close it on a 1.5 second timer. 2015-06-25 15:22:53 +02:00
samhed 31ddaa1c7a Clarify code with regards to the viewport drag functionality
* Fixes #502 so that the viewport drag functionality can't get stuck
2015-06-24 16:20:03 +02:00
samhed 29a0e6a8a3 Always show the viewport drag button on touch devices to keep the GUI from
"jumping around". Enable/disable the button instead of show/hide on these
devices.
2015-06-16 22:41:29 +02:00
samhed 1138bdd4b7 Reverting most of commit cb3e4de. The issue was not related to using keyboardinputReset.. the issue was infact a typo which was introduced in 3b8ec46. I must be too tired.. 2015-05-19 13:34:50 +02:00
samhed cb3e4deb73 Stop using keyboardinputReset at the start of keyInput
* This fixes backspace when using the on-screen keyboard on Android
2015-05-19 12:44:30 +02:00
Fabian Zaremba 48d26b2d47 Move #keyboardinput declarations to base.css/ui.js 2015-05-04 12:11:30 +02:00
Solly Ross d9fc1c7be4 Throw exceptions from RFB constructor
Previously, if an error was thrown from the Display constructor
in the RFB constructor, we would attempt to use `RFB#updateState`
to handle this.  However, `RFB#updateState` attempts to close
the WebSocket connection, which doesn't exist at this point.

In the constructor, it's probably just better to raise an exception
instead (making sure to clean up anything relevant).

Fixes #460
2015-03-26 17:10:24 -04:00
Solly Ross 58ded70d15 Create RFB object on connect
In e543525faa, we switched to creating
a new RFB object on disconnect.  This caused issues, however, since
any errors were only displayed briefly before the new "loaded" text
was displayed instead.

Now, we create the RFB object on connect.  This essentially removes
the usefulness of the "loaded" state, but prevents the aforementioned
problem.

To facilitate this, the code which does detection of cursor URI support
was moved from this Display constructor (which now calls the new
function) into its own function, `Util.browserSupportsCursorURIs()`.

Fixes #467
2015-03-26 17:09:05 -04:00
samhed 16b3ef77d1 Make getCanvasLimit more efficient by only calling getPosition once. 2015-03-11 07:29:30 +01:00
samhed fdedbafb1d * Don't check specific html elements from the display code (Fixes #446)
* Renamed and reworked fbuClip to clippingDisplay
* Added tests for clippingDisplay
* Use the a noVNC_container which covers the entire page to get the full size
  (Fixes #463)
* Added maxWidth and maxHeight to the canvas which can limit the viewport size
* Only show either the canvas or the logo, hide one when the other is shown
* Always center the canvas (previously it was only centered when not clipping)
* Removed iOS specific "position-fixed" fixes and start calling setBarPosition
  on every resize
* Removed the noVNC_screen_pad
2015-03-09 14:30:56 +01:00
samhed 3b8ec46fd2 Make the touch-keyboard code more robust through verifying that global variables are set before use. 2015-03-05 09:54:56 +01:00
Solly Ross 72747869a7 Support local scaling
This commit adds two new addition scaling options.  Both options do
local scaling.  The first "Local Scaling", does both upscaling and
downscaling.  The second option, "Local Downscaling", only downscales.

This is based on work by @mightypenguin (with an additional bug
reported by @glazik12).
2015-03-03 13:15:49 -05:00
Solly Ross 8b46c0deb0 Update UI to allow for different scaling modes
This commit updates the UI to allow for different
scaling modes.  The "resize" option was changed to
be a dropdown with the following options: "None" (nothing),
"Remote Resizing" (SetDesktopSize).
2015-02-27 17:13:51 -05:00
Solly Ross e543525faa Fix disconnect/reconnect issues
Commit 155d78b399 prevented reconnections
from working properly.  This fixes that by creating a new RFB object
after disconnecting or failing.

Furthermore, this ensures that a new connection cannot be opened util
we've actually disconnected (either by timer or by receiving a `close`
event).

Closes #452
2015-02-25 11:01:18 -05:00
samhed f8b399d7df Support automatic resize [Part 3/4]: ui.js
* Added a resize request (setDesktopSize) triggered when connecting and by
  changes to the browser window's size.
* Hid the view-drag-hand when the display area is the same or smaller than the
  remote session size.
* Added a setting for the automatic resize feature.
* Updated vnc.html and vnc_auto.html to reflect the changes to the UI.
2015-02-10 17:05:58 +01:00
samhed 5b7598ac6b Use our own event registration function for keyboardinputReset. 2015-02-06 15:53:10 +01:00
samhed bd6874e087 We should use the globally declared UI variable 2014-11-13 17:22:48 +01:00
Solly Ross bbbf42bb5a Cleanup: UI code
File: ui.js
Tests Added: False

Changes:
- Fix JSHint errors
- add some curly braces to improve clarity
- move variable declarations to relevant locations instead of at the top
  of methods
2014-09-15 16:46:02 -04:00
samhed 0bb6a8c50e Fixes issue 344 - problem with backspace on Android. 2014-04-04 17:45:04 +02:00
samhed df0ee70e36 Make sure that the default value of the hidden input field is a space. 2014-03-28 08:54:49 +01:00
Malcolm Scott fb35d50f6a Implement XVP UI in HTML 2014-02-17 17:55:28 -05:00
samhed 20074a49eb Removes the connection timeouts to enable slower clients, connections or servers. 2014-02-06 16:08:00 +01:00
jalf 2ea40fdf9a Keyboard Handling [6/8]: Update everything to include the new keyboard handling scripts 2013-12-05 12:31:48 -05:00
Joel Martin 75d69b9f62 Fix to relfect new github.io page base URL. 2013-10-29 14:38:24 -05:00
samhed f4f72e9db9 Merge branch 'master' of https://github.com/kanaka/noVNC into ctrlalttabesc
Conflicts:
	include/ui.js
	vnc.html
2013-10-11 17:20:49 +02:00
Samuel 270ae2f9f5 Merge pull request #304 from samhed/localcursor
Enables local cursor by default
2013-10-09 01:44:41 -07:00
Joel Martin 7c76fd32a1 Merge pull request #308 from samhed/autoconnect
Autoconnect option as URL query
2013-10-04 13:29:24 -07:00
samhed f8ddfc732d Autoconnect option as URL query 2013-10-04 17:59:03 +02:00
samhed 9b9e741b8c On touch devices the default should be to use a remote cursor. 2013-09-24 11:19:17 +02:00
samhed 97aefe5f83 Enables local cursor by default. 2013-09-23 11:48:16 +02:00
samhed 968431dd46 Catch input events to make the onscreen keyboard work in chrome on android. 2013-09-17 15:01:52 +02:00
samhed b4a979a07e Added a new file for the key symbols, using the well recognized names for the constants from X11:
* The list is found in /usr/include/X11/keysymdef.h
* I did only include the most common symbols for now..
2013-08-30 15:41:46 +02:00
samhed 04d6a8347f Added variables for the keysums to make the code easier to read. 2013-08-29 17:35:22 +02:00
samhed 53c01a2353 Added the extra keys Ctrl, Alt, Tab and Esc to the control bar. 2013-07-25 12:49:37 +02:00
Joel Martin 0e3d505e54 Merge pull request #276 from samhed/screenrealestate
Improved use of screen real estate
2013-07-18 09:58:02 -07:00
samhed 406a8b4e96 Display the desktop name in the document title 2013-07-18 15:51:23 +02:00
samhed 35b29c98ea * On low resolution devices the status text is now justified to the left
button group instead of centered.
* On low resolution devices the padding towards the edges of the screen of
  the left and right button groups are now removed.
* Since the status_bar was merged into the control-bar the actual status_bar
  element became redundant and was therefor removed.
* Improved the style of the control-bar when there is an error or a warning.
* Implemented a fix so that vnc_auto.html works as intended with the improved
  screen real estate patch.
2013-07-17 16:11:19 +02:00
Samuel Mannehed 0fa4e0a90a Merged the control-bar and the status-bar together.
Also added a popup with the status text.
2013-06-28 15:13:20 +02:00
Peter Åstrand (astrand) b66ffcddcf Re-fix pull req #245:
* Must declare port variable.

* Must look for https first, then http.
2013-04-25 09:07:09 +02:00
Will Rouesnel 58873b3222 Use port in UI.initSetting in include/ui.js
Because apparently it is simple enough for me to forget to include in the previous commit.
2013-04-23 14:32:02 +10:00
Will Rouesnel c42136d537 Add default port logic to include/ui.js
Correctly identifies the use of http/https and forces the value of port to 80 and 443
respectively, as in this situation window.location.port is blank.

This is patch includes the same changes as made in vnc_auto.html
2013-04-22 20:07:20 +10:00