Solly Ross
6cae7b58b8
Allow transforming to any format
...
This changes around `utils/use_require.js` to be able to generate any
of AMD (RequireJS), CommonJS, SystemJS, or UMD modules. The three
former also include support for translating `vnc.html`, producing a full
"app" version of noVNC.
2017-03-07 11:11:28 -05:00
Pierre Ossman
83250a6aa6
Use PNG for mouse cursors
...
The browsers' support for Microsoft's cursor format is a bit spotty,
so use the more common PNG format instead. This also allows us to
use a Canvas to generate the image, rather than coding it by hand.
2017-03-06 16:29:27 +01:00
Solly Ross
4faaf43176
Use ES6 modules natively via Polyfill
...
This commit introduces the "Browser ES Module Loader" polyfill
to support developing with native ES6 modules, without any compilation
step (files are passed through Babel in the browser). This should not
be used in production -- a pre-compiled version passed through babel
ahead of time (as produced by the `npm install` hook or
`utils/use_require.js`) should be used instead.
2017-03-01 11:21:34 -05:00
Solly Ross
fba220c6fc
Vendor an ES6-modules-compatible Pako
...
This commit vendors a converted, stripped-down version of Pako which
uses ES6 modules instead of CommonJS modules.
2017-03-01 11:21:32 -05:00
Solly Ross
3ae0bb0968
Uncomment ES6 module syntax
...
This removes the special comment part of the ES6 module syntax,
opting to enable ES6 module syntax by default.
It also appends `.js` to all import paths to better support in-browser
loading.
2017-02-26 16:30:37 -05:00
Solly Ross
d55e454582
Fix typos in imports and i18n
...
`app/ui.js` had an incorrect import path which caused issues
when using the ES6 and/or CommonJS builds of noVNC.
`core/util.js` had a non-strict-compatible declaration of a variable
without a `let` or `var` (it now uses `let`).
This fixes both issues.
2017-02-26 16:30:37 -05:00
Samuel Mannehed
b56d975248
Merge branch 'settingswhileconnected' of https://github.com/samhed/noVNC
...
Closes pull request #778
2017-02-24 15:42:27 +01:00
Samuel Mannehed
7a005a1b18
Merge branch 'disableLabels' of https://github.com/samhed/noVNC
...
Closes pull request #776
2017-02-24 15:13:09 +01:00
Pierre Ossman
6e8a8c8df1
Remove 512x512 icon
...
It is not a launcher icon, but rather used for display on Google
Play. As such it is not needed and removing it mitigates the issue
of some buggy browsers downloading each and every listed icon.
2017-02-23 16:29:16 +01:00
Pierre Ossman
90ecc739df
Protect against race in setCapture() polyfill
...
It might take a long time for a timer to fire, long enough for a
new grab to be initiated. Clearing out the capture element would
then cause a crash.
2017-02-23 14:26:50 +01:00
Samuel Mannehed
24584cca89
Disable labels for settings as well
...
Makes the settings UI easier to read.
2017-02-21 11:58:03 +01:00
Samuel Mannehed
6c857dc50c
Set input type number for port & reconnect_delay
2017-02-21 11:57:24 +01:00
Pierre Ossman
a7ca8e5c1a
Fix wrong colours on local cursor
...
The RGB order was backwards compared to the pixel format we've
requested, resulting in the red and blue channels getting swapped.
2017-02-20 16:44:54 +01:00
Samuel Mannehed
fb49f91b00
Allow local cursor to be changed while connected
2017-02-19 01:53:41 +01:00
Samuel Mannehed
3a535adab0
Allow auto reconnect to be changed while connected
2017-02-19 01:53:41 +01:00
Samuel Mannehed
ef1e8bab22
Allow view_only to be changed while connected
2017-02-19 01:53:41 +01:00
Samuel Mannehed
f78a652e86
Don't send or recieve clipboard in view_only
2017-02-18 20:39:57 +01:00
Samuel Mannehed
0298305e80
Allow clipping to be changed while connected
2017-02-18 16:30:35 +01:00
Samuel Mannehed
c3325dc6f7
Fix translateDOM for placeholders
...
Replaced 'in' with a comma, like in the surrounding code.
2017-02-17 12:45:54 +01:00
Pierre Ossman
e677b66cc7
Proper workaround for Chrome's scrollbar bug
...
Avoid applying this workaround more than necessary. Also comment a
bit more why this hack is needed.
2017-02-16 16:28:55 +01:00
Samuel Mannehed
b56772ec43
Update drag button at right time
...
It needs to update whenever the viewport or clipping changes, so
let's make sure that actually happens and not trigger on mildly
related events.
2017-02-16 16:07:55 +01:00
Samuel Mannehed
6bfd9dc96f
Update clipping before changing scaling
...
The scaling is relative the current viewport, so we need to make
sure it is correct before changing the scale setting.
2017-02-16 16:07:55 +01:00
Samuel Mannehed
5f38376adb
Don't change stored setting when "forcing"
...
Don't overwrite the user's configured choice. Instead ignore
settings when they cannot be respected.
2017-02-16 16:07:55 +01:00
Samuel Mannehed
631428d966
Fix status class for IE
...
IE apparently doesn't support removing several class specifiers at
once, so switch to several calls.
2017-02-16 16:07:55 +01:00
Samuel Mannehed
b18ef8162e
Allow scroll bars on Safari and IE
...
The previous problems were because we were scrolling the wrong element,
so we can enable this feature now.
2017-02-16 16:07:40 +01:00
Samuel Mannehed
f3b7727535
Fix canvas size on IE
2017-02-16 14:48:34 +01:00
Samuel Mannehed
280676c7e9
Properly encapsulate the scale in Display
...
Other parts of the code shouldn't have to care about this. Let Display
convert between canvas coordinates and framebuffer coordinates.
2017-02-16 14:00:39 +01:00
Samuel Mannehed
8cbf1dd9d2
Set correct cursor style for setCapture()
2017-02-16 14:00:36 +01:00
Samuel Mannehed
10d1ecc118
Remove return value from event handlers
...
It's not used in modern event handlers.
2017-02-16 13:59:34 +01:00
Samuel Mannehed
a0e3ec0ae6
Stop using window.event
...
It's an old propriatary IE thing that isn't necessary.
2017-02-16 13:59:34 +01:00
Samuel Mannehed
af1b2ae1e5
Remove Util.getEventPosition()
...
It mostly dealt with scrolling which we don't use. It also made mistakes
in some cases. Remove it and compute the coordinates directly in the
calling code.
2017-02-16 13:59:34 +01:00
Samuel Mannehed
b69dda9b19
Clean up some mouse workarounds
...
Adds comments that clarifies why they are needed. Also narrows the
handler for contextmenu a bit.
2017-02-16 13:59:34 +01:00
Samuel Mannehed
1658466579
Improve setCapture polyfill
...
Fix some corner cases.
Fixes issue #773
2017-02-16 13:59:22 +01:00
Pierre Ossman
0ee5ca6ebe
Fix tests after changing auth negotiation
...
PhantomJS has a very basic implementation of Uint8Array, so we
need to help it out a bit.
2017-02-13 15:00:32 +01:00
Pierre Ossman
95533c579e
Better selection of auth type
...
If no authentication is required then we should pick the None
option to avoid bothering the user.
2017-02-13 13:58:10 +01:00
Samuel Mannehed
bd7d89e7cc
Fix resize on Chrome
...
Chrome sucks at calculating the size and gets confused due to the
scrollbars. Hide the scroll bars while resizing.
2017-02-10 16:39:18 +01:00
Pierre Ossman
6ffdfd3aa7
Improve check for when to ignore mouse events
...
The browser tells us which element was under the cursor, so we don't
have to calculate it ourselves.
2017-02-09 16:02:58 +01:00
Pierre Ossman
86d15a4929
Use setCapture() polyfill everywhere
...
This makes sure we get consistent behaviour across all browsers.
2017-02-09 15:51:22 +01:00
Pierre Ossman
b345859ed6
More aggressive retaining of focus
...
Try to keep the virtual keyboard up even more. Only release focus
when it is absolutely necessary.
2017-02-09 14:20:37 +01:00
Pierre Ossman
0ae5b50a0e
Expect console.debug(), not console.log(), in test
...
We use the more specific function now, even though it is usually an
alias.
2017-02-07 16:44:16 +01:00
Pierre Ossman
d314d2c226
Merge branch 'util-console' of https://github.com/tghw/noVNC
2017-02-07 16:37:58 +01:00
Pierre Ossman
3f48c7017d
Tweak spinner appearence
...
Change the look of the "busy" spinner a bit. It's mostly used for
connection stuff, so give it a more data flow feel. Also bling it
up a bit with some fading. Perty sells. :)
2017-02-07 16:09:10 +01:00
Pierre Ossman
ec7ba3eeae
Remove binary protocol tests
...
We require standard adherence now, so remove tests that assume
the old system.
2017-02-03 17:16:02 +01:00
Pierre Ossman
c4482d2de5
Remove buffer limit tests
...
We no longer limit writes to the socket.
2017-02-03 17:15:27 +01:00
Pierre Ossman
d2467189f5
Don't delay WebSocket flushing
...
The native WebSocket is in a much better position to do queue
management than us. We also failed to check the return value and
set up a timer, causing stalls.
This gets us in sync with websockify as of 40238b00.
2017-02-03 17:12:41 +01:00
Pierre Ossman
84b05d24b0
Allow submitting the password from the input field
2017-02-03 13:19:15 +01:00
Pierre Ossman
648c83984c
Scroll correct element
...
The element we want scrolling around is noVNC_screen, not the entire
window. This also allows us to compute the screen size without
fiddling the scrollbars on and off.
2017-02-03 13:17:43 +01:00
Pierre Ossman
2e6a58fb15
Avoid changing scale unless necessary
...
It causes the browser to redo the layout needlessly otherwise,
having annoying effects like moving the scroll position.
2017-02-03 12:00:13 +01:00
Pierre Ossman
a6e52f9a73
Merge display scale changes
2017-02-03 11:56:02 +01:00
Pierre Ossman
f6299e0aed
Move keyboard style in CSS
...
Put it so it matches where it is in the HTML.
2017-02-03 11:44:24 +01:00