Commit Graph

2377 Commits

Author SHA1 Message Date
Niko Lehto 3b562e8a0f Make clipBoardPasteFrom() test more specific
Don't rely on clientCutText() to test clipboardPasteFrom().
2020-02-17 09:34:44 +01:00
Samuel Mannehed 4ab5070548
Merge pull request #1361 from alvintownsend/master
Correcting path to package.json for running at a path other than root.
2020-02-12 11:25:04 +01:00
Alvin Townsend 546edcd4a0 Correcting path to package.json for running at a path other than root. 2020-01-31 11:34:53 +01:00
Samuel Mannehed 71bb3fdfa5 Fix color channels for VMware alpha cursors
The red and blue channels were incorrectly swapped.
2020-01-30 11:48:17 +01:00
Pierre Ossman eb05b45b70 Make afterEach() hooks work when skipping tests
Mocha will now run afterEach() hooks when tests are skipped, so we need
to make them more robust against things being partially set up.
2020-01-23 14:27:37 +01:00
Juanjo Diaz 8394462356 Remove generated HTML by Cursor when it detaches 2020-01-23 11:58:16 +02:00
Pierre Ossman 2d53a785d5 Merge branch 'abstraction_for_detection' of https://github.com/samhed/noVNC 2020-01-14 09:45:28 +01:00
Samuel Mannehed 64fdd336a0 Simplify encodeUTF8/decodeUTF8 unittests 2020-01-03 10:41:34 +01:00
Samuel Mannehed 80c72e92d2 Add unit tests for encodeUTF8 and decodeUTF8 2020-01-02 17:29:41 +01:00
Samuel Mannehed cbf090fe70 Remove unused python scripts 2020-01-02 13:56:07 +01:00
Samuel Mannehed 274652d119 Fix chinese translation for "Disconnect"
Thanks for @wavezhang, @litongjava, and @bhzhu203 for helping out.
2020-01-02 13:24:42 +01:00
Samuel Mannehed 208e34bc34 Update chinese translation strings
Thanks to @QQ2017 and @wavezhang for helping out with correcting these.
2020-01-02 13:18:24 +01:00
Samuel Mannehed 11ae8f0ef4 Add comment for browser and platform detection 2020-01-02 11:30:34 +01:00
Samuel Mannehed c32d4f3cd0 Add short description at the top of browser.js 2020-01-02 11:30:34 +01:00
Samuel Mannehed e52a278ed7 Properly detect scrollbar gutter
As a rule, instead of hard-coding a behavior on specific platforms we
should do dynamic detection.

This commit moves away from always hiding scrollbars on Android and iOS
and instead detects the rendered width of scrollbars in the browser.
2020-01-02 11:30:18 +01:00
Samuel Mannehed 8f230f45cc Remove Google Chrome Frame plugin compatability
Chrome Frame has been retired we so we can remove it from this
compatability tag.
2019-12-31 02:15:07 +01:00
Samuel Mannehed 78bbf6bad2
Restore X-UA-Compatible meta tag to vnc_lite
It's still required since without this IE's default setting for "Display intranet web pages in compatibility mode" will cause errors.
2019-12-31 02:07:31 +01:00
Samuel Mannehed 3a64043f28
Restore X-UA-Compatible meta tag to vnc.html
It's still required since without this IE's default setting for "Display intranet web pages in compatibility mode" will cause errors.
2019-12-31 02:06:02 +01:00
Pierre Ossman 49db41ea4b Allow cursor to be updated while connecting
We haven't got a server provided cursor at this point, but we might
have done something local, e.g. enabled the dot cursor.
2019-12-30 09:30:00 +01:00
Pierre Ossman d507d1415e Make sure "undefined" can be a default parameter value
Lower layers can consider null to be a valid value, when we'd rather
they treat the value as not set.
2019-12-25 12:10:21 +01:00
Pierre Ossman c4eb4ddcfe Handle slow loading of images
Internet Explorer seems to flag images as loaded prematurely, which
can result in rendering bugs. We can detect this by looking at the
dimensions though.
2019-12-23 15:52:54 +01:00
Pierre Ossman 4babdf33bd Validate decoded image dimensions
They are expected to be a certain size, so verify this so no server
tries to do something broken.
2019-12-23 15:42:02 +01:00
Pierre Ossman b8d1a8bb57 Avoid using Array.includes()
Internet Explorer doesn't have this method. Use the safer indexOf()
instead.
2019-12-23 15:42:02 +01:00
Samuel Mannehed 2cf82a5c8e Build in the behavior to ignore decodeUTF8 errors
Makes the code clearer and more explicit in intent.
2019-12-23 10:27:40 +01:00
Pierre Ossman 06a8f7d91a Use undefined as the default value for password
An empty password is techincally legal, and now supported by the
RFB core, so we cannot use that as a placeholder for "no password".
2019-12-23 09:35:51 +01:00
Samuel Mannehed dbbb676da9
Peter is no longer part of the noVNC team 2019-12-21 00:26:57 +01:00
Samuel Mannehed 84a8c1b0cc
Merge pull request #1327 from vanym/decodeUTF8_try_catch
Fixes exception when desktop name contains non-utf8 character
2019-12-07 20:12:27 +01:00
VanyM ff1b10ca66
Add try catch in every place that uses decodeUTF8 2019-12-06 09:44:11 +03:00
Chris "Koying" Browet 1c9826140a Add support for Unix Tight auth 2019-12-05 15:46:31 +01:00
Chris Koying Browet 5b453ed4a8 Expand password dialog to work for usernames too
Some VNC authentication schemes use usernames, our UI should support
these.
2019-12-05 15:46:24 +01:00
Samuel Mannehed b39caa7469
Merge pull request #1318 from chrisjdev/emptyPassword
Allow connecting with empty string credentials
2019-12-05 12:15:43 +01:00
Chris J 01d4514dee Allow connecting with empty string credentials
Checking for undefined instead of falsy. That way an empty strings are allowed.
2019-12-05 12:13:11 +01:00
Samuel Mannehed 80b078c469 Add encodeUTF8 function to core/util/strings.js 2019-12-04 10:37:11 +01:00
Pierre Ossman 9f557f5280 Make Cursor.detach() safe to call when not attached
Avoids having checks in higher layers.
2019-11-29 10:08:15 +01:00
Samuel Mannehed 94c89284fc
Fix chinese translation errors
Thanks to @QQ2017 for providing the translation strings
2019-11-28 12:51:32 +01:00
Samuel Mannehed b17f6c6929 Simplify logic for status hierarchy
Removes unnecessary variable
2019-11-25 17:03:55 +01:00
Samuel Mannehed afa1f8a2ab Ensure warning status timeouts are honored
When showing a new status popup we want to set a timer for how long to
show it. In cases where we show many statuses in a fast succession we
need to remove any running timeouts when showing a new one.

There are exceptions when new statuses won't be shown, and thats if a
more severe status is already showing, i.e and error or a warning.

Warnings can still have timeouts. There was a bug that occured when we
tried to show a normal status while a warning was showing. The bug
caused the warning status timeout to be removed even if the normal
status was never shown. We should only remove running timeouts if we're
actually going to show a new status.
2019-11-25 16:38:03 +01:00
Pierre Ossman 686c8d259a Merge branch 'babel' of https://github.com/CendioOssman/noVNC 2019-11-12 14:12:18 +01:00
Pierre Ossman d01ecc18d5 Don't use arrow functions in legacy loader
The browsers that need the legacy code do not support such fancy
modern things.
2019-11-12 14:05:55 +01:00
Pierre Ossman 66ab0d98d7 Load support scripts first
E.g. SystemJS requires the Promise polyfill, so make sure all our
support files are loaded first.
2019-11-12 14:05:55 +01:00
Pierre Ossman 0dd439a874 Upgrade to latest babel
There has been a lot of renaming and restructuring in babel, so we need
to modify our code to handle the latest version. We also need to adjust
the way we build our babel worker as babel itself no longer runs in older
browsers such as Internet Explorer.
2019-11-12 14:05:55 +01:00
Samuel Mannehed ae127d8a38
Merge pull request #1319 from wavezhang/patch-2
Update zh_CN.po
2019-11-11 16:46:36 +01:00
Pierre Ossman b88a92afe8 Always include Promise polyfill for legacy browsers
It is now used by our general code and not just by the conversion
routines, so we need to make sure it is always included for the
old browsers.
2019-11-11 13:36:30 +01:00
Pierre Ossman 6b20803401 Clean up handling of untransformed files
This control flow is difficult enough as it is to follow. Move the
handling of the untransformed files to a separate block to make it
slightly easier to understand.
2019-11-11 13:33:47 +01:00
Pierre Ossman 8cfa673d94 Remove redundant "no copy" check
We also check this list as a filter to walkDir(), so no need for the
extra check here.
2019-11-11 13:32:19 +01:00
Pierre Ossman c6e37040de Use proper backticks for generating legacy script tags 2019-11-11 10:01:43 +01:00
wavezhang 9653598af7
Update zh_CN.po
fix spell errors, improve translations
2019-11-08 14:08:23 +08:00
Alex Tanskanen a6304f91d0 Fix missing caps lock events on iOS
Caps Lock on iOS only trigged key release or key press events.
When it's clicked it would only send keydown, and next time
it would only send keyup and so on. It should send both a key press
and a key release.

Also added the unit tests for macOS since those were missing.

Co-Authored-By: Alex Tanskanen <aleta@cendio.se>
2019-11-07 16:44:26 +01:00
Samuel Mannehed c15502525e Add README to app/locale warning not to modify 2019-11-07 13:07:45 +01:00
Alex Tanskanen 175b843b66 Add "macOS shuffle" to iOS as well
Since iOS functions like macOS with regards to Alt behaving like AltGr,
we need the same workaround on iOS as well.
2019-11-04 14:22:46 +01:00