Commit Graph

549 Commits

Author SHA1 Message Date
Nathan Adams a9ba46594f chore: Updated translations from Crowdin 2023-05-14 13:31:32 +02:00
Toad06 9671b9b824
web: Download all sols as single .zip 2023-05-13 19:19:00 +03:00
Toad06 94ad41dfd4 web: Update source string 2023-05-11 09:36:06 +03:00
relrelb e01b613a78 web: Fix another instance of "Unable to lock Ruffle core"
After a panic, `Ruffle::renderer_debug_info()` cannot be called since
it tries to immutably borrow the underlying `Player`, but `Ruffle::tick()`
already holds it mutably.

As a fix, simply use the `_cachedDebugInfo` which is fetched in
advance, before any panic occurs. Rename it to just `rendererDebugInfo`
(without "cache" in its name), because now it's mandated.
2023-05-11 08:33:33 +03:00
Daniel Jacobs ea78bf2d39
web: Make isTouch locally scoped to showContextMenu 2023-05-10 17:31:07 +03:00
Nathan Adams fc96fdf1cc chore: Update translations from Crowdin 2023-05-10 00:29:13 +02:00
Nathan Adams 72769eeefa web: Localise text inside shadow template 2023-05-09 00:06:49 +02:00
Nathan Adams a29f1f75dc web: Localise the 'cant embed' message 2023-05-09 00:06:49 +02:00
Nathan Adams 1db72a0ffd web: Localise error messages 2023-05-09 00:06:49 +02:00
Nathan Adams 2430cf192e web: Localise fullscreen toggle 2023-05-09 00:06:49 +02:00
Nathan Adams d70faeec04 web: Localise save manager prompts 2023-05-09 00:06:49 +02:00
Nathan Adams 9be198212b web: Translate various button texts 2023-05-09 00:06:49 +02:00
Nathan Adams b7794749d8 web: Localise the unsupported avm2 message 2023-05-09 00:06:49 +02:00
Nathan Adams 07dea7b164 web: Add localisation to web 2023-05-09 00:06:49 +02:00
Daniel Jacobs 01a69b60bc web: Remove ContextMenu.TouchOnly as it is unlikely to be useful 2023-05-08 23:53:31 +03:00
Daniel Jacobs e7877706ef web: Use typeof to simplify check for usage of deprecated contextMenu 2023-05-08 23:53:31 +03:00
Daniel Jacobs 4790ea7304 web: Combine contextMenu with touchContextMenu 2023-05-08 23:53:31 +03:00
Daniel Jacobs 68f493336a web: Configuration to disable context menu on touch 2023-05-08 23:53:31 +03:00
iwannabethedev 307f364d6f
web: Log used renderer
Log which renderer-backend was actually used in the
browser console.
2023-05-02 23:59:57 +03:00
Kornelius Rohrschneider fe56f8d212 core: Implement suggested changes in PR to documentation & code
- Documentation has been added, improved and clarified.
- The code of a string concatenation has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 27738a492e web: Implement suggested changes in PR to navigate_to_url handling
The suggested changes to the navigate_to_url handling in the feedback to
the pull request have been implemented.
Therefore, this commit consists of multiple smaller changes:

1. The allow_javascript_calls variable has been removed (as a CLI
argument and in the navigator). Javascript calls are now always denied
on desktop. This is because setting the argument was useless; no
javascript was executed in any case, at most, just a browser tab opened.
Therefore, it makes no sense to include this option.
2. The NavigateWebsiteHandlingMode default value has been provisionally
changed from Confirm to Allow. In the future (after a GUI toolkit has
been added), the default confirmation windows should include a "Save
this preference" checkbox.
3. The NetworkingRestrictionMode enum has been renamed to
NetworkingAccessMode since the previous naming was counter-intuitive.
4. The NavigateWebsiteHandlingMode enum (and variables related to it)
have been renamed to OpenURLMode to simplify the name.
5. The documentation has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 809a9f6907 web: Add and partially implement networking API restrictions
The networking API restrictions imposed by the allowNetworking parameter
& attribute have been added and partially implemented.

A new NetworkingRestrictionMode enum has been added to Ruffle (in Rust
and Typescript). It contains the values "All", "Internal" and "None" and
models the possible values of the allowNetworking parameter / attribute.
All means that all networking APIs are permitted in the SWF file,
Internal means that the SWF file may not call browser navigation or
browser interaction APIs and None means the same and that the SWF file
cannot use any SWF-to-SWF communication APIs either.
A respective allowNetworking variable has been added to the JS config.
Its default value is All.
Ruffle now recognises the allowNetworking parameter and attribute in the
SWF HTML object and parses it and sets the config variable
correspondingly if it's recognised.
Only if the variable is set to All, the external interface (responsible
for javascript calls in AS3) is created. Additionally, the variable is
given to the WebNavigatorBackend and saved in it. The navigator denies
all navigate_to_url calls if the variable hasn't been set to All.
Therefore, the API restrictions imposed by setting allowNetworking to
internal or none have been partially implemented.

Formatting has been improved.
2023-05-02 17:13:42 +02:00
Kornelius Rohrschneider 44ef22f646 core: Add navigate_to_url call configuration options
New configuration options (changing the navigate_to_url call handling)
have been added. The default behaviour has been changed as well.

A NavigateWebsiteHandlingMode enum has been added to Ruffle (in Rust and
Typescript). It contains the values "Allow", "Confirm" and "Deny" and
describes how navigate_to_url website calls should be handled. Allow
means that all website calls are allowed, Confirm means that a
confirmation window opens with each website call and Deny means that all
website calls are denied.
A respective navigate_website_handling_mode variable has been added to
the desktop CLI and to the JS config. The default value is "Confirm" in
each. The variable is given to the navigator (ExternalNavigatorBackend
or WebNavigatorBackend, depending on the platform) and is saved in it.
On each navigate_to_url website call, the respective navigator is now
checking navigate_website_handling_mode and acts correspondingly (allows
it, opens a confirmation window or denies it).
This changes the default behaviour of Ruffle from allowing all website
calls to opening a confirmation window with each website call.
On Safari, the confirm window can cause the background music to stop,
but this seems to be an issue with Safari.
Closes #838.

Additionally, an allow_javascript_calls variable (which defaults to
false) has been added to the desktop CLI. The variable is given to the
desktop navigator and is saved in it.
If a navigate_to_url javascript call is executed on desktop, the
navigator is now checking allow_javascript_calls and acts
correspondingly (allows it or denies it).
This changes the default behaviour of Ruffle on desktop to not allowing
javascript calls.
Closes #9316.
2023-05-02 17:13:42 +02:00
divinity76 7bc51ae2cb
web: Make panicText readonly
it's not supposed to be editable. ref https://github.com/ruffle-rs/ruffle/pull/10819#issuecomment-1529977894
2023-05-02 06:53:44 +00:00
Adrian Wielgosik e1d47e3527 web: Avoid array.at() for browser compatibility 2023-05-02 01:00:20 +02:00
nosamu 91bc57c67f web: Fix panic error details display
Fix regression caused by #10819
2023-05-01 08:52:46 +03:00
iwannabethedev 1f956ffe55 web: Add extension option for setting 'playerVersion'.
Basic input validation UI and logic is also added and improved.
2023-04-29 01:09:09 +03:00
Daniel Jacobs 24dfb82d12 web: Address save manager styling review comments 2023-04-26 14:36:49 +02:00
Daniel Jacobs 902911745b web: Use different heights for save manager 2023-04-26 14:36:49 +02:00
Daniel Jacobs 5e31ce992e web: Fix save manager styling 2023-04-26 14:36:49 +02:00
Lord-McSweeney 3bf78d43f9 fmt 2023-04-26 11:20:24 +03:00
Lord-McSweeney f947351f40 Fix #10817
Create a child element instead of setting innerHTML.
2023-04-26 11:20:24 +03:00
iwannabethedev 02b8434648 web: Expand 'max_execution_duration' type in extension.
The option 'max_execution_duration' previously only supported
the type '{secs: number, nanos: number}'. Now it also supports
using floating point numbers (and integers).

Default values have been changed to use floating point numbers.
2023-04-25 23:59:51 +02:00
Daniel Jacobs d31828d24d web: Fix #10798 2023-04-25 17:15:41 +02:00
nosamu bce494b86c extension: Rearrange options to emphasize the most commonly used 2023-04-25 09:00:12 +03:00
nosamu 1e3701279c web: Add preferred renderer config 2023-04-25 09:00:12 +03:00
nosamu 569e822044 extension: Reduce code duplication 2023-04-25 08:48:59 +03:00
nosamu 9b87b31657 web: Don't inherit page CSS 2023-04-25 08:31:17 +03:00
relrelb 7af0a17d83 web: Update JSDoc lint rules
* Extend from `plugin:jsdoc/recommended-typescript-error`, which is
more suitable for TypeScript and errors by default.
* Remove default and disabled but passing rules.
* Configure `jsdoc/tag-lines` to match JSDoc style of current codebase.
2023-04-25 08:19:54 +03:00
nosamu 3cde3482f4 core: Add frame rate config option 2023-04-24 14:01:37 +02:00
nosamu 4bd11c57b3 web/docs: Display enums in source order 2023-04-24 08:49:06 +03:00
renovate[bot] 30dc715c46 chore(deps): lock file maintenance node.js dependencies 2023-04-24 00:09:04 +03:00
renovate[bot] 424a45bf2b chore(deps): update node.js dependencies 2023-04-23 22:18:42 +02:00
Daniel Jacobs 256c2fe75c web: No context menu on iOS if finger moves too far on long-press
Co-authored-by: n0samu <71368227+n0samu@users.noreply.github.com>
2023-04-22 08:57:47 +02:00
Daniel Jacobs ebb14a7ab6 web: Use div element for save manager to support browsers without dialog 2023-04-21 17:28:07 +02:00
nosamu 3614437498 web: Don't duplicate context menu separators 2023-04-18 22:01:09 +02:00
nosamu 76d172b5c5 docs: Fix WindowMode doc comment 2023-04-13 19:54:32 +02:00
Lord-McSweeney 5af0eda375 web: Avoid triggering cloudflare checks
mimeTypes.item() and plugins.item() should wrap around 2^32.
2023-04-04 20:32:44 -07:00
relrelb 479926cdba web: Migrate to TypeScript 5.0.0
Work around the newly introduced `--verbatimModuleSyntax` flag:
https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#verbatimmodulesyntax
2023-04-01 13:11:23 +03:00
renovate[bot] 0e887411cc chore(deps): update node.js dependencies 2023-04-01 13:11:23 +03:00