Mainly to keep eslint happy with its new recommended rules. But it also
makes the code more clear to not have unused stuff in it.
The des code got a bit more refactoring since eslint was upset about the
final "i++" as it was technically an unused assignment.
Dispatch an event on each state transition inside the WakeLockManager.
This gives the unit tests something to synchronise on, allowing us to
write fast, flake-free tests.
Add an error state to the WakeLockManager state machine. This adds a
transition that can be detected from tests (it otherwise serves no
purpose, and the system immediatly transitions back into the released
state).
Add a new configuration option `keep_device_awake` to allow noVNC to
stop the local display from going to sleep. This is especially useful
with view-only sessions.
This new option has been added to the configuration UI, making it easier
for users to configure. When this option is changed at runtime, we will
request/release the wake lock.
We only hold the view lock while connected to a server. We will also
attempt to reacquire the wakelock if we lost it due to a visibility
change (the tab becoming inactive, or during the transition into/from
fullscreen).
All existing unittests have been run, and the change has been manually
tested in Firefox 145. Additional tests will be added later.
With async clipboard available, the fallback clipboard textarea adds
mostly confusion. If async clipboard is out right denied, users most
likely don't want to see any clipboard activity.
Since the extra keys panel is quite narrow in width, a max-width style
resulted in the buttons almost disappearing. That rule was only intended
for elements inside the settings panel.
Broken by commit 14f9ea5880.
Another minor error that is also fixed by this commit is that the
clipboard textarea no longer incorrectly gets a left margin of 6px.
Fixes#1946.
We don't want to assign a path directly to url.pathname that contains a
search query, since this causes '?' at the beginning of the query to be
URL-encoded to '%3F'. Instead use URL() to parse the path for us.
Both labels and inputs protruded outside the panel on for example a
phone in portrait mode. This commit fixes that by allowing wrapping and
setting a max-width.
Since the --input-xpadding variable is now used in two different CSS
files, it was moved to constants.css.
This is a type of select box that doesn't appear like a button, but more
like a textarea that lists options. It is not currently used, but added
for completeness.
Modern interfaces are less cramped, this makes noVNC feel more up to
date.
Note that this required some adjustments on noVNC_headings and
noVNC_connect_button since the text now takes up more height than the
images.
Note that the :disabled selector only works on inputs, buttons and the
like.
The current method of applying .noVNC_disabled to the settings
labels is still used. This support is added mostly for completeness.
Note that when a label wraps an input, only the label should have the
disabled attribute. Otherwise the effect applies twice to the input.
By applying the rule to the button within the input, we effectively
applied the opacity twice - making the button almost disappear. Applying
the opacity to the input element is enough.