Commit graph

374 commits

Author SHA1 Message Date
Manav Rathi
cf71d1477b
update to new functions in more places 2024-03-27 17:44:49 +05:30
Manav Rathi
937e09f6a3
Fix import errors 2024-03-27 17:21:42 +05:30
Manav Rathi
8ffe1ece2d
Relay isFolder error back to renderer 2024-03-27 17:13:25 +05:30
Manav Rathi
175ea274c4
Alternative formatting 2024-03-27 17:07:56 +05:30
Manav Rathi
08489c8237
Tweak "render-process-gone" handler 2024-03-27 17:04:46 +05:30
Manav Rathi
3e61ebf1df
Add types for shellescape
Refs:

- https://github.com/boazy/any-shell-escape
- https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/shell-escape/index.d.ts
- https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html
2024-03-27 16:36:31 +05:30
Manav Rathi
e1c2c9fc98
Rearrange 2024-03-27 15:55:02 +05:30
Manav Rathi
c38542dbfb
Init logging 2024-03-27 15:34:29 +05:30
Manav Rathi
27047da08b
Use a truthy check 2024-03-27 15:12:40 +05:30
Manav Rathi
846c2af02b
Outline a potential approach 2024-03-27 15:10:35 +05:30
Manav Rathi
42679bc9da
Remove duplicated icon
Per https://www.electron.build/icons, a single 512x512 icon.png placed in the
buildResources directory (default `build`) is enough to generate icons for all
three - macOS, Windows and Linux.
2024-03-27 15:00:25 +05:30
Manav Rathi
88e8e1a18d
Remove hacky splash window with a background color
...hacky because it was using a timer instead of the "ready-to-show" event
(which wasn't getting fired for some reason). It is recommended that we set a
background color anyway.
2024-03-26 21:45:21 +05:30
Manav Rathi
ac97d65c12
Remove one copy of duplication from IPC types 2024-03-26 21:45:21 +05:30
Manav Rathi
b0ca3a1a9f
Preload won't have logging 2024-03-26 21:45:21 +05:30
Manav Rathi
c055cd9b4a
Remove the tscw 2024-03-26 21:45:21 +05:30
Manav Rathi
9e987f62f6
Fix paths of splash etc 2024-03-26 21:45:21 +05:30
Manav Rathi
cb33b6df10
Refactor the init process 2024-03-26 21:45:20 +05:30
Manav Rathi
c3dfa46514
Major version update of Electron
And other surrounding packages.
2024-03-26 21:42:48 +05:30
Manav Rathi
24176d8c40
Document a few more dependencies 2024-03-26 21:42:48 +05:30
Manav Rathi
6e737cdf9a
Mention package.json in the shx description 2024-03-26 21:42:48 +05:30
Manav Rathi
8f978a3d3d
Manually update the version info in package.json 2024-03-26 21:42:48 +05:30
Manav Rathi
fe94a4cd77
yarn-upgrade interactive 2024-03-26 21:42:48 +05:30
Manav Rathi
140b65b69d
Use default import instead of star import
Refs:
https://stackoverflow.com/questions/31386631/difference-between-import-x-and-import-as-x-in-node-js-es6-babel
2024-03-26 21:42:48 +05:30
Manav Rathi
db930feaf3
Stop source map generation
This isn't doing anything for us currently, and I suspect is also the source of
this error when trying to run a binary built using `yarn build:quick`

> DevTools failed to load source map: Could not load content for next://app/preload.js.map:
  Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Note that the renderer process already has source maps.
2024-03-26 21:42:48 +05:30
Manav Rathi
2038b036c5
Remove baseUrl that didn't work
From what I've understood, there isn't a way for us to use the baseUrl for
absolute imports without also using a bundler. The baseUrl works for the
tsconfig, but not for the generated JS.

Since this setting was anyways not working, remove it. Tested by doing `yarn
dev`, `yarn build` and also doing a quick perusal in VSCode to see that it is
not reporting any errors.

Refs:

- https://stackoverflow.com/questions/50679031/why-are-these-tsconfig-paths-not-working
- https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/2737
- https://stackoverflow.com/questions/40407342/resolving-paths-in-typescript-outdir
- https://stackoverflow.com/questions/51683827/using-paths-in-typescript-in-a-nodejs-project
2024-03-26 21:42:48 +05:30
Manav Rathi
a4ecc2c344
Update ente.io/faq => help.ente.io where possible
On desktop, now there Help menu will have an "Ente Help" option instead of "FAQ"
(Unrelated: I noticed that user facing strings in the desktop app are not
localized).

The only place remaining after this is the sidebar on mobile
(`support_section_widget.dart`), but I wasn't sure of what string to use (and
how to add it to the localized strings for mobile) so I've left it unchanged.
2024-03-25 19:26:10 +05:30
LI-NA
8e4ca0bc79 [desktop] Add shx and change the build command
To make the build script work on Windows, added the `shx` package in dev dependency and changed the `rm` and `ln` commands to `shx rm` and `shx ln`.
2024-03-25 20:11:44 +09:00
Manav Rathi
f8a36852a6
Prepare for test 2024-03-25 15:39:29 +05:30
Manav Rathi
892bf852a5
Convert remaining upload functions 2024-03-25 15:29:39 +05:30
Manav Rathi
f53b1361e8
Move file related functions 2024-03-25 15:09:51 +05:30
Manav Rathi
4261624da5
Handle rest of watch related functions 2024-03-25 14:03:20 +05:30
Manav Rathi
186e76c62b
Move add/remove watch functions to preload 2024-03-25 13:49:48 +05:30
Manav Rathi
96ea53face
preload / watch - part 1
The change event was not being used (since
dca542e781), so also remove that dead code.
2024-03-25 13:31:28 +05:30
Manav Rathi
67468c6ff9
Move the selection dialogs 2024-03-25 13:02:06 +05:30
Manav Rathi
e8acbd8c9f
Convert the other conversion functions 2024-03-25 12:45:21 +05:30
Manav Rathi
2522da2b5e
Handle runFFMPEGCmd in preload 2024-03-25 12:32:57 +05:30
Manav Rathi
dd7e87274a
Handle set/getEncryptionKey in preload 2024-03-25 12:19:19 +05:30
Manav Rathi
106ba270fe
Handle ML related functions in updated preload 2024-03-25 12:09:11 +05:30
Manav Rathi
d3093809d6
Inline more into preload 2024-03-23 20:25:56 +05:30
Manav Rathi
81ba5379c9
Move checkExistsAndCreateDir out of preload 2024-03-23 20:06:27 +05:30
Manav Rathi
f21dc84840
Switch to async fs.exists
We cannot expose the sync version over the context bridge - the node:fs module
is not available to the preload script under context isolation.
2024-03-23 19:59:47 +05:30
Manav Rathi
a5c3aff54b
Expose an fs.exists over the context bridge 2024-03-23 18:28:22 +05:30
Manav Rathi
7a3209ebf6
Fix preload.ts - Part x/x 2024-03-23 16:13:16 +05:30
Manav Rathi
0fdb2fb357
Fix type errors in fs.ts 2024-03-22 20:01:02 +05:30
Manav Rathi
6c8f4185f7
Fix error in clipService 2024-03-22 19:56:36 +05:30
Manav Rathi
31ad9a3eb3
Document that the main process is not restarted 2024-03-22 19:55:57 +05:30
Manav Rathi
68fe6f45c4
Validate that getPath is not throwing 2024-03-22 17:54:02 +05:30
Manav Rathi
3dbf82552d
Use the web native cache only - desktop side changes 2024-03-22 17:28:05 +05:30
Manav Rathi
22e57669fb
[photos-desktop] Disable node integration - Part x/x (#1176)
This continues the refactoring to disable node integration in our
rendered process. The code is still in a WIP state, and more PRs in this
series will come.
2024-03-22 16:06:16 +05:30
Manav Rathi
f083f0633d
Remove electron-reload
It reloads the BrowserWindow, but that already has HMR since we're connecting to
a Next dev server on localhost.

What we want is the main process to reload if the files for the main process are
changed. All options I've found so far just restart the main app on changes to
the main process code. I'm not sure that'll be useful, so not adding them right
now (and in any case, this is not a regression, it just wasn't working with
electron-reload either). For future reference if I need to revisit this, these
are the things I scouted:

- https://www.electronforge.io/config/plugins/webpack
- https://github.com/sindresorhus/electron-reloader
- https://electron-vite.org/guide/hot-reloading.html
2024-03-22 15:55:25 +05:30