Commit Graph

289 Commits

Author SHA1 Message Date
Pierre Ossman 7f5b51acf3 Consistently use "sentence case" style
Try to be more consistent in how we capitalize things. Both the "Title
Case" and "Sentence case" styles are popular, so either would work.
Google and Mozilla both prefer "Sentence case", so let's follow them.
2024-11-27 14:40:40 +01:00
Pierre Ossman ed1fef4fc3 Merge branch 'ui_init' of github.com:CendioOssman/noVNC 2024-10-09 13:12:33 +02:00
Pierre Ossman 438e5b3608 Make it easier for downstream to modify settings
Expose a simple and stable API to override default settings, and force
settings that users shouldn't be able to change.
2024-10-03 16:08:53 +02:00
Pierre Ossman bbb6a5b938 Fix host and port via query string
We need to call initSetting() even if we don't have any interesting
default to set, as that is what checks if values have been provided as a
query string.

Fixes 96c76f7.
2024-08-19 14:01:00 +02:00
Pierre Ossman 84897fd110 Handle disabling settings without label 2024-08-08 15:59:59 +02:00
Pierre Ossman c6606a5caf Merge UI startup in to a single routine
Makes it easier to see how things are connected.
2024-08-08 15:59:58 +02:00
Pierre Ossman 9334c68241 Handle all settings via UI.getSetting()
Makes sure everything behaves the same way, even if there is no visible
UI for a settings.
2024-08-08 15:00:48 +02:00
Pierre Ossman 96c76f7709 Allow relative WebSocket URLs
This can be very useful if you have multiple instances of noVNC, and you
want to redirect them to different VNC servers.

The new default settings will have the same behaviour as before for
systems where noVNC is deployed in the root web folder.
2024-08-08 14:53:42 +02:00
Pierre Ossman 074fa1a40f Let browser construct URL string for us
Likely a lot safer for corner cases than us trying to figure this out
ourselves.
2024-08-08 14:40:04 +02:00
Samuel Mannehed e75938bebc Make non-HTTPS message more harsh
As browsers are placing more and more new functionality as
secure-context only, we need to prepare users for more problems. I find
it likely that we will disable non-HTTPS connections in the future.
2024-02-02 16:51:21 +01:00
Pierre Ossman 9ac632deee Handle immediate connection errors
The browser might throw an exception right away if there is something it
doesn't like with our connect attempt. E.g. using a non-TLS WebSocket
from a TLS web page.
2023-12-05 11:30:30 +01:00
Pierre Ossman 0374b4c0fc Handle translation loading in translation class
Let's try to keep as much as possible of the translation handling in a
single place for clarity.
2023-05-10 13:11:51 +02:00
Pierre Ossman a4453c9a26 Special case English translation fallback
We should not be listing this in LINGUAS as that gives the impression
that English has en explicit translation. Instead, it is a special case
that the code needs to be explicitly aware of.

This reverts 9a06058 in favour of a more robust fix.
2023-04-05 12:46:17 +02:00
Mathis Marcotte 9a06058f66 Added english to list of supported languages 2023-03-27 14:23:09 +00:00
Pierre Ossman 5de478d6e7 Restrict forced panning to known bad platforms
Let's not punish systems that implement overlay scrollbars in a
functional way. The only current example is Firefox on Windows 11 and on
Linux.
2022-12-27 12:50:57 +01:00
Pierre Ossman 7f4a9eebc8 Export clipping state externally
So that UI can reflect if it is currently possible to drag the viewport
or not.
2022-12-27 12:50:57 +01:00
Samuel Mannehed 05baf14256 Remove outer div from noVNC_connect_button
Instead of having an outer "box", we can use an outline on the button
itself to create this "platform". Since the outline isn't part of the
size of the element, it will appear wider than before, when compared to
the logo. To counteract that we remove the left and right padding from
the logo to make the entire noVNC_connect_dlg more narrow.

We also had to slightly adjust the :active style since we don't want the
entire "platform" to move when the button is clicked.
2022-12-15 10:44:27 +01:00
Samuel Mannehed f1550c69d9 Get rid of noVNC_touch in favor for @media queries
This commit removes our dependency on the class "noVNC_touch" which was
set by Javascript. Instead, we can use the CSS media query
"any-pointer: coarse", which means that any pointing device that isn't
accurate is available. In practice this seems to basically be equal to
that a touch screen is available.

This change lets us simplify the selectors in many cases as well, which
is a nice bonus.
2022-12-14 14:06:16 +01:00
Samuel Mannehed f983c78d17 Make connect button a regular <button>
It is a button, let the HTML element reflect that. And instead of
having the outer div being clickable, lets only make the inner one
work like a button. Because of that, this commit renames the outer div
to "connect_box" instead of "connect_button".

Note that we remove the disabled :hover-effect for touch on this button.
It doesn't make much difference since this button is one of a kind.
2022-12-14 13:28:27 +01:00
Samuel Mannehed 3141c0e01b Only show the control bar hint once per "move"
After the user has "followed" the hint by dragging the handle to the
other side, the control bar will switch to that side. Once this has
happened, we will now hide the hint until the user starts over by
dragging the handle again.
This change was added to make the hint feel more like a "hint" and less
like a permanent GUI element. It isn't as persistent and intrusive now.

Note that we don't want the act of hiding the hint to result in a
transition animation here.
2022-10-24 13:03:50 +02:00
Pierre Ossman efb2400833 Merge branch 'italian' of https://github.com/M2Rbiz/noVNC 2022-09-14 10:36:27 +02:00
Samuel Mannehed 69e0f0f5db Remove unnecessary clipboard clear button
This button fills no real purpose. It's easy to mark everything and
delete with either "Ctrl + A -> Delete" or, on touch devices, "long
press -> mark everything -> Delete".
2022-09-09 16:03:49 +02:00
Fabio Fantoni 5d8ede61f9
Add italian translation 2022-09-08 14:56:04 +02:00
James Kinsman faedcd0210
Allow continued reconnect tries
Currently novnc will only retry once (assuming the server is unavailable) and then stop (as the detail from is unclean, usually "failed to connect"). Minor change will continue to reconnect every reconnect_delay seconds until either reconnected or user intervention cancels the attempt.
2022-08-08 14:22:41 +01:00
Pierre Ossman cdfb336651 Add warnings about insecure context
Most (all?) new APIs will require a "secure context", which generally
means served over TLS. We can expect crashes because of missing
functions if this requirement isn't fulfilled, so try to warn the user.
2022-05-12 15:48:46 +02:00
Pierre Ossman 15a0608e04 Make sure server verification dialog is closed
It should be closed at this point just like all other dialogs and
panels.
2022-03-10 16:28:15 +01:00
pdlan a1709b999e Added support for RSA-AES Unencrypted Security Type 2022-03-08 13:24:26 -05:00
Jose (Ito) Matsuda dd20b17d49 feat: add French localization strings 2021-05-06 22:35:18 -04:00
Liddack 89f9ac0016 Add Portuguese (Brazil) translation 2021-03-16 13:30:23 +01:00
Pierre Ossman 5b5b747494 Remove many small, obsolete, old browser hacks
These are for browsers no longer supported anyway.
2020-12-07 10:10:53 +01:00
Pierre Ossman 6cd9bacf8b Use Fetch API for getting JSON data
We no longer need to support Internet Explorer so we can use a more
proper API here.
2020-12-04 16:43:44 +01:00
Pierre Ossman 8be924c9d9 Add touch gestures for mouse emulation
Add several single and multitouch gestures to simulate various mouse
actions that would otherwise be impossible to perform.

This replaces the old system where you could select which mouse button
a single touch would generate.
2020-06-12 09:18:46 +02:00
Samuel Mannehed 756af5b44c Standardize on camelCase in App 2020-05-31 23:37:29 +02:00
Samuel Mannehed a7fe079f81 Standardize on camelCase in Logging 2020-05-31 23:37:29 +02:00
Pierre Ossman 42e3b03fa8 Consistently close dialogs on connect/disconnect
This was done a bit arbitrarily before which could easily miss things,
end up in the wrong state and not trigger animations correctly.

This reverts commit c12e5b2b54 and fixes
things in a different way.
2020-05-05 12:43:04 +02:00
Samuel Mannehed 479d8cefd1 Add ability to set compression level
Fixes github issue #1382.
2020-05-01 20:47:36 +02:00
Samuel Mannehed e7fa686f32 Fix indentation for focus check 2020-05-01 15:34:14 +02:00
Samuel Mannehed 8df281cce6 Don't fade the control bar if it has focus
Fixes github issue #1369
2020-05-01 14:38:09 +02:00
Alex Tanskanen a040c402ed Fix focus problem after closing the toolbar
Closing the toolbar would make the focus remain on the toolbar and
not in the session. The only way to switch focus was to click in the
session. This commit will automatically switch back focus to the session
after closing the toolbar.
2020-03-12 13:17:51 +01:00
Pierre Ossman 5243cbf611 Add UI for quality setting 2020-02-28 14:54:09 +01:00
Niko Lehto 9253e178fc Hide clipboard side bar button when view only mode
The clipboard side bar button serves no purpose if user uses 'View Only'
mode, this commit hides this button in those instances.
2020-02-24 08:57:28 +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 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
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
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 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
Samuel Mannehed 94a01b0ae0 Keep the virtual keyboard after using extra keys
If using the extra keys always gives focus to the screen then an
on-screen keyboard would be closed. When using on-screen keyboards we
instead want to give focus to our virtual keyboard input element.
2019-10-31 16:24:06 +01:00
Samuel Mannehed a5aa8e1282 Move focus to the screen when using extra keys
A regression from 2afda54 and friends was that you couldn't use the
extra keys and then directly use the keyboard, you would have to click
in the session first.

This commit restores the correct behavior and also adds a visual queue
to the fact that the screen got the focus by fading the controlbar.
2019-10-28 10:37:10 +01:00
Samuel Mannehed c568ad4c74 Add missing scancode for sendTab 2019-10-28 10:02:23 +01:00