aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview
Commit message (Collapse)AuthorAge
* chore: do not assume that the recipe contains a 'webview.js' fileLibravatar Vijay A2021-12-03
|
* chore: convert various files to TS (#2246)Libravatar Markus Hatvan2021-11-18
| | | | | | * convert various files to TS * removed outdated docs/example-feature folder * turn off unicorn/no-empty-file * update eslint config
* refactor: Remove duplicate codeLibravatar Vijay A2021-10-29
|
* build: use node 16 and npm 8 (#2157)Libravatar Markus Hatvan2021-10-28
| | | | | | | | | | | - change node version from 14.18.1 to 16.13.0 - change npm version from 6.14.13 to 8.1.0 - update package-lock.json to lockfileVersion 2 - use @sindresorhus/do-not-disturb instead of macos-notification-state to avoid failing CI - run ferdi build on latest macos and windows - skip husky in CI builds - move 'cld' and 'node-mac-permissions' to optionalDependency Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
* Add active dialog title feature (#2114)Libravatar Iaroslav2021-10-23
| | | | https://github.com/getferdi/ferdi/issues/1280 WhatsApp-like services can set active dialog title to the app title eg. Ferdi - WhatsApp - Contact Name
* fix: Remove 'counterCache' which was precluding from resetting the badge ↵Libravatar Vijay Aravamudhan2021-10-23
| | | | once the counts reached zero (#2113)
* chore: update eslint setup (#2074)Libravatar Markus Hatvan2021-10-15
|
* chore: convert various JS to TS (#2062)Libravatar Markus Hatvan2021-10-14
|
* refactor: move 'DEFAULT_APP_SETTINGS' from 'environment' to 'config' since ↵Libravatar Vijay A2021-10-01
| | | | it doesn't depend on the running process any more.
* chore: update various outdated node_modules (#1969)Libravatar Markus Hatvan2021-09-29
|
* refactor: remove optional parameters from 'popup' invocation which was tying ↵Libravatar Vijay A2021-09-27
| | | | us into 'electron/remote'
* refactor: remove references 'Ferdi.ipcRenderer' in recipes - create an ↵Libravatar Vijay A2021-09-27
| | | | abstraction layer instead for better maintainance
* refactor: remove references 'Ferdi.ipcRenderer' in recipes - create an ↵Libravatar Vijay A2021-09-27
| | | | abstraction layer instead for better maintainance
* refactor: remove references to 'electron/remote' - part deux (#1987)Libravatar Vijay Aravamudhan2021-09-26
|
* security: do not expose electron API to services 2Libravatar Kristóf Marussy2021-09-21
| | | | After refactoring some recipes in getferdi#1964, we no longer need to expose some APIs to recipes.
* remove reference to '@electron/remote' module (for spell-checker) (#1968)Libravatar Vijay Aravamudhan2021-09-20
| | | | | * fix: remove reference to '@electron/remote' module for spell-checker * chore: removed redundant methods from being exposed via 'window.ferdi' to the recipes
* security: do not expose electron API to services (#1964)Libravatar Kristóf Marussy2021-09-19
| | | | | | | | | | | | | | | | | | | | | * security: do not expose electron API to services Service code running the the main world should not have access to any electron API. This still allows recipes from webview.js accessing these APIs through the @electron/remote module and/or the Ferdi object, but webview-unsafe.js and the untrusted code coming from the service will not have any access. Currently, no recipe accesses these APIs in its webview-unsafe.js, so the change should not break any recipes. * Expose electron API through the Ferdi object Instead of the unsafe window.ferdi in the main world, we should expose functionality to recipes through the RecipeWebview class. * Update CHANGELOG.md
* feat: add eslint-plugin-unicorn (#1936)Libravatar Markus Hatvan2021-09-14
|
* refactor: defensive programming to avoid javascript error for unread badgesLibravatar Vijay A2021-09-14
|
* refactor: expose some more methods for session handling on the main repo (#1887)Libravatar Vijay Raghavan Aravamudhan2021-09-08
|
* refactor: externalize english textLibravatar Vijay A2021-09-07
|
* Expose some functions to the recipe child processes (#1869)Libravatar Vijay Raghavan Aravamudhan2021-09-05
| | | | | * chore: expose some functions to the recipe child processes so as to bypass the need for the recipe to require '@electron/remote'
* refactor: expose safeParseInt so that all recipes can use the same for ↵Libravatar Vijay A2021-08-31
| | | | consistent error handling
* fix: allow the recipe to pass a string for the badge, ferdi can parse it ↵Libravatar Vijay A2021-08-27
| | | | correctly
* chore: typescript conversionLibravatar Vijay A2021-08-21
|
* refactor: pull in code-cleanup changes in the recipes submodule.Libravatar Vijay A2021-08-17
|
* refactor: Minor refactoring to handle NaN in 'setBadge'Libravatar Vijay A2021-08-17
|
* Revert "chore: update outdated node_modules (#1807)"Libravatar Vijay A2021-08-16
| | | | This reverts commit 26a9dba22236bc22a7612107630282cfe02d20e0.
* chore: update outdated node_modules (#1807)Libravatar Markus Hatvan2021-08-16
| | | | - upgrade 'uuid', '@types/uuid', 'macos-version', 'normalize-url' and 'os-name' dependencies to latest - updated 'macos-version' imports to named imports
* fix: Fix issue with shortcut accelerators not working on macos where symbols ↵Libravatar Vijay A2021-08-15
| | | | were used for shift/alt keys
* Refactoring: Url helpers (#1789)Libravatar Vijay Raghavan Aravamudhan2021-08-14
| | | | | | | These changes are mainly to ensure that 'shell.open*' invocations are only in a single file. * Moved 'openPath' into the 'url-helpers' file. * Extract 'openExternalUrl' into a common location in 'url-helpers' This is done so that we can then apply vetting rules to ensure that there is no security concern as described in https://benjamin-altpeter.de/shell-openexternal-dangers/
* refactor: Use destructured 'import'Libravatar Vijay A2021-08-13
|
* refactor: Use the 'shortcutKey' function without exposing the 'ctrlKey' or ↵Libravatar Vijay A2021-08-13
| | | | the 'cmdKey'
* feat: follow OS reduced motion setting (#1757)Libravatar Markus Hatvan2021-08-10
| | | | | | | | - add missing meta charset to index.html - dont restrict scaling for user in index.html - load animations.css conditionally based on motion preference - load transitions conditionally in js and css based on motion preference Co-authored-by: Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>
* chore: set default fallback locale for spell-checker to be 'en-US'.Libravatar Vijay A2021-08-09
|
* refactor: path-references refactoring and using 'import' instead of ↵Libravatar Vijay Raghavan Aravamudhan2021-08-08
| | | | | | 'require' (#1752) * refactor references to 'userData' and 'appData' directories to move hardcoding into single location * convert to es6 for lower memory usage as per https://codesource.io/the-difference-between-import-and-require-in-javascript/
* refactor: prep for i18n of context menu itemsLibravatar Vijay A2021-08-06
|
* refactor: general code improvementsLibravatar mhatvan2021-08-05
| | | | | | | | | | - replace deprecated fs.exists with fs.existsSync - replace console.log with debug - replace hardcoded FERDI_VERSION in start.js with dynamic one from package.json - correct JSDoc annotations in Handler.js - simplify macOSPermissions.js - updates to various eslint rules - add FileReader to known globals
* chore: migrate from tslint to @typescript-eslint (#1706)Libravatar Markus Hatvan2021-07-30
| | | | | | | | | | - update .eslintrc to work for .js and .ts - update devDependencies - lint properly both root /src and nested /packages - update webhint recommended setting for tsconfig.json to shrink output - Manage all eslint rules from the repo root - escape single quotes in scripts to please windows build Co-authored-by: Vijay A <avijayr@protonmail.com>
* Recipe context isolation (#1456)Libravatar Kristóf Marussy2021-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable service contextIsolation * Enable contextIsolation on the service webviews * Expose a new API window.ferdi in the service main world to allow calling back into the service isolated world * Expose a new IPC message inject-js-unsafe from the service isolated world to execute Javascript in the service main world (i.e., run code without context isolation). While the name contains the "unsafe" suffix to show the lack of context isolation, this should mostly be safe, as no nodejs APIs are available in the injected code. * Refactor the Notifications shim into a part in the isolated world that handles displaying and modifying notifications, and a shim in the main world for the Notifications class. The two communicate via the window.ferdi endpoint and a Promise object can be used to detect notification clicks. * Refactor the screen sharing shim into a part in the isolated world that enumerated shareable screens and windows and a shim in the main world that displays the media selector and completes the media selection promise. * Expose the injectJSUnsafe API to recipes to inject javascript code into the main world without context isolation. * Expose setBadge to the main world The window.ferdi.setBadge API can be used to update the service badge from injected unsafe Javascript * Safer script injection into the service main world Make sure that we don't try to serialize stray objects back from the main world to the isolated world by always surrounding the script to be executed by an anonymous function. * Always read recipe assets as utf8 * Remove window.log from recipes We didn't use it anywhere and its behavior was confusing in production mode. * Inject multiple unsafe scripts at the same time * Find in page without remote module Remove the @electron/remote dependency from the find in page (Ctrl+F) functionality. The remote webContents is replaced with Electron IPC. Synchronous IPC messages are handled in the main Electron process, because the renderer process cannot reply to IPC messages synchronously. * Update to latest contextIsolation recipes * Fixing issue with missing 'fs' functions. Co-authored-by: Vijay A <avijayr@protonmail.com>
* Fixed issue where the 'copy page url' didn't honor silent notifications for ↵Libravatar Vijay A2021-07-17
| | | | clipboard events.
* Converted 2 js files to es6 [skip ci]Libravatar Vijay A2021-07-09
|
* Upgrade various dependencies to latest part 2 (#1557)Libravatar Markus Hatvan2021-07-03
| | | | | | | | * Upgrade various dependencies to latest, remove unnecessary electron-hunspell - upgrade eslint and friends to latest - remove deprecated 'node-sass' in favor of 'sass' - disable new rules from 'eslint-config-airbnb' that are conflicting with current code style - add workspace config for 'vscode' that silences 'experimentalDecorator' warning and forces 'prettier' to single quote * Run yarn lint to autofix with new ruleset and worked down lint issues to zero
* Minor refactoring to move all runtime configs from 'config.js' into ↵Libravatar Vijay Raghavan Aravamudhan2021-07-03
| | | | 'environment.js'. (#1588)
* Upgraded some modules (#1520)Libravatar Vijay Raghavan Aravamudhan2021-06-12
|
* Added ability to turn off notifications for clipboard events generated by ↵Libravatar Vijay Raghavan Aravamudhan2021-06-05
| | | | context menu actions (#1494)
* Clean up RecipeWebview.setBadge (#1461)Libravatar Kristóf Marussy2021-05-28
| | | | | Extracted from 240c3a72363e7388779c9ed3c6467ec63bb64d94 according to https://github.com/getferdi/ferdi/pull/1456#discussion_r641182688 and https://github.com/getferdi/ferdi/pull/1456#discussion_r641183662
* Screen share refactoring (#1460)Libravatar Kristóf Marussy2021-05-28
| | | | | | | | | | | * Extract screenshare into a separate file Extracted from 240c3a72363e7388779c9ed3c6467ec63bb64d94 according to https://github.com/getferdi/ferdi/pull/1456#discussion_r641194876 * Cosmetic screenshare changes and cancellation * Makes the screen/window selector more readable * Adds a Cancel button to close the selector
* Read CSS assets in recipes as utf8 (#1459)Libravatar Kristóf Marussy2021-05-28
| | | | Extracted from 357b23b69c119e3d10926613ca31588d5c7285fc according to https://github.com/getferdi/ferdi/pull/1456#discussion_r641185050
* Auto-generated files and linter fixes.Libravatar Vijay A2021-05-26
|