Commit Graph

2493 Commits

Author SHA1 Message Date
Samuel Mannehed deb76f97cd Add some sane default CSS for textareas 2025-01-23 15:40:52 +01:00
Samuel Mannehed f0ec3d62b5 Avoid 2 borders when focus-visible on text inputs
By having the focus-visible outline overlapping the regular border
things look a bit more sane on text input elements.
2025-01-23 15:40:52 +01:00
Samuel Mannehed 91cd920266 Keep CSS for different input elements together
By moving the CSS for select buttons to the bottom, we keep a more
logical ordering of the elements.
2025-01-23 15:40:52 +01:00
Samuel Mannehed 1c45fd8547 Capitalize CSS section headings
Makes them easier to distinguish from regular comments.
2025-01-23 15:40:52 +01:00
Samuel Mannehed d8199859d3 Support 'disabled' attribute on labels
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.
2025-01-23 15:40:52 +01:00
Samuel Mannehed e092f06d01 Move general :disabled rules to common top section
Start with general stuff, followed by specific things.
2025-01-23 15:40:52 +01:00
Samuel Mannehed ee08032fe7 Put specific :disabled rules with its element
It makes more sense to group rules per element type.
2025-01-23 15:40:52 +01:00
Samuel Mannehed 30d46a00fa Fix :disabled styling of file-selector-button
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.
2025-01-23 15:40:52 +01:00
Samuel Mannehed 33a2548fcb Make buttons flat by removing borders
Gives a more clean look that fits well with the new checkboxes and
radios. The old border was mostly used to contribute to a 3d-effect,
that was used for :active. That :active-styling has been replaced by
activation levels.
2025-01-23 15:40:40 +01:00
Samuel Mannehed 017888c9a8 Rework how buttons react to :hover and :active
Instead of having two different types of effects (hover had a different
color, and active had a 3d-effect simulating a pressed button), we now
have an increasing activation-level. That means the button goes a bit
dark for hover, and then even darker when pressed.

There is also a variant that goes lighter for each activation level,
that can be used when the initial color is dark.

With this change, we can get rid of special :hover and :active styling
for the connect button and the control bar buttons. We can use the same
activation level principle for all buttons.
2025-01-23 15:39:19 +01:00
Samuel Mannehed 7fdcc66d2c Add indeterminate styling to checkboxes and radios
This is used when the control is neither checked or unchecked.
2025-01-23 15:39:19 +01:00
Samuel Mannehed 633b4c266d Redesign checkboxes and radiobuttons
Makes them bigger and gets rid of their borders. The change also allowed
for some shared styling between them.
2025-01-23 15:39:19 +01:00
Samuel Mannehed e1208b0939 Redesign select dropdown arrow
Makes it more of a "V"-shape rather than a triangle, suits better in the
new spacier select-buttons.
2025-01-23 15:39:19 +01:00
Samuel Mannehed 3f29c9d993 Differentiate buttons from text inputs
By making buttons grey with bold text, they are easy to distinguish from
text inputs.
2025-01-23 15:39:19 +01:00
Samuel Mannehed e9b48ae409 Get rid of gradients on buttons and inputs
Lets make things more flat and modern.
2025-01-23 15:39:19 +01:00
Samuel Mannehed ca270efcc3 Standardize on 6px or 12px border-radius
This results in a few things becoming slighly more rounded, for example
the controlbar, the settings panel and buttons/inputs. Increased
rounding gives a more friendly feel.
2025-01-23 15:38:57 +01:00
Samuel Mannehed 7603ced54e Create CSS variables for common noVNC-colors 2025-01-13 08:32:19 +01:00
Samuel Mannehed 72cac2ef6a Add margin between label and input in noVNC_panel
To make stuff feel less cramped, lets add some margin here.

As of comitting this, it only affects the logging-level select dropdown
in the settings, but this is a general rule of thumb. It doesn't apply
to checkboxes or radios since they have a margin by default, and their
label to the left.
2025-01-11 23:20:33 +01:00
Samuel Mannehed bf245da7b7 Increase padding of buttons and inputs
Gives them a more modern and spacious look.
2025-01-11 23:02:37 +01:00
Samuel Mannehed 4bbed1dc12 Standardize on 4 space-indentation in CSS files
This is what we use in every other file in noVNC. It also much more
common for a CSS file in general. By standardizing on 4 spaces we can
avoid indentation mistakes.
2025-01-11 17:51:02 +01:00
Samuel Mannehed 3193f808b5 Comment different resize functions in rfb.js 2024-12-27 14:48:20 +01:00
Samuel Mannehed e6e03a226f Fix resizes back to initial remote session size
Since the expected client size wasn't updated when the browser window
resized, noVNC didn't resize the canvas properly when going back to
the exact same dimensions.

Fixes issue #1903
2024-12-27 14:48:11 +01:00
Pierre Ossman 673cb349fd Replace po2json with pofile
The former doesn't seem to be properly maintained and nodejs gives
deprecation warnings.
2024-12-17 17:15:14 +01:00
Pierre Ossman 3e2e04bea1 Replace node-getopt with commander for args
node-getopt isn't maintained and nodejs has started complaining about
deprecated features in it.
2024-12-17 16:44:21 +01:00
NNN1590 52392ec150
Update Japanese translation 2024-12-14 15:59:01 +09:00
Pierre Ossman 52ddb20d25 Merge branch 'master' of https://github.com/wxtewx/noVNC 2024-11-27 16:12:05 +01:00
Pierre Ossman 7335bb440d Also adjust to "sentence case" in translations
This would have resolved itself automatically on the next translation
update, but this commit will reduce unnecessary noise in that change.
2024-11-27 16:04:18 +01:00
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
wxtewx 90a6c7bbb6
Update zh_CN.po 2024-11-23 15:36:12 +08:00
Pierre Ossman 2463ccd08f Detect broken Firefox H.264 decoder
The Firefox H.264 decoder on Windows might simply just refuse to deliver
any finished frames. It also doesn't deliver any errors.

Detect this early by expecting a frame after flush() has completed.
2024-11-21 13:33:52 +01:00
Pierre Ossman a89dfd6141 Handle exceptions from VideoDecoder.flush()
These are not supposed to happen according to the specification, but
Firefox has some bug and throws them anyway.
2024-11-21 13:33:32 +01:00
Pierre Ossman 3677afe305 Do a real H.264 test decode to determine support
Firefox is buggy and reports support for H.264 but then throws errors
once we actually try to decode things. Detect this early by doing a
quick test decode of a single frame.
2024-11-21 13:33:31 +01:00
Pierre Ossman 69750c74a6 Raise JavaScript version requirement
So that we can use await at module top level.
2024-11-21 13:33:10 +01:00
Pierre Ossman 89e0591aab Use common H.264 check in tests
Avoid duplicating this logic in multiple places.
2024-11-21 13:19:44 +01:00
Pierre Ossman 43326eb67b Fix handling of VideoDecoder.isConfigSupported()
It returns an object with details, not just a simple boolean.
2024-11-20 10:46:52 +01:00
dim5x 88a5a59629 Fix typos in Russian translation 2024-11-02 04:38:57 +03:00
Pierre Ossman ed1fef4fc3 Merge branch 'ui_init' of github.com:CendioOssman/noVNC 2024-10-09 13:12:33 +02:00
Pierre Ossman 28d4020302 Load settings from web server
Make it even easier to customize things by loading the settings from
separate configuration files.
2024-10-03 16:08:53 +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 047531e886 Merge branch 'webcodec-h264' of https://github.com/any1/noVNC 2024-08-29 16:59:25 +02:00
Pierre Ossman 50e4685bff Fix tests for large WebSocket sends
These failed to test that the data was correctly split as they only
checked the first chunk transmitted.

Use random values to avoid the risk of aligning our test data with the
split boundaries and hence allowing false positives.
2024-08-29 16:51:51 +02:00
Pierre Ossman ffb4c0bf56 Let fake WebSocket handle large sends
Dynamically grow the recorded send buffer if the test needs to send a
lot of data.
2024-08-29 16:51:16 +02:00
Tomasz Kalisiak a4465516df
Fix sQpushBytes sending the beginning of the array multiple times 2024-08-23 13:14:36 +02:00
Andri Yngvason c1bba972f4 Add unit tests for H.264 decoder 2024-08-19 22:08:32 +00: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
Andri Yngvason d106b7a6bb Add H.264 decoder
This adds an H.264 decoder based on WebCodecs.
2024-08-18 14:06:25 +00:00
Mark Peek c6c8e5e513 Add Zlib encoding 2024-08-16 09:12:43 -07: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