Commit Graph

2316 Commits

Author SHA1 Message Date
Pierre Ossman 022fc8c374 Improve whitespace handling in translations
The HTML source will include line breaks and indentation that is only
for source formatting, and will not be displayed.
2022-12-27 15:39:11 +01:00
Pierre Ossman 367bfd2962 Use JavaScript highlighting for Synax sections
Follows what MDN does, and makes things a bit easier to read.
2022-12-27 15:03:32 +01:00
Pierre Ossman 934e3de356 Follow current MDN for syntax examples
The now avoid brackets for optional arguments, so let's try to have the
same style.
2022-12-27 15:00:39 +01:00
Pierre Ossman 74fe694cc4 Fix toBlob() documentation
These are copy-and-paste errors from the toDataURL() section.
2022-12-27 15:00:13 +01:00
Pierre Ossman ce534b85c1 Fix indentation of toBlob()/toImage() docs
It isn't considered a code block if it isn't indented properly.
2022-12-27 14:58:16 +01:00
Pierre Ossman caf0ecc99b Consistent naming of RFB arguments
Make sure we call the arguments the same everywhere. Follow-up to commit
44d384b.
2022-12-27 14:55:06 +01:00
Pierre Ossman ceadcd6e83 Use reference style links in API docs
Makes everything a bit more readable.
2022-12-27 14:04:37 +01:00
Pierre Ossman e16b3b8620 Update feature list
Make sure everything is in sync with the current state of things.
2022-12-27 14:04:20 +01:00
Pierre Ossman d4197932d6 Update copyright year to 2022 2022-12-27 14:03:16 +01:00
Pierre Ossman 7e7e3ac07d List Joel and Solly as previous members
They are no longer active in the project, so list them under a different
section in relevant documents.
2022-12-27 14:02:44 +01:00
Pierre Ossman 1ff2ecd9f0 Merge branch 'ffscroll' of https://github.com/CendioOssman/noVNC 2022-12-27 13:13:48 +01: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 12a7c6f0de Check for Android using userAgent
Modern Android systems seem to report "Linux" for navigator.platform, so
we can no longer rely on that.
2022-12-27 12:50:57 +01:00
Pierre Ossman a187821e4f Add OS checks for Android and ChromeOS 2022-12-27 12:50:57 +01:00
Pierre Ossman 8fb30fb9dc Add unit tests for OS detection 2022-12-27 12:50:57 +01:00
Pierre Ossman ee5e3c5fa3 Refine browser detection
Try to follow the principle outlined by Mozilla when detecting browsers
and engines.
2022-12-27 12:50:57 +01:00
Pierre Ossman 4a34ee4b1e Remove navigator check from browser tests
This is a fundamental object that should always be present.
2022-12-27 12:50:57 +01:00
Pierre Ossman 88a36370a9 Add unit tests for browser detection 2022-12-27 12:50:57 +01:00
Pierre Ossman 28c9670427 Remove test code for old Chrome
We don't care about ancient versions of Chrome anyway, so let's keep
things simple.
2022-12-27 12:50:57 +01:00
Pierre Ossman 262a90b0e0 Consistently use "first" indentation
We already enforced this for most things, so let's fix up the last few
variants as well.
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
Pierre Ossman f172633715 Sort API alphabetically
So it is easier to find things as the API grows.
2022-12-27 12:20:40 +01:00
Pierre Ossman e6fce71d6a Merge branch 'add-mslogonii' of https://github.com/pdlan/noVNC 2022-12-23 14:43:06 +01:00
Samuel Mannehed 820b39c7d3 Reinstate outer div of noVNC_connect_button
There were two issues with removing the outer div of the connect button.

Firstly, rounded outlines don't work in WebKit browsers like Safari or
Epiphany (https://bugs.webkit.org/show_bug.cgi?id=20807) and this makes
the outline look completely square.

Secondly the code became too complex.

This reverts most of commit 05baf14256.
2022-12-23 13:44:58 +01:00
Samuel Mannehed bd2d3a58b0 Change element type of noVNC_logo
This is text, a <p> is better suited.
2022-12-23 13:44:58 +01:00
Samuel Mannehed 2b449b208e Get rid of WebKit's button top margin
It conflicts with our :active styling since it changes margin-top.
2022-12-23 13:44:57 +01:00
Samuel Mannehed 30f230b74c
Merge pull request #1732 from novnc/favicons
Favicon cleanups and fixes
2022-12-23 10:22:12 +01:00
Samuel Mannehed 6e1d842850 Use an ICO file for favicons
The browsers have been choosing very poorly and have a lot of bugs when
it comes to favicons. Using an ICO makes many browsers choose better in
most cases. Most large websites use ICO files.

The icons in the ICO file needs to be ordered largest to the smallest
icon, and due to a Chrome bug we are limited to 8 icons. This
unfortunately means we couldn't fit one of the Android sizes. The 72x72
icon was removed since testing showed that it was used the least.
2022-12-23 09:05:12 +01:00
Samuel Mannehed 139f087187 Explicitly specify icon size instead of density
Instead of calculating a density that we hope results in the correct
size, we can specify what size we want. This is more robust and easier
to understand. This also allows us to simplify the Makefile quite a bit.

Note that Fedora's packaging of ImageMagick has a bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=2140018
2022-12-23 09:05:12 +01:00
Samuel Mannehed 416e21151b Create specific apple-touch-icons
These icons shouldn't have any transparancy. Instead, we remove the
rounded corners and let iOS handle that.
2022-12-23 09:05:12 +01:00
Samuel Mannehed 9e9d5ef17d Simplify names of favicons
All of the icons are square, only providing the size in one direction is
enough. This change lets us avoid some unnecessary complexity in the
Makefile.
2022-12-22 16:50:11 +01:00
Samuel Mannehed c8d37ae8bd Provide up to date set of apple-touch-icons
Apple requires a different set of icons now-a-days. This change involves
removing the 76x76 icon and adding icons with the following sizes;
40, 58, 80, 87, 167 and 180.
2022-12-22 13:15:25 +01:00
Samuel Mannehed 079889a13a Stop including apple-touch-icons as regular icons
These icons are used differently and don't belong in the list of regular
browser icons.
2022-12-22 13:04:03 +01:00
Samuel Mannehed 9649b8ee25 Remove duplicate 48 icon from Android sizes
This size is already specified under BROWSER_SIZES.
2022-12-22 13:04:03 +01:00
Samuel Mannehed 034fd376ac Simplify icon variables by removing the filename
The filename is the same for all of these, lets break out that part to
simplify things.
2022-12-22 11:29:10 +01:00
Samuel Mannehed 99a9c03f3c Rename browser icon variable to reflect use
The other variables in the Makefile are named according to how the icons
are used, lets do the same for the variable for the browser icons.
2022-12-22 11:13:20 +01:00
Samuel Mannehed ec45911456 Don't show virtual keyboard button in webkit
Webkit browsers don't support Media Queries 4, which means we have to
use a slightly convoluted syntax when writing "@media not...". Otherwise
the "(any-pointer: coarse)" part evaluates as the device part of the
query.
2022-12-22 10:22:34 +01:00
Dinglan Peng b776e1495e Add MSLogonII security type 2022-12-21 15:52:31 -05:00
Samuel Mannehed 4fb2d6c497 Add FIXME for virtual keyboard button on touch
The way we decide whether to show the keyboard button or not is not
ideal, let's add a FIXME for that.
2022-12-15 14:33:12 +01:00
Samuel Mannehed d8b3ec99fa Use "initial" for displaying handle touch area
Our intentions are clearer if we set "display" to "initial" rather than
"unset" when we want to enable the touch area for the control bar
handle.
2022-12-15 14:09:56 +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 e7ef963a8f
Merge pull request #1730 from novnc/media_touch
Replace JavaScript .noVNC_touch with CSS @media (any-pointer: coarse)
2022-12-14 15:50:12 +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 6d7d45ba08 Ensure arrow doesn't change on disabled <select>
We can't just modify the CSS variable here, since that is also used in
the style for :disabled. We need to change the entire "background-image"
in order for :disabled to be able to override it.
2022-12-14 13:58:49 +01:00
Fredrik Kortetjärvi 90f120c139 Added none user select on the cursor
This is because, when double-clicking with the trackpad, it will not
highlight the mouse. And this only happened on the iOS but the decision
on adding it a normal user select comes from the other commits that it
looks like it elsewhere.
2022-12-14 13:47:01 +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
Pierre Ossman 156b9a99e2 Set snap credentials via environment
The old method of using "with" is no longer supported.
2022-12-14 12:50:51 +01:00
Samuel Mannehed 1ff035c330 Add comment explaining the handle touch area 2022-12-14 11:18:46 +01:00
Samuel Mannehed 333e075d7b Get rid of Chrome's blue touch tap highlight
When tapping our buttons using a touch screen in Chrome, we get an ugly
blue overlay. Let's remove this since we have our own :active styles.
2022-12-13 15:38:25 +01:00
Samuel Mannehed 6e1eec3025 Separate the disabling of :hover for touch
This is a corner case which shouldn't need to complicate things for the
regular usecases.
2022-12-13 15:23:31 +01:00