Compare commits

...

861 Commits

Author SHA1 Message Date
Vishnu Mohandas
15d9c7da3b v2.0.51 (#1367) 2024-04-08 14:11:12 +05:30
vishnukvmd
e8f21a7247 v2.0.51 2024-04-08 14:10:52 +05:30
Vishnu Mohandas
adb796e35f [mobile][photos] Perf test on app init (#1366)
## Description

Test and script for performance profiling the app for a specified
duration from app init using integration testing.
2024-04-08 13:49:07 +05:30
ashilkn
feb8deb648 add comments 2024-04-08 13:37:00 +05:30
ashilkn
4a4a53f994 Move performance profiling script files to mobile/scripts 2024-04-08 13:33:24 +05:30
ashilkn
504f23fe4e add comments to app_init_test script 2024-04-08 13:30:52 +05:30
ashilkn
f81fb5b626 write perf test for app init 2024-04-08 13:21:29 +05:30
Manav Rathi
78f4f9b42d [web] Capture logs from web workers (#1365)
This started of as a refactoring of our logging layer, but turned into a
bug fix (+ refactorings) when I noticed that the logs in the web/worker
case were not being saved to the on disk file.

Refs:

- https://github.com/GoogleChromeLabs/comlink/issues/506
- https://github.com/GoogleChromeLabs/comlink/issues/568
2024-04-08 13:19:25 +05:30
Manav Rathi
84d21984e0 Test complete
Tested logging from both worker (in web app) and when running in Electron.

Refs:
- https://github.com/GoogleChromeLabs/comlink/issues/506
- https://github.com/GoogleChromeLabs/comlink/issues/568
2024-04-08 13:16:50 +05:30
Manav Rathi
da9a704094 fixing logging in workers WIP 2 2024-04-08 12:52:10 +05:30
Manav Rathi
a96ad6dfa2 WIP 2024-04-08 12:40:03 +05:30
Manav Rathi
44666d6772 [web] New translations (#1364)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-04-08 09:40:42 +05:30
Crowdin Bot
b3842dab04 New Crowdin translations by GitHub Action 2024-04-08 04:09:44 +00:00
Manav Rathi
873b158718 [web] Miscellaneous tweaks (#1363)
- Clean up environment detection code
- Remove l11n unsafe direct string manipulation
- Inline
- Remove isCanvasBlocked checker
- Remove unused stuff
2024-04-08 09:38:59 +05:30
Manav Rathi
7913d5ec2e lint 2024-04-08 09:37:08 +05:30
Neeraj Gupta
4ceaf7cf13 [auth] Prioritise issuer match in search result order (#1362)
## Description

## Tests
2024-04-08 09:18:42 +05:30
Neeraj Gupta
c728b3b8be [auth] Prioritize issuer match in search result 2024-04-08 09:15:33 +05:30
Neeraj Gupta
510a4a5978 [auth] iOS build changes 2024-04-08 09:15:16 +05:30
Manav Rathi
0b3165b812 Remove unused 2024-04-07 10:58:19 +05:30
Manav Rathi
99579fbf51 Inline 2024-04-07 10:56:15 +05:30
Manav Rathi
75d041dd9c Inline 2024-04-07 10:53:34 +05:30
Manav Rathi
d992085dbd Inline 2024-04-07 10:49:31 +05:30
Manav Rathi
cb6cfee9a3 Inline 2024-04-07 10:49:04 +05:30
Manav Rathi
60321111c2 Remove isCanvasBlocked checker
We don't really support running without canvas access, we need it for image
manipulation. The firefox feature seems poorly implemented -
https://bugzilla.mozilla.org/show_bug.cgi?id=1429865 - and if someone _really_
wishes to not add an exclusion for our open source web app, then they can
download our desktop app.
2024-04-07 10:45:30 +05:30
Manav Rathi
49b5bff042 Inline 2024-04-07 10:29:00 +05:30
Manav Rathi
7c0ab6dd8a Remove l11n unsafe direct string manipulation 2024-04-07 10:23:20 +05:30
Manav Rathi
01e6e79819 Cannot be a compile time constant 2024-04-07 10:18:30 +05:30
Manav Rathi
e5b2d737b4 Clean up environment detection code 2024-04-07 10:03:28 +05:30
Manav Rathi
5e6f057c4c [web] Add required transitive dependency of MUI datepicker (#1357)
Previously this was coming from react-datepicker that was otherwise
unused and thus removed.

Use the same major version as we had previously.

Ref:

https://stackoverflow.com/questions/71037974/module-not-found-error-cant-resolve-date-fns-adddays-in-c-users
2024-04-07 09:30:16 +05:30
Manav Rathi
3cb51184b3 [web] Add required transitive dependency of MUI datepicker
Previously this was coming from react-datepicker that was otherwise unused and thus removed.

Use the same major version as we had previously.

Ref:
https://stackoverflow.com/questions/71037974/module-not-found-error-cant-resolve-date-fns-adddays-in-c-users
2024-04-07 09:26:52 +05:30
Manav Rathi
9025ad3c57 [web] Remove unused ffmpeg from cast (#1355)
- Also attempt to reenable tsc, since this was previously failing at
this ffmpeg step. But that's still not possible, the photos package tsc
trips up at the same step
- Remove some other unused dependencies too
2024-04-07 08:45:06 +05:30
Manav Rathi
d317da6536 Remove unused package react-datepicker
+ another unused type
+ an transitive from code
2024-04-07 08:42:27 +05:30
Manav Rathi
0071182721 Revert "Attempt to reenable tsc"
This reverts commit 5700b101b2. We still need to
fix it in photos before re-enabling this.
2024-04-07 08:28:13 +05:30
Manav Rathi
5700b101b2 Attempt to reenable tsc
Partially reverts 6333792d64
2024-04-07 08:25:16 +05:30
Manav Rathi
02207ca96c Remove unused ffmpeg from cast 2024-04-07 08:18:36 +05:30
Manav Rathi
ddb2952b6a [docs] yarn pretty (#1349) 2024-04-06 22:19:43 +05:30
Manav Rathi
c983af0dea [docs] yarn pretty 2024-04-06 22:17:34 +05:30
Manav Rathi
363e2b116b [docs] Add more details in the server admin docs (#1348) 2024-04-06 22:15:56 +05:30
Manav Rathi
d8b7dd06f6 [docs] Add more details in the server admin docs 2024-04-06 22:14:19 +05:30
Manav Rathi
9b73cd2176 [docs] Add a troubleshooting guide for failing uploads (#1346) 2024-04-06 20:53:40 +05:30
Manav Rathi
1205b864d2 [docs] Add a troubleshooting guide for failing uploads 2024-04-06 20:49:04 +05:30
Manav Rathi
54a1b3ca3e [web] Fix cast CSS (#1345)
- Cleanups, remove unnecessary sass dependency
- Fix the height in the CSS
2024-04-06 19:28:36 +05:30
Manav Rathi
4b074f4475 Fix the CSS for cast 2024-04-06 19:15:42 +05:30
Manav Rathi
b650372d35 Cleanupxs 2024-04-06 19:09:02 +05:30
Manav Rathi
04c0fd0617 [web] New translations (#1344)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-04-06 12:42:49 +05:30
Crowdin Bot
e779ae5189 New Crowdin translations by GitHub Action 2024-04-06 07:12:09 +00:00
Manav Rathi
14fe0a46b0 [web] Bundle translations but lazily (#1343)
## Description

Muchos faster, muchos caching, and no duplication.

**Tested by**

Running locally in both dev and preview. Only the current language +
English is fetched. It can be made even faster by prebundling the
English translations as described in
https://github.com/i18next/i18next-resources-to-backend, but we can
profile first and see if that's even needed.
2024-04-06 12:41:25 +05:30
Manav Rathi
568f4540e3 Remove scripts
It has done its job, let it rest in peace
2024-04-06 12:12:15 +05:30
Manav Rathi
6bff42ad9b Remove unused keys 2024-04-06 12:11:29 +05:30
Manav Rathi
d00211964b Improve heuristic 2024-04-06 11:45:05 +05:30
Manav Rathi
8695f46b43 Improve script for finding unused keys 2024-04-06 11:43:56 +05:30
Manav Rathi
8020d83ced Fix crowdin paths 2024-04-06 11:30:31 +05:30
Manav Rathi
121df66ada Cleanup 2024-04-06 11:19:14 +05:30
Manav Rathi
a98a29800b [web] Bundle translations but load them lazily
Refs:
- https://github.com/i18next/i18next-resources-to-backend
- https://stackoverflow.com/questions/77251750/how-to-implement-lazy-loading-translations-in-i18next-with-react
- https://github.com/i18next/react-i18next/issues/525
- https://gist.github.com/SimeonC/6a738467c691eef7f21ebf96918cd95f
- https://www.i18next.com/overview/plugins-and-utils
2024-04-06 11:06:29 +05:30
Vishnu Mohandas
afe94b72ba [meta] Call out custom icons as a good starter task (#1342) 2024-04-06 08:46:23 +05:30
Manav Rathi
167e5a95ca [meta] Call out custom icons as a good starter task 2024-04-06 08:44:50 +05:30
Vishnu Mohandas
2bd02eac4b [FIX] Smart auth revert, issue #1279 (#1340)
## Description

Revert Pinput version to fix smart_auth and hence the fdroid build.

Fixes #1279
2024-04-05 23:17:26 +05:30
Prateek Sunal
bfc147b4d1 fix: revert pinput version 2024-04-05 23:13:40 +05:30
Manav Rathi
16cb63edfe [web] Run tsc when linting (#1339) 2024-04-05 22:10:07 +05:30
Manav Rathi
6333792d64 Temporarily disable tsc on CI 2024-04-05 22:03:39 +05:30
Manav Rathi
69bd822499 Attempt to fix tsc warning on CI
Error: src/services/wasm/ffmpeg.ts(6,38): error TS2307: Cannot find module 'ffmpeg-wasm' or its corresponding type declarations.
2024-04-05 21:59:18 +05:30
Manav Rathi
6a31331ac4 Fix lint issue when running on CI
> cast
    $ /home/runner/work/ente/ente/web/node_modules/.bin/tsc
    Error: src/components/FilledCircleCheck/index.tsx(2,20): error TS2307: Cannot find module './FilledCircleCheck.module.scss' or its corresponding type declarations.
2024-04-05 21:56:46 +05:30
Manav Rathi
e16834e52e Remove unused styled jsx tag
This caused the lint to fail on CI

    > auth
    $ /home/runner/work/ente/ente/web/node_modules/.bin/tsc
    Error: src/pages/auth/index.tsx(125,20): error TS2322: Type '{ children: string; jsx: true; }' is not assignable to type 'ClassAttributes<HTMLStyleElement> & StyleHTMLAttributes<HTMLStyleElement> & { css?: Interpolation<Theme>; }'.
      Property 'jsx' does not exist on type 'ClassAttributes<HTMLStyleElement> & StyleHTMLAttributes<HTMLStyleElement> & { css?: Interpolation<Theme>; }'.
    error Command failed with exit code 2.

From reading the code, this CSS doesn't seem to be coming into effect. Then I
also did a test to verify that the auth app is correctly switching to a 2 column
layout even without this.
2024-04-05 21:39:52 +05:30
Manav Rathi
10b0d9f533 Fix the yarn lint 2024-04-05 21:22:44 +05:30
Manav Rathi
791cc61ca7 Fix more leftover issues 2024-04-05 21:18:26 +05:30
Manav Rathi
7a674dcf95 lint-fix 2024-04-05 21:10:59 +05:30
Manav Rathi
5c313fb87d tsc when linting 2024-04-05 21:10:20 +05:30
Manav Rathi
411984ebdc Fix lint errors 2024-04-05 21:09:47 +05:30
Manav Rathi
8764e5cf4d [web] Miscellaneous code improvements (#1336) 2024-04-05 20:50:56 +05:30
Manav Rathi
cf27f3236c lint-fix 2024-04-05 20:48:23 +05:30
Manav Rathi
42a59f2fb5 Consolidate and deduplicate 2024-04-05 20:35:22 +05:30
Manav Rathi
7807d3a413 Inline 2024-04-05 20:03:23 +05:30
Manav Rathi
461430a972 Move up from shared 2024-04-05 20:01:28 +05:30
Manav Rathi
0b39759ad9 Inline 2024-04-05 19:58:45 +05:30
Manav Rathi
fe6215d0fd Replace context entry with useRouter 2024-04-05 19:58:45 +05:30
Manav Rathi
e680970cdf Inline 2024-04-05 19:58:45 +05:30
Manav Rathi
63387d8819 Use regular image
This is the only place we were using next/image
2024-04-05 19:58:45 +05:30
Manav Rathi
356ad6f004 Use regular link
Removing unnecessary dependencies on next specific components
2024-04-05 19:58:45 +05:30
Manav Rathi
7be2c66fb6 [server] Delete the subscriber on listmonk when needed (#1331) 2024-04-05 17:14:09 +05:30
vishnukvmd
c32badc82c [server] Delete the subscriber on listmonk when needed 2024-04-05 17:12:06 +05:30
Manav Rathi
dbdad18c96 [web] Uncomment accidentally activated env vars for localhost defaults (#1330) 2024-04-05 17:09:24 +05:30
Manav Rathi
ae51531bd0 [web] Uncomment accidentally activated env vars for localhost defaults 2024-04-05 17:08:47 +05:30
Manav Rathi
4ad060c4e4 [infra] Fix the listmonk upgrade invocation (#1329)
Tested on the actual instance
2024-04-05 17:03:03 +05:30
Manav Rathi
5266e5d1dc [infra] Fix the listmonk upgrade invocation 2024-04-05 16:51:08 +05:30
Vishnu Mohandas
5904e3dd2c [server] Allow a configurable sslmode (#1327)
Tested that

- [x] Existing defaults remain unchanged
- [x] Setting db.sslmode = require in museum.yaml is honoured (in the
docker compose environment, that causes the db connection to fail as
expected)
2024-04-05 13:58:17 +05:30
Manav Rathi
74decc32de [server] Allow a configurable sslmode
Tested

- Existing defaults remain unchanged
- Setting db.sslmode = require in museum.yaml is honoured (in the docker compose environment, that causes the db connection to fail as expected)
2024-04-05 11:52:22 +05:30
Vishnu Mohandas
5e8f41cbfe [mob] Change share page copy (#1323)
## Description

I thought the "Collect photos" line and the download icon in the share
page looked very confusing:

![old_share_page_copy](https://github.com/ente-io/ente/assets/81471280/cb6a8415-e3a0-403e-abd3-e94b6256a572)

So I changed the icon and copy slightly:

![new_share_page_copy](https://github.com/ente-io/ente/assets/81471280/2480bb43-21fb-487a-af00-c473dbe7439c)


## Tests

Just a copy change, no tests.
2024-04-05 11:48:29 +05:30
Manav Rathi
360aa2903f [web] Remove leftover console log (#1325) 2024-04-05 11:35:30 +05:30
Manav Rathi
0d48284b4f [web] Remove leftover console log 2024-04-05 11:33:57 +05:30
Manav Rathi
687efe506a [web] Fix an regression introduced in the previous PR (#1324)
Use the implementation instead of the accidental infinite loop
2024-04-05 11:32:32 +05:30
Manav Rathi
e0cfa36f08 Use the implementation instead of the accidental infinite loop 2024-04-05 10:51:04 +05:30
laurenspriem
858ba88c65 [mob] Change share page copy 2024-04-05 10:48:37 +05:30
Manav Rathi
e7e8ded1ed [web] Miscellaneous improvements (#1322)
- Remove unused knobs
- Inline
- Initial-scale=1 is still recommended
- Remove custom _document (with a longer term vision of next => vite)
2024-04-05 10:17:04 +05:30
Manav Rathi
fa7cbaea18 Remove custom _document
Looking towards a longer term transition out of next
2024-04-05 10:09:37 +05:30
Manav Rathi
9785bbcb26 We don't have full web app support yet
Plus, Apple doesn't do much for PWAs anyway. One reason for removing this until
we test it out in actuality is because there were reports of the semi-PWA
caching causing issues.
2024-04-05 09:38:48 +05:30
Manav Rathi
039387a84e Initial-scale=1 is still recommended
Ref:
https://teamtreehouse.com/community/is-initialscale-not-needed
2024-04-05 09:36:18 +05:30
Manav Rathi
866b52b002 Inline constant 2024-04-05 09:26:30 +05:30
Manav Rathi
2c098904fb Inline 2024-04-05 09:13:38 +05:30
Manav Rathi
a68dce35f6 Remove unused knob 2024-04-05 09:08:56 +05:30
Manav Rathi
1d0f30ad91 These values were never customized 2024-04-05 09:08:02 +05:30
Manav Rathi
7374fe2ecc [web] Fix nightly build (#1321)
Got broken by yesterday's changes to payments.
2024-04-05 08:58:17 +05:30
Manav Rathi
55454f9454 [web] Fix nightly build
Got broken by yesterday's changes to payments.
2024-04-05 08:57:24 +05:30
Manav Rathi
1aa39e83d7 [server] Build ARM images when publishing to ghcr.io (#1320)
Untested yet, will test alongside the next publish

Requested in https://github.com/ente-io/ente/discussions/1305
2024-04-04 21:59:47 +05:30
Manav Rathi
d84ee7223a [server] Build ARM images when publishing 2024-04-04 21:57:44 +05:30
Manav Rathi
4e5fcebb95 [infra] Setup listmonk (#1319) 2024-04-04 21:36:02 +05:30
Manav Rathi
e170b6811d Tweaks
Refs:
https://github.com/knadh/listmonk/blob/master/listmonk-simple.service#L16
2024-04-04 21:27:47 +05:30
Manav Rathi
3ed2186dcf Initial cut of listmonk setup 2024-04-04 20:23:25 +05:30
Manav Rathi
b6177a5bc3 Listmonk mailing list control (#1289)
## Description
Add listmonk mailing list subscribe and unsubscribe

## Tests
Tested getSubscriberID, unsubscribe, and subscribe using a locally
running listmonk server with different parameters.
- [x] A new subscriber is created and added to the listmonk campaign
mailing list on listmonkSubscribe() for the given list IDs
- [x] Subscriber is removed from listmonk campaign mailing list on
listmonkUnsubscribe() for the given list IDs
- [x] The old email address is unsubscribed, and the new email is
subscribed when a user updates the email
2024-04-04 17:21:55 +05:30
Manav Rathi
27410b2da9 [web] Add an example fetch to staff (#1315)
- Add schema validation of the response
- Add an example fetch
2024-04-04 16:22:49 +05:30
Manav Rathi
ae061d2a44 fetch 2024-04-04 16:19:46 +05:30
Manav Rathi
d9d03d8451 Add schema validation of the response 2024-04-04 16:12:39 +05:30
Manav Rathi
2f5abb6318 [web] Scaffold staff app (#1314) 2024-04-04 15:50:10 +05:30
Manav Rathi
e53c923675 Lint fix + update URL 2024-04-04 15:44:03 +05:30
Manav Rathi
39228270c1 Deploy 2024-04-04 15:40:17 +05:30
Manav Rathi
384ec365e8 Add starter staff app 2024-04-04 15:25:38 +05:30
Vishnu Mohandas
b2da2c7e88 Setup Triple-T configuration for F-Droid (#1313)
Potential fix for https://github.com/ente-io/ente/issues/1172.
2024-04-04 15:16:45 +05:30
vishnukvmd
c25cc6f8a4 Setup Triple-T configuration for F-Droid 2024-04-04 15:15:59 +05:30
Vishnu Mohandas
b2cf6be5f5 [photos] v0.8.75 (#1312) 2024-04-04 14:50:54 +05:30
vishnukvmd
fce68ba1be [photos] v0.8.75 2024-04-04 14:50:22 +05:30
Manav Rathi
29550317f7 Enable the jsx-runtime plugin for vite's ESLint
This prevents it complaining about a missing React import.

Enabling this is recommended by the vite starter itself:

> Install
  [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and
  add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends`
  list
2024-04-04 14:46:41 +05:30
Manav Rathi
876c5800f9 [web] Convert payments app to Vite (#1311)
This is the culmination of the previous few PRs. The payments app now
uses vite, which is what we want to give out a real shot for the smaller
of our apps.

**Tested by**

Local setup, and subscribing to a plan.
2024-04-04 14:36:36 +05:30
Manav Rathi
608cb6c85e Prevent double rendering in strict mode
The double invocation during dev mode, while harmless, is confusing, so add an
additional small check to insure this only runs once.
2024-04-04 14:25:04 +05:30
Manav Rathi
712b99b8f3 Fix lint issue 2024-04-04 14:15:42 +05:30
Manav Rathi
935e47fbca Fix the payments eslint 2024-04-04 14:10:16 +05:30
Manav Rathi
fcb26d39f1 Don't need default export 2024-04-04 14:02:31 +05:30
Manav Rathi
ff6d0d32cf Remove unused 404 handler
The default appType == 'spa' in vite redirects all (unclaimed) paths to /index.html.

If needed, this can be disabled:
https://stackoverflow.com/questions/69701743/how-can-i-configure-vites-dev-server-to-give-404-errors/69711988#69711988
2024-04-04 13:58:30 +05:30
Vishnu Mohandas
52c47234fd [Photos] Allow for configuring a custom server (#1302)
## Description
Users can now tap on the onboarding screen 7 times to bring up a page
where they can configure the endpoint the app should be connecting to.

![photos-selfhost](https://github.com/ente-io/ente/assets/1161789/42fda09a-07e4-4c4e-a658-ec4a2d3f1848)

## Tests
- [x] Verified that production flows are working as expected
- [x] Verified that configuring the endpoint to a local instance lets
you
  - [x] Connect to that instance
  - [x] Create an account
  - [x] Upload a photo
  - [x] Logout and log back in
2024-04-04 13:41:26 +05:30
Manav Rathi
756050ae8c Fix compilation 2024-04-04 13:02:08 +05:30
Manav Rathi
a2d39a46be [server] nginx configuration improvements (#1310)
- Use keepalives
- Update deprecated http2 syntax
- Document how to check config

Refs:
-
https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives
- https://github.com/nginxinc/kubernetes-ingress/issues/4237
-
https://stackoverflow.com/questions/65944578/how-to-get-nginx-running-in-docker-to-reload-nginx-conf-configuration
2024-04-04 12:42:10 +05:30
Manav Rathi
407eca5414 [server] nginx configuration improvements
- Use keepalives
- Update deprecated http2 syntax
- Document how to check config

Refs:
- https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives
- https://github.com/nginxinc/kubernetes-ingress/issues/4237
- https://stackoverflow.com/questions/65944578/how-to-get-nginx-running-in-docker-to-reload-nginx-conf-configuration
2024-04-04 12:36:39 +05:30
Manav Rathi
87dc7d76ca Remove middleman package, to get it to compile 2024-04-04 11:36:20 +05:30
Ashil
8b643549fe [mobile][photos] Remove unused global keys (#1309) 2024-04-04 11:29:23 +05:30
Vishal
d8190926fd Change if-else 2024-04-04 11:24:13 +05:30
Manav Rathi
4255e48abb Convert payments app to use Vite - Part 1
(Doesn't compile)
2024-04-04 11:10:34 +05:30
Manav Rathi
a8a5cc8b59 Inline spinner 2024-04-04 09:55:52 +05:30
Manav Rathi
949a42004f Remove the need for a separate page 2024-04-04 09:53:11 +05:30
Manav Rathi
cb94dd8b42 [web] Refactor payments (#1304)
This is a reduction in code generally before we give a shot to using
vite for Payments. Once that is done, will do an end-to-end test of the
payments pages on localhost.
2024-04-03 21:44:08 +05:30
Manav Rathi
56d500f4e8 Keep React in scope 2024-04-03 21:41:03 +05:30
Manav Rathi
7a41ba43a5 Another cleanup of billing-service 2024-04-03 21:32:38 +05:30
Manav Rathi
7a729183e2 Cleanup the pages 2024-04-03 20:03:02 +05:30
Manav Rathi
aa5422db6c Clean up CSS 2024-04-03 19:54:16 +05:30
Manav Rathi
c0fee7bc91 Clean up strings 2024-04-03 19:51:01 +05:30
Manav Rathi
1411ca6fad Continue refactoring 2024-04-03 19:46:15 +05:30
Vishal
92715b658c Change API parameter 2024-04-03 19:24:12 +05:30
Vishal
2ddf4c897c Rectify if else 2024-04-03 18:25:41 +05:30
Vishal
ffefae89a6 Redefine struct 2024-04-03 17:50:53 +05:30
vishnukvmd
9d7a342aa9 Ensure widget is updated when endpoint changes 2024-04-03 17:34:45 +05:30
vishnukvmd
ee33a3229f Update landing page to provide an option to update the app's endpoint 2024-04-03 17:24:44 +05:30
vishnukvmd
54c4862e71 Add widget that renders the current endpoint app is connecting to 2024-04-03 17:24:26 +05:30
vishnukvmd
b97839adae Update strings 2024-04-03 17:24:01 +05:30
vishnukvmd
37c4295df9 Update NetworkClient when configuration changes 2024-04-03 17:23:54 +05:30
vishnukvmd
089be79688 Add API within Configuration to update the endpoint 2024-04-03 17:23:23 +05:30
vishnukvmd
0034d880f9 Initialize Configuration before Network 2024-04-03 17:23:00 +05:30
vishnukvmd
81bdc0fe73 Add strings 2024-04-03 17:22:34 +05:30
vishnukvmd
76dca4d819 Update iOS config 2024-04-03 17:22:22 +05:30
Manav Rathi
d0f1bbfca7 Refactor billing service 2024-04-03 17:22:00 +05:30
Manav Rathi
8a00f1b85f Remove custom errors indirection 2024-04-03 15:45:20 +05:30
Manav Rathi
f10f751a2f Inline local storage calls
The methods are trivial, and we cannot centralize the keys since they will be
different for different apps. So an abstraction for this is not beneficial.

Also move the next specific dev build check to @/next
2024-04-03 14:21:11 +05:30
Manav Rathi
d28daece8a ignorePatters seems to be inherited (as we wished) when extending 2024-04-03 13:48:41 +05:30
Manav Rathi
24bce96d71 Shorten 2024-04-03 13:44:30 +05:30
Manav Rathi
ad6dea2ecb prettier markdown 2024-04-03 13:39:44 +05:30
Manav Rathi
212dcfb88a Tinker 2024-04-03 13:32:05 +05:30
Manav Rathi
a689aca4a6 Remove the eslint stuff from docs
(trying to remove the eslint-disables throughout)
2024-04-03 13:26:46 +05:30
Manav Rathi
e2fd88bff0 Remove (possibly) unnecessary tsconfigRootDir
Let's see what breaks
2024-04-03 13:15:12 +05:30
Manav Rathi
764b6bf2f3 Move react setup to react specific file 2024-04-03 13:02:09 +05:30
Vishal
39ec761949 fix warnings 2024-04-03 12:57:37 +05:30
Vishal
01f842c445 Rearrange methods 2024-04-03 12:41:18 +05:30
Neeraj Gupta
2fe703df92 [server] Increase embedding fetch limit (#1300)
## Description

Also use different semaphore than existing diff API

## Tests
2024-04-03 12:38:34 +05:30
Vishal
18c48c7e0a Fix typo in comment 2024-04-03 11:14:55 +05:30
Manav Rathi
ca688d0d46 [server] Add a notice that minio is only for getting started (#1299)
From our Discord, someone commented

> if minio's cautions about Single-Node, Single-Drive are to be taken
seriously:
>
> "SNSD deployments use a zero-parity erasure coded backend that
provides no
added reliability or availability beyond what the underlying storage
volume
  implements. These deployments are best suited for local testing and
evaluation, or for small-scale data workloads that do not have
availability or
  performance requirements."

MinIO was never meant as a production replacement, it was only to make
it easy
for people to get started. So add a notice in the docs re this.
2024-04-03 10:04:20 +05:30
Manav Rathi
885308471f [server] Add a notice that minio is only for getting started
From our Discord, someone commented

> if minio's cautions about Single-Node, Single-Drive are to be taken seriously:
>
> "SNSD deployments use a zero-parity erasure coded backend that provides no
  added reliability or availability beyond what the underlying storage volume
  implements. These deployments are best suited for local testing and
  evaluation, or for small-scale data workloads that do not have availability or
  performance requirements."

MinIO was never meant as a production replacement, it was only to make it easy
for people to get started. So add a notice in the docs re this.
2024-04-03 10:01:48 +05:30
Vishnu Mohandas
125f7bfece Update export docs 2024-04-03 08:52:34 +05:30
Neeraj Gupta
011aee20d5 [server] Fix handling of redundant auth update (#1298)
## Description
When client tries to send update request with same data, the actual db
update doesn't happen. This was resulting in 5xx error.

## Tests
2024-04-03 07:13:44 +05:30
Neeraj Gupta
85778bcdaa [server] Fix handling of redundant auth update 2024-04-03 07:05:03 +05:30
Manav Rathi
43e97d225e [web] Restructure shared package layouts (#1294)
- Merge @/ui into @/next
- Restructure eslint config
2024-04-02 20:55:05 +05:30
Manav Rathi
b3a86874db yarn.lock 2024-04-02 20:47:35 +05:30
Manav Rathi
5c1ed5be8f Restructure eslint config 2024-04-02 20:44:57 +05:30
Manav Rathi
14fde54d87 Not really 2024-04-02 20:04:23 +05:30
Manav Rathi
26b35cec9e Merge @/ui into @/next 2024-04-02 19:58:42 +05:30
Vishal
b8100b1273 rename functions 2024-04-02 17:45:30 +05:30
Vishal
a5fcbbf901 add listmonk mailing list control (subscribe/usubscribe) 2024-04-02 17:36:53 +05:30
Manav Rathi
6213628aee [web] Prefer .local files for local only configuration (#1280)
Refs: https://vitejs.dev/guide/env-and-mode.html
2024-04-02 17:22:32 +05:30
Manav Rathi
a7625cd83d [web] Enable Russian (#1288)
The translation percentage of Russian in crowdin is now 100%, it's time
to enable it as an option in the UI.

A big thank you to the translators ❤️
2024-04-02 17:22:15 +05:30
Manav Rathi
cc90dd7ba5 [web] Enable Russian
The translation percentage of Russian in crowdin is now 100%, it's time to
enable it as an option in the UI.

A big thank you to the translators.
2024-04-02 17:16:33 +05:30
Manav Rathi
b3630f9543 [desktop] Prevent the desktop app from getting stuck on viewing openstreetmap info (#1287)
Open the link in a new tab. This prevents the desktop app from getting
into a state where the user cannot navigate back.

Tested on the web app and desktop app.
2024-04-02 17:10:16 +05:30
Manav Rathi
9cb289e002 [desktop] Prevent the desktop app from getting stuck on viewing openstreetmap info
Open the link in a new tab. This prevents the desktop app from getting into a
state where the user cannot navigate back.
2024-04-02 17:05:23 +05:30
Ashil
1800ad0a1f [Mobile][Photos] Bump up version to v0.8.74 (#1284) 2024-04-02 17:02:01 +05:30
Manav Rathi
3230b9275e [web] New translations (#1281)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-04-02 17:00:20 +05:30
Crowdin Bot
ce5627f04c New Crowdin translations by GitHub Action 2024-04-02 11:28:47 +00:00
Manav Rathi
8dd7c100af [web] Make the cast link clickable (#1286)
Tested locally.
2024-04-02 16:53:03 +05:30
Manav Rathi
2e7dcc6bc2 Make the cast link clickable 2024-04-02 16:51:27 +05:30
Manav Rathi
0e1bdfe07e Support arbitrary ReactNodes as title 2024-04-02 14:38:37 +05:30
Vishnu Mohandas
1e106d707f [mobile][photos] Fix colours in loading screen on light theme when viewing photos (#1283)
## Description

Before


https://github.com/ente-io/ente/assets/77285023/75304321-1fa4-4d61-9ad1-cc87ade62f92

After



https://github.com/ente-io/ente/assets/77285023/55b204b2-773c-42db-a03c-c9879f33548b
2024-04-02 14:01:41 +05:30
ashilkn
0053e814c8 nit: remove unnecessary clipping 2024-04-02 13:49:41 +05:30
ashilkn
53184da7fb fix: loading icon's color in light theme when viewing images 2024-04-02 13:49:05 +05:30
ashilkn
165bcb5c6e fix: white bg for loading state when viewing images, turned it to black.
when swiping on light theme, this comes up a 'white flash' on the right which looked odd. We use black bg when viewing images.
2024-04-02 13:47:57 +05:30
Vishnu Mohandas
d6316a1724 [mobile][photos] Prepare for release v0.8.73 (#1278) 2024-04-02 09:06:45 +05:30
Manav Rathi
b95fc54adb [web] Prefer .local files for local only configuration
Refs:
https://vitejs.dev/guide/env-and-mode.html
2024-04-01 19:59:02 +05:30
ashilkn
bc0a453cbc Merge branch 'main' into prepare_for_release_v0.8.73 2024-04-01 18:41:24 +05:30
ashilkn
166e9ad1bf Update change log 2024-04-01 18:41:21 +05:30
ashilkn
841921a732 bump up version to v0.8.73 2024-04-01 18:38:17 +05:30
Vishnu Mohandas
769da989c4 [mobile][photos] Do not upload files if ACCESS_MEDIA_LOCATION is not granted (#1275)
## Tests

Tested with and without granting `ACCESS_MEDIA_LOCATION`.
2024-04-01 18:28:37 +05:30
Vishnu Mohandas
3e917bd855 [photos][mobile] Add support for viewing HEIC images with proXDR (#1171)
## Description

New Oneplus devices have a "ProXDR" feature when viewing images. These
images (when in HEIC format) decode fine on devices that supports
ProXDR, but fails to decode on other devices.

So if decoding fails, we convert it to a JPEG and use that image for
viewing it.

## Tests

- [x] Tries converting to jpeg only if decoding fails
- [x] If converting also fails, the behaviour remains the same as before
when decoding fails.
2024-04-01 18:28:28 +05:30
Manav Rathi
7f1730b56c [web] Fix and standardize MUI / emotion imports (#1277)
- Always import from `@mui/material`
- Component selector API doesn't work, live with it and document it
2024-04-01 17:18:05 +05:30
Manav Rathi
25e762ba57 Remove mui from list of transpiled packages
- I can't see this mentioned anywhere in the docs
- Removing it didn't break anything dev / preview
2024-04-01 17:13:06 +05:30
Manav Rathi
d5f294980e Remove use of emotion from payments 2024-04-01 17:08:54 +05:30
Manav Rathi
1e410a82f2 Remove stray use of @mui/system 2024-04-01 17:05:05 +05:30
ashilkn
d013519655 refactor 2024-04-01 16:59:42 +05:30
Manav Rathi
3b3d314f9c Remove stale import from styled-engine 2024-04-01 16:52:57 +05:30
ashilkn
855d362cca Merge branch 'main' into handle_proxdr_image_viewing 2024-04-01 16:43:19 +05:30
Manav Rathi
eced463f6f Investigate and explain why component selectors don't work with Next vanilla
Refs:
- https://github.com/mui/material-ui/issues/27380#issuecomment-928973157
- https://codesandbox.io/s/hopeful-browser-4q17t5?file=/README.md
- https://mui.com/system/styled/#how-to-use-components-selector-api
- https://github.com/vercel/next.js/issues/46973
2024-04-01 16:43:10 +05:30
Ashil
f8febe12df [mobile][photos] Reupload files with missing GPS data (#1263)
## Description

- Fixes corrupt files (missing GPS data) that were uploaded due to [this
issue](https://github.com/ente-io/ente/pull/1261)
- Refactor

## Tests

Tested and working
- Uploaded two file from a build that has missing permission for
`ACCESS_MEDIA_LOCATION` and GPS data is missing.
- Created a new build with changes in this PR.
- Deleted the file from device. 
- Remote file has GPS data when checked from file info.

---------

Co-authored-by: Neeraj Gupta <254676+ua741@users.noreply.github.com>
2024-04-01 16:41:33 +05:30
ashilkn
0c44d1b789 remove unneccesary check 2024-04-01 16:18:40 +05:30
ashilkn
f74af4199d only verify media location access if platform is android 2024-04-01 16:14:29 +05:30
Manav Rathi
9b27cac465 Remove @emotion/server
It is not mentioned as a dependency in the SSR page

> For v10 and above, SSR just works in Next.js.
>
> https://emotion.sh/docs/ssr

Tested by - yarn dev, yarn preview:photos
2024-04-01 16:05:17 +05:30
ashilkn
7b94c32bbf Do not upload files if ACCESS_MEDIA_LOCATION is not granted 2024-04-01 15:51:13 +05:30
Manav Rathi
881c94be05 [web] Remove bootstrap (#1274)
Fixes the issues we started seeing with broken CSS after removing the
emotion cache.
2024-04-01 15:47:02 +05:30
Manav Rathi
7248a226bc Remove bootstrap 2024-04-01 15:35:45 +05:30
Manav Rathi
8ae7ae2de9 Replace the Spinner in payments 2024-04-01 15:32:56 +05:30
Manav Rathi
28cf7d76d5 Even numbers don't seem to be kosher, only strings work 2024-04-01 15:13:43 +05:30
Manav Rathi
c2957238da Fix the date handling 2024-04-01 15:07:29 +05:30
Manav Rathi
f9a2ec774a Make it work with MUI components 2024-04-01 14:54:29 +05:30
Neeraj Gupta
548721e415 [mob]Ignore souceFileMissing error for iOS (#1273)
## Description

## Tests
2024-04-01 14:32:18 +05:30
Manav Rathi
0568cd03c9 Refactor somewhat
More to come
2024-04-01 13:07:36 +05:30
Manav Rathi
226f891e99 [docs] Update-export-faq (#1271) 2024-04-01 12:32:18 +05:30
Manav Rathi
9643dd645f Fix typo "intac" 2024-04-01 12:31:38 +05:30
Manav Rathi
7e897815a1 Remove stale VSCode settings
.vscode is already in the gitignore, not sure how this got added (perhaps some
bug in the github.dev web editor that Jishnu is using).
2024-04-01 12:18:24 +05:30
Manav Rathi
a9b92b9bfa [web] Remove emotion cache (#1272)
- Still doesn't work in dev mode
- Prepares ground for removing bootstrap
2024-04-01 12:14:50 +05:30
Jishnuraj9
489de9f8c2 export-general-subscription-update 2024-04-01 11:54:59 +05:30
Manav Rathi
39bc68390f Match the variable name 2024-04-01 10:49:28 +05:30
Manav Rathi
83dabfbdee Refactor 2024-04-01 10:23:54 +05:30
Manav Rathi
35f2a6944e Inline 2024-04-01 09:58:55 +05:30
Manav Rathi
fbe2996dcc [meta] Update READMEs to mention the new Auth Desktop app (#1269)
Fixes https://github.com/ente-io/ente/issues/1268
2024-04-01 09:28:39 +05:30
Manav Rathi
7f23b31bbc [meta] Update READMEs to mention the new Auth Desktop app
Fixes https://github.com/ente-io/ente/issues/1268
2024-04-01 09:26:07 +05:30
Jishnuraj9
f43e260434 update images of export 2024-04-01 08:04:24 +05:30
Manav Rathi
18698d35bb Replace in export progress 2024-03-31 21:43:24 +05:30
Manav Rathi
9e41b906a7 Swap progress bar 2024-03-31 21:38:26 +05:30
Manav Rathi
0f2181c09b Remove more legacy ml code 2024-03-31 18:41:15 +05:30
Manav Rathi
707e14702e Remove unused ML debug code 2024-03-31 18:34:00 +05:30
Manav Rathi
f3a0240f1d Remove more dead code
...that uses bootstrap instead of spending migration effort on it.
2024-03-31 18:23:05 +05:30
Manav Rathi
e84b989484 Remove unused code
Came across this when trying to migrate off bootstrap in the few remaining
places, this code is unused and just removing it instead of doing a migration of
it to mui.
2024-03-31 18:19:48 +05:30
Manav Rathi
86e4cffb8e Replace bootstrap buttons in fix time dialog 2024-03-31 18:16:57 +05:30
Manav Rathi
1d02fe4f32 Remove unused fix-large-thumbnail feature
This was disabled years ago. Specifically removing this now to reduce the amount
of work in removing bootstrap.
2024-03-31 18:07:17 +05:30
Manav Rathi
e5edeae370 Remove the bootstrap carousel 2024-03-31 18:01:38 +05:30
Manav Rathi
40a1da1ba7 Fine tune 2024-03-31 18:00:09 +05:30
Manav Rathi
5dfafa28c7 Almost there in terms of styling 2024-03-31 17:54:38 +05:30
Manav Rathi
d3df6b31ae Use actual contents 2024-03-31 17:31:33 +05:30
Manav Rathi
145850a66e Try using intrinsic size 2024-03-31 17:28:26 +05:30
Manav Rathi
6b56c28870 Mark vscode-styled-components optional 2024-03-31 17:07:48 +05:30
Manav Rathi
9ec68ecd3d Mention vscode-styled-components 2024-03-31 17:04:38 +05:30
Manav Rathi
8c127a6cec Animate 2024-03-31 16:47:10 +05:30
Manav Rathi
3890373d4a Try pure-react-carousel as a replacement of bootstrap's Carousel 2024-03-31 16:45:46 +05:30
Manav Rathi
ee1eb75bdf Extract component 2024-03-31 16:41:50 +05:30
Manav Rathi
14e99ea26a Fix ports 2024-03-30 20:59:05 +05:30
Manav Rathi
7183a8b493 [web] Remove emotion caches
This is no longer needed for emotion > 10

> For v10 and above, SSR just works in Next.js.
>
> https://emotion.sh/docs/ssr#nextjs

Tested with

- yarn dev:*
- yarn preview:*

This change screws up the CSS in places in dev mode though.
2024-03-30 20:56:38 +05:30
Prateek Sunal
e1ac5e7394 [FIX] Auth Desk (#1262)
## Description

- Don't hide but close app on exit
- Hide window option
- Fix translation of labels of context menu
2024-03-30 19:27:56 +05:30
Prateek Sunal
1391cff1f1 fix: translate labels of context menu 2024-03-30 19:13:30 +05:30
Prateek Sunal
204d4d048e chore: update podfile 2024-03-30 19:10:01 +05:30
Prateek Sunal
8dfd60df19 fix: close app on exit and add option to hide window 2024-03-30 19:02:05 +05:30
Manav Rathi
5810d2b762 Add yarn preview:* 2024-03-30 18:06:58 +05:30
Manav Rathi
f6abcafc83 Copy over fix into auth and accounts 2024-03-30 17:20:26 +05:30
Ashil
7950f1ec26 [mobile][photos] Explicitly ask for media location (#1261)
## Description

On bumping up photo_manager version, it introduced a breaking change
where we need to explicitly ask for ACCESS_MEDIA_LOCATION permission.

## Tests

Tested on android 13 and 14 devices.
2024-03-30 16:48:15 +05:30
github-actions[bot]
6974672f8c [mobile] New translations (#1239)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-03-30 16:15:32 +05:30
Neeraj Gupta
25cedd5e2f [server] Gracefully handle stale collection entry (#1260)
## Description

## Tests
2024-03-30 15:24:52 +05:30
Neeraj Gupta
a51a965fc8 [cli] Fix handling of delete file with stale colleciton entry (#1259)
## Description

## Tests
Tested locally
2024-03-30 14:14:03 +05:30
Vishnu Mohandas
fc5d8aeca6 [auth] Add new custom icons in auth (#1258)
Add new icons

- ConfigCat
- Mercado Livre
- SendGrid
- Habbo
2024-03-30 07:02:04 +05:30
ialexanderbrito
03fc59a8fb feat: add new custom icons in auth 2024-03-29 17:15:31 -03:00
Prateek Sunal
80a27f7e6f [FIX] libffi7 missing error in auth appimage (#1257)
Package libffi7 with appimage
2024-03-30 01:03:34 +05:30
Prateek Sunal
cc2c8e3e26 fix: libffi7 missing error in appimage 2024-03-30 00:54:16 +05:30
Manav Rathi
d52f873c92 [web] Remove dead code from cast (#1256) 2024-03-29 22:45:05 +05:30
Manav Rathi
911cdd9448 Remove more dead code from cast 2024-03-29 22:37:42 +05:30
Manav Rathi
b4699ecfcb Remove ElectronFile from cast 2024-03-29 22:26:50 +05:30
Manav Rathi
ded151241f Remove more dead code from cast 2024-03-29 22:22:03 +05:30
Manav Rathi
3dfc3a6dba Remove dead code from cast 2024-03-29 21:56:33 +05:30
Vishnu Mohandas
08b7fe6a49 [FIX] home widget count function and package source (#1252)
## Description

- Switched to pub.dev version of home_widget
- Replaced count home widget with getInstalledWidgets().

## Tests
2024-03-29 21:32:05 +05:30
Manav Rathi
7ef59bb4cc Short circuit unused code
isFileEligibleForCast filters out isRawFileFromFileName. Specifically, it
filters out HEIC files. So getRenderableImage is a no-op.
2024-03-29 21:01:17 +05:30
Manav Rathi
049a240916 Remove dead code from cast 2024-03-29 20:54:10 +05:30
Manav Rathi
3fdf5f1e46 Remove dead cast code 2024-03-29 20:12:57 +05:30
Prateek Sunal
d92fd25a78 fix: home widget count function 2024-03-29 19:46:13 +05:30
Manav Rathi
640b546d78 [docs] Update-export2 (#1249) 2024-03-29 17:24:07 +05:30
Manav Rathi
9e3fbce6c7 Center align the dialog images 2024-03-29 17:23:08 +05:30
Manav Rathi
e89eb48214 [web] Various minor fixes and improvements to cast (#1250)
- Use 3001 for sidecars
- Use the placeholder as the placeholder, not as the label
- Change slideshow time from 5s => 10s
- Remove the 123456 below the actual code
- Make the code copyable without inserting spaces in between
2024-03-29 17:14:45 +05:30
Manav Rathi
9440b967c8 Remove the extra spaces being inserted when we copy paste
Ref:

- https://github.com/facebook/react/issues/1643
- https://stackoverflow.com/questions/10837063/display-text-with-spaces-that-are-not-copied
2024-03-29 17:10:51 +05:30
Jishnuraj9
d6769fb1d5 Update image and text-export 2024-03-29 17:06:48 +05:30
Jishnuraj9
df377ebcf3 update image 2024-03-29 16:34:16 +05:30
Prateek Sunal
0114775e22 Bump auth to 2.0.50 build number (#1248)
## Description

## Tests
2024-03-29 16:30:55 +05:30
Prateek Sunal
31ffb124b6 chore: bump it again to 250 2024-03-29 16:27:09 +05:30
Prateek Sunal
f01583d168 chore: bump auth to 249 build number 2024-03-29 16:25:58 +05:30
Neeraj Gupta
f6dca2dfc9 [server] Drop locationTag table and related code (#1245)
## Description

## Tests
2024-03-29 16:25:39 +05:30
Prateek Sunal
45f9b47f24 [FEAT] Add Context menu to desktop right click (#1247)
## Description


![image](https://github.com/ente-io/ente/assets/41370460/099a90d9-3fb7-48cc-8177-79ea81c3edfc)
2024-03-29 16:24:19 +05:30
Prateek Sunal
cb7a2445e1 fix: qr image 2024-03-29 16:23:55 +05:30
Prateek Sunal
4830a69aad chore: remove lint 2024-03-29 16:23:04 +05:30
Prateek Sunal
f8fbedfe10 fix: use context menu on desktop 2024-03-29 16:21:30 +05:30
Manav Rathi
d22cf34a0e Remove nesting 2024-03-29 16:18:49 +05:30
Neeraj Gupta
ef250acad9 [server] Add person EntityType (#1246)
## Description

## Tests
2024-03-29 16:12:59 +05:30
Neeraj Gupta
459c4515a0 [server] Drop locationTag table and related code 2024-03-29 16:08:28 +05:30
Prateek Sunal
056e29a5f5 feat: context menu vert 2024-03-29 16:07:09 +05:30
Prateek Sunal
71e87ef7e9 feat: context menu horz 2024-03-29 16:07:01 +05:30
Manav Rathi
0d3662d9fe Remove the 123456 below the actual code
It prevents copy pasting (and doesn't look too good either)
2024-03-29 16:03:34 +05:30
Manav Rathi
70e5e9b13c [cast] Change slideshow time from 5s => 10s 2024-03-29 12:34:54 +05:30
Manav Rathi
949780d1e8 [cast] Use the placeholder as the placeholder, not as the label 2024-03-29 12:15:06 +05:30
Manav Rathi
a06a93e73d Use 3001 for sidecars 2024-03-29 11:58:42 +05:30
Neeraj Gupta
bc45db51a9 [cli] Improve logging for decryption error (#1242)
## Description
Related to #1237
## Tests
2024-03-29 11:08:45 +05:30
Manav Rathi
54d93647ef Add SMTP for sending emails (#1228)
## Tests
Tested for templated mails in user.go, userauth.go, stripe.go,
public_collection.go, playstore.go, admin.go, email_notification.go

Screenshots for all the templates -
[https://drive.google.com/drive/folders/1f7BjM5MHicRUbr5jlCe2-4MGz7s1moLw?usp=sharing](url)
2024-03-29 09:22:40 +05:30
Manav Rathi
230ea380ad [docs] Change capitalization (#1238)
## Description
Changed "ente" to "Ente" as the first letter is meant to be a capital
one now:
<img width="303" alt="image"
src="https://github.com/ente-io/ente/assets/41323182/82ec2a2e-b7d3-4995-a3a9-950924bc05f6">

## Tests
2024-03-29 09:21:47 +05:30
Manav Rathi
81bff42992 [web] Fix nightly build (#1241)
This was accidentally an ancient version of axios when importing from
the older repo - update it to what the rest of the code uses (via the
shared package).
2024-03-29 09:16:06 +05:30
Manav Rathi
1f6b9030ff [web] Fix nightly build
This was accidentally an ancient version of axios when importing from the older
repo - update it to what the rest of the code uses (via the shared package).
2024-03-29 09:11:28 +05:30
green
ce6bdb1298 Update index.md 2024-03-29 00:00:55 +01:00
Vishnu Mohandas
2c7144590f fix: macos sha256 sum generation (#1236)
## Description

## Tests
2024-03-29 02:46:02 +05:30
Prateek Sunal
d21f0146ec fix: macos sha256 sum generation 2024-03-29 01:48:21 +05:30
Vishnu Mohandas
95ec3098c0 [FIX] Auth Desktop (#1235)
## Description

- Add Checksums for mac and windows
- Capitalize ente Auth mostly everywhere
- Ask for installation mode (for all users [admin] or for current user
[non-privileged])
2024-03-29 01:30:17 +05:30
Prateek Sunal
de2d04bb78 chore: bump auth version 2024-03-29 01:26:35 +05:30
Prateek Sunal
17500fd536 fix: capital case ente Auth 2024-03-29 01:22:17 +05:30
Prateek Sunal
86d5e636df fix: generated sha256 sums for windows and macos 2024-03-29 01:21:52 +05:30
Prateek Sunal
8325b270e0 fix: ask for installation mode at start 2024-03-29 01:21:39 +05:30
Prateek Sunal
9e93dc5e6d [FIX] Auth desktop (#1234)
Fixes for auth desktop
- Install Dir path and name fix
- Install/Uninstall Icon fix
- Don't check "add Desktop icon" by default
- Fix Exit app in system tray
2024-03-28 22:24:00 +05:30
Prateek Sunal
fbd673cb5a chore: bump to 247 2024-03-28 22:22:47 +05:30
Prateek Sunal
0760845536 chore: replace local_auth_ios with local_auth_darwin 2024-03-28 21:57:49 +05:30
Prateek Sunal
28156132a6 fix: use tray manager instead of system tray 2024-03-28 21:53:44 +05:30
Prateek Sunal
6966124249 chore: rename directory to icons 2024-03-28 21:25:06 +05:30
Prateek Sunal
d4ca574f1f fix: icons for setup and uninstall 2024-03-28 21:24:10 +05:30
Prateek Sunal
c7de109494 fix: don't create desktop icon by default 2024-03-28 18:36:09 +05:30
Prateek Sunal
5e5a6de709 fix: install directory and folder name 2024-03-28 18:31:34 +05:30
Vishal
8c9bd284e2 Remove isEnable from config 2024-03-28 18:16:38 +05:30
Manav Rathi
e4ce144bd4 [web] Complete integration of payments code (#1233)
Next step - deploy from here.
2024-03-28 17:48:05 +05:30
Manav Rathi
055ebd0447 Fix leftover gunk 2024-03-28 17:44:27 +05:30
Vishal
d5f0334a34 Remove isEnabled from config 2024-03-28 17:44:08 +05:30
Manav Rathi
212b2663d0 Add payments deployment scripts 2024-03-28 17:42:54 +05:30
Vishnu Mohandas
cc6cc6ede5 [mobile] New translations (#1220)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)
2024-03-28 17:32:31 +05:30
Manav Rathi
5867af3a2f Clean up EnteSpinner 2024-03-28 17:15:45 +05:30
Manav Rathi
ac01f7a12a Clean up utils 2024-03-28 17:10:48 +05:30
Manav Rathi
713a0038f0 Clean up CSS 2024-03-28 17:09:11 +05:30
Manav Rathi
3c0c591bed Remove custom font 2024-03-28 17:08:39 +05:30
Manav Rathi
990f9a8d70 Remove old payment instructions 2024-03-28 17:05:59 +05:30
Manav Rathi
e61b9646b3 Update comment 2024-03-28 16:34:22 +05:30
Manav Rathi
2114644ed1 Mirror the decision tree 2024-03-28 16:28:45 +05:30
Manav Rathi
a64cbf79dc Flip the order of smtp/transmail 2024-03-28 16:20:49 +05:30
Vishal
1f75633c5c Private method to bottom of the file 2024-03-28 15:03:27 +05:30
Manav Rathi
f524403580 Wait for i18 to be ready before trying to load the page 2024-03-28 14:25:20 +05:30
Vishnu Mohandas
3791f35601 Add CERN Icon (#1226)
This PR adds the CERN logo to Ente Auth custom icons. Great job with
Ente Auth so far! Keep up the fantastic work!
2024-03-28 14:05:56 +05:30
Manav Rathi
4c05e0925d Fix example whitelisted-redirect-url 2024-03-28 13:19:00 +05:30
Manav Rathi
2b379640ca Allow billing plans to be mounted into the Docker container if needed 2024-03-28 13:07:43 +05:30
Manav Rathi
8cd725978a Update the README 2024-03-28 12:55:47 +05:30
Ashil
5768a69062 [mobile][photos] fix: Image switcharoo bug when sharing from signal (#1232)
## Description

Fixes #1158
2024-03-28 12:43:52 +05:30
Manav Rathi
9599982f30 [web] Make payments feel at home (#1231)
Make the imported payments code feel at home in the new monorepo.
2024-03-28 12:16:25 +05:30
Manav Rathi
c5a2b61454 Fix tsconfig formatting 2024-03-28 12:11:09 +05:30
Manav Rathi
88e4f61221 Config 2024-03-28 12:07:10 +05:30
Manav Rathi
06f1fa086e Fix dev 2024-03-28 11:56:05 +05:30
Manav Rathi
e4c18b9e74 Inline 2024-03-28 11:49:05 +05:30
Manav Rathi
478435f806 Use :3001 for all the aux services 2024-03-28 11:42:59 +05:30
Manav Rathi
8f0ef055c5 [web] Make the imported payments code feel at home in the new monorepo
- Use the shared yarn monorepo configuration
- styled-components => emotion (since that's what the rest of the code uses)
- Remove Sentry (since it's gone elsewhere)
2024-03-28 11:40:22 +05:30
Manav Rathi
ad3503053d [web] Import code for payments.ente.io (#1230)
Manav: To avoid accidentally spilling out any secrets, squash and
import. However, the overwhelming majority of the work in the original
code was done by @abhinavkgrd so set them as the author for the commit.
2024-03-28 10:32:15 +05:30
Abhinav
8a3c0743fe Import code for payments.ente.io
Manav: To avoid accidentally spilling out any secrets, squash and
import. However, the overwhelming majority of the work in the original code was
done by Abhinav <abhinavk.grd@gmail.com> so set them as the author for the
commit.
2024-03-28 10:19:44 +05:30
Manav Rathi
33314bc2da [meta] Add a special case for comments in the notifier workaround (#1229)
Discord still hasn't fixed the issue on their end, and having a top
level link whenever a new comment is added is getting cumbersome, so add
a handler for the common comments case too.

Tested and deployed.
2024-03-28 10:12:22 +05:30
Manav Rathi
12aa071adc [meta] Add a special case for comments in the notifier workaround
Discord still hasn't fixed the issue on their end, and having a top level link
whenever a new comment is added is getting cumbersome, so add a handler for the
common comments case too.

Tested and deployed.
2024-03-28 10:11:04 +05:30
Vishal
cc3376154f Change name 2024-03-27 22:39:12 +05:30
Vishal
a7692b7d2e Update if else 2024-03-27 21:40:40 +05:30
Manav Rathi
3213fe0d26 [photos-desktop] Various changes, bringing the code up to speed (#1227)
See commit titles for a gist.
2024-03-27 21:22:54 +05:30
Manav Rathi
3706b99d36 Remove debug print 2024-03-27 21:21:31 +05:30
Manav Rathi
1bb79854a5 Mollify TypeScript 2024-03-27 21:17:30 +05:30
Manav Rathi
c9f8ad3e88 Tidy and prune the app's menu
- Switch to title case (discussed with others that the app's main menu is an
  appropriate choice and exception to our sentence casing otherwise).

- Prune
2024-03-27 21:12:45 +05:30
Manav Rathi
0dda25800e Update the node version number in tsconfig doc comments 2024-03-27 20:34:10 +05:30
Manav Rathi
95eec1f3d6 Remove brew special casing
Brew Formulae support an `auto_updates true` flag which tells brew's auto update
mechanism to stay out of the way.

Ref: https://docs.brew.sh/FAQ#why-arent-some-apps-included-during-brew-upgrade

Will need to open a PR to update our Formula though.

9241d331b6/Casks/e/ente.rb (L9)
2024-03-27 20:29:11 +05:30
Manav Rathi
5ac4799ce1 Support arbitrary parameters like console.log 2024-03-27 20:26:16 +05:30
Manav Rathi
3699118f0c Don't shellescape fully formed commands 2024-03-27 20:10:45 +05:30
Vishal
9893e3f305 Add Amazon SES for sending mails 2024-03-27 19:58:27 +05:30
Subhashis Suara
07552e7c47 Add CERN Icon 2024-03-27 14:33:27 +01:00
Manav Rathi
cf71d1477b update to new functions in more places 2024-03-27 17:44:49 +05:30
Ashil
79f7fb9ad9 [mobile][photos] Update change log for v0.8.72 release (#1225)
## Description

![72 change
log](https://github.com/ente-io/ente/assets/77285023/1a903668-76be-40d3-b00a-a0a7c7dfb66a)
2024-03-27 17:40:25 +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
Vishnu Mohandas
78b858ae7c [mobile] FAQ -> Help (#1224) 2024-03-27 17:06:39 +05:30
vishnukvmd
94f4c1e757 [mobile] FAQ -> Help 2024-03-27 17:06:01 +05:30
Manav Rathi
08489c8237 Tweak "render-process-gone" handler 2024-03-27 17:04:46 +05:30
Vishnu Mohandas
be62ea1459 [mobile][photos] Reduce GC events when loading models (#1223)
## Description

When using `readAsBytes()`, noticed a lot of `concurrentMark` GC event
in timeline when using the performance profiler dev tool, which were
potentially causing longer build and raster time for frames.
2024-03-27 16:44:05 +05:30
ashilkn
01b3d99e3a bump up version for release 2024-03-27 16:43:03 +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
ashilkn
7966c6bbc8 Merge branch 'main' into load_model_perf_improvement 2024-03-27 16:34:39 +05:30
ashilkn
35a8a96898 pref: reduce GC events 2024-03-27 16:34:06 +05:30
Vishnu Mohandas
eef33e9c0c [mobile][web] Redirect to payment portal if subscription is past due (#1222)
## Description

When a customer whose Stripe subscription is past due (within the 30 day
window after expiry time and has not been cancelled) clicks on the
subscription modal, take them to the payment portal to complete the
subscription.

## Tests

- [x] Tested web
- [x] Tested mobile
2024-03-27 16:29:58 +05:30
vishnukvmd
ba307b0dcd [web] Fix check 2024-03-27 16:23:38 +05:30
vishnukvmd
44403c94c2 Cancel SEPA subscriptions when payments fail 2024-03-27 16:20:58 +05:30
vishnukvmd
ba314eb647 [web] Handle past-due state on clicking "renew" 2024-03-27 16:17:23 +05:30
vishnukvmd
1020366c3a [mobile][web] Ignore cancelled subscriptions while computing past-due status 2024-03-27 16:11:03 +05:30
vishnukvmd
a15e9b0c9a [web] Redirect to payment portal if subscription is past due 2024-03-27 15:57:00 +05:30
vishnukvmd
a581e31ef9 [mobile] Redirect to payment portal if subscription is past due 2024-03-27 15:56:54 +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
Crowdin Bot
856db38fae New Crowdin translations by GitHub Action 2024-03-27 09:14:31 +00:00
Vishnu Mohandas
81a8cba4da [mobile] New translations (#1140)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)
2024-03-27 14:44:29 +05:30
Vishnu Mohandas
0c400db649 [server] Fix Stripe related issues (#1152)
## Description

### Stripe
- Settings have been modified to "Cancel" the subscription if all
attempts to charge an invoice fails. The previous configuration was to
set the subscription to "Past Due".

### Museum
- Updated our Stripe workflow to use `PaymentBehaviorAllowIncomplete` in
case of SEPA payments
- Fixed the issue caused by us spawning unnecessary subscriptions when a
customer tried to renew their expired subscription
- Removed the email that was being sent out when a Stripe subscription
expired. We will have to run our own cron to send a notification and
perform necessary clean up. When payments fail, we will still send a
notification to intimate the customer that their account is on hold.

### Mobile
- Fixed the dialogs and error messages on the payment page

## Tests
The following cases were tested for SEPA, Credit Cards, and Credit Cards
with 3DS.
- [x] Purchase
  - [x] Success
  - [x] Failure
- [x] Renewal
  - [x] Success
  - [x] Failure
- [x] Upgrades
  - [x] Success
  - [x] Failure
- [x] Cancellation
- [x] Resumption post recovery

## Note

These changes are likely to break in the event of some corner cases we
haven't thought of. But this will land us in a state that is better than
where we are right now in terms of collecting payments for expired
subscriptions and those via SEPA.
2024-03-27 14:43:36 +05:30
vishnukvmd
25a054287a Prevent duplicate emails for SEPA 2024-03-27 14:22:30 +05:30
Manav Rathi
379a5f8e79 [server] Publish docker image - Part 2/2 (#1219)
Part 2 (and final part) of https://github.com/ente-io/ente/pull/1218.

Completes https://github.com/ente-io/ente/discussions/673. The images
are accessible at `ghcr.io/ente-io/server`, e.g.

```sh
docker pull ghcr.io/ente-io/server
```
2024-03-27 13:59:14 +05:30
Manav Rathi
62d95ad862 Mention pre-built binary in docs 2024-03-27 13:53:43 +05:30
Manav Rathi
e803b7f053 Document in main README 2024-03-27 13:44:24 +05:30
Manav Rathi
741c968c8a Fix typo 2024-03-27 13:10:05 +05:30
Manav Rathi
4a4a6ba44a Give an example of the pull command 2024-03-27 13:04:28 +05:30
Manav Rathi
6588880b31 Use the correct commit, not the current one 2024-03-27 13:02:46 +05:30
Manav Rathi
cb45a070be Tweaks 2024-03-27 12:58:17 +05:30
Manav Rathi
fc8e79fbe9 Remove double namespacing 2024-03-27 12:54:29 +05:30
Manav Rathi
a8a2e7aee3 [server] Publish docker image - Part 1 (#1218)
- Outline the plan
- Add a first cut of the publish script

Merging this now so that I can test the workflow. Post a successful
publish, I'll open another PR with any fixes entailed, and will also
document this in the main server README.
2024-03-27 12:46:26 +05:30
Manav Rathi
4ba76e4aa2 Tweaks 2024-03-27 12:46:08 +05:30
Manav Rathi
7c0f41166c Add a first cut of the publish script 2024-03-27 12:42:29 +05:30
Manav Rathi
b31332ff30 Outline the plan 2024-03-27 12:42:26 +05:30
Manav Rathi
16c2706e48 [docs] Add images for continuous sync (#1217) 2024-03-27 11:55:10 +05:30
Manav Rathi
50431c6410 Update image 2024-03-27 11:53:15 +05:30
Manav Rathi
b6b66684f3 Reindent 2024-03-27 11:46:37 +05:30
Jishnuraj9
0e04a0df04 add images for continuous sync 2024-03-27 11:43:58 +05:30
Vishnu Mohandas
0fc3773812 feat: rounded icons for auth desktop (#1215)
## Description

## Tests
2024-03-26 23:19:43 +05:30
Prateek Sunal
2cda8da3c5 fix: remove unused submodules 2024-03-26 23:13:54 +05:30
Prateek Sunal
652f6a92f5 feat: rounded icons for desktop 2024-03-26 23:12:38 +05:30
Manav Rathi
a78e2892cd [photos-desktop] Update to latest Electron (#1213)
- And update to latest everything else too
- Fix the duplication in preload
- ... and many more cleanup changes (see commit titles for details)

Should not have major functional impact, and whatever IPC actions got
broken by the switch to context-isolation will still not be working.
This is just an intermediate step, and more PRs will continue fixing the
IPC APIs.
2024-03-26 21:54:18 +05:30
Manav Rathi
48a726885f Fix typo in comment 2024-03-26 21:45:21 +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
vishnukvmd
c9618d8038 Update copy 2024-03-26 21:31:29 +05:30
vishnukvmd
888aca7e6c Extract common code 2024-03-26 21:11:57 +05:30
vishnukvmd
31d3319d20 Revert "Depend on subscription-past-due events to trigger the account-on-hold email"
This reverts commit a131c16f4e.
2024-03-26 20:59:02 +05:30
Vishnu Mohandas
2cadc0f0fc Update otp.md 2024-03-26 20:45:46 +05:30
vishnukvmd
a131c16f4e Depend on subscription-past-due events to trigger the account-on-hold email 2024-03-26 20:29:55 +05:30
vishnukvmd
b78a66a274 [mobile] Update behavior of the payment page 2024-03-26 19:59:22 +05:30
Vishnu Mohandas
1c891f80f9 [docs] Improve export docs (#1212) 2024-03-26 16:40:11 +05:30
Manav Rathi
613e32b00e [docs] Improve export docs 2024-03-26 16:38:49 +05:30
Vishnu Mohandas
c72878b00e [auth] New translations (#1174)
New translations from
[Crowdin](https://crowdin.com/project/ente-authenticator-app)
2024-03-26 11:47:40 +05:30
Manav Rathi
e7db1ceb01 [web] New translations (#1207)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-26 09:58:33 +05:30
Manav Rathi
512226b727 [docs] Add FAQ items around self hosting (#1209) 2024-03-26 09:58:00 +05:30
Manav Rathi
7fbb37a851 Add FAQ items around self hosting 2024-03-26 09:57:08 +05:30
Crowdin Bot
af568bcb21 New Crowdin translations by GitHub Action 2024-03-26 02:02:59 +00:00
Crowdin Bot
33cfec915a New Crowdin translations by GitHub Action 2024-03-26 01:55:04 +00:00
Crowdin Bot
e3d3943539 New Crowdin translations by GitHub Action 2024-03-26 01:36:29 +00:00
Vishnu Mohandas
a56d906160 [auth] v2.0.46 (#1204) 2024-03-26 00:03:36 +05:30
vishnukvmd
1fb6f4ded2 v2.0.46 2024-03-26 00:03:10 +05:30
Prateek Sunal
31fdd9dc65 [FIX] Libffi error for appimage (#1203)
Auth desktop linux build fix + Playstore aab shouldn't be created if
nightly or beta
2024-03-25 23:47:34 +05:30
Prateek Sunal
ee34291a54 fix: disable aab build if nightly or beta 2024-03-25 23:42:31 +05:30
Prateek Sunal
eeca6aac74 fix: libffi error for now 2024-03-25 23:41:12 +05:30
vishnukvmd
f2aac262b1 Remove unused flag 2024-03-25 23:27:39 +05:30
vishnukvmd
4afc056a9f Stop listening to subscription deleted events 2024-03-25 23:26:48 +05:30
Vishnu Mohandas
f75fc7a265 [auth] v2.0.45 (#1202) 2024-03-25 23:20:15 +05:30
vishnukvmd
bba00c51e8 v2.0.45 2024-03-25 23:19:41 +05:30
Vishnu Mohandas
371ec01e6e [auth] fix error on windows and linux (#1200)
[auth] fix error on windows and linux
2024-03-25 23:18:59 +05:30
Prateek Sunal
bc7309665d fix: linux error 2024-03-25 23:17:21 +05:30
vishnukvmd
2dcf5daf54 Handle cases where default payment method might not be specified 2024-03-25 23:16:20 +05:30
vishnukvmd
29245b73b9 Cancel subscriptions on SEPA failures immediately 2024-03-25 23:15:43 +05:30
Prateek Sunal
61f1610c8d fix: error on windows 2024-03-25 23:14:51 +05:30
vishnukvmd
d003542e42 Simplify how last payment method is fetched 2024-03-25 23:13:56 +05:30
Vishnu Mohandas
62276d49d2 [auth] Desktop Release Candidate (#1133)
## Description

This suffices all the changes that were gone through the auth app to
enable Desktop release.
2024-03-25 22:15:18 +05:30
Prateek Sunal
e7f26ba250 fix: setup for app_links and window_manager 2024-03-25 22:02:58 +05:30
Prateek Sunal
86a334a769 fix: windows versioning 2024-03-25 21:58:47 +05:30
Vishnu Mohandas
a6cb9023bf Update ente.io/faq => help.ente.io where possible (#1199)
On desktop, now there Help menu will have an "Ente Help" option instead
of "FAQ".

<img width="222" alt="Screenshot 2024-03-25 at 19 35 33"
src="https://github.com/ente-io/ente/assets/24503581/f061419d-7587-4438-b055-927a9cc8f42f">

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:55:54 +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
Manav Rathi
147d79c64f [web][photos] Fix infinite loop on half-logins (#1197)
Fix an infinite loop of navigation under the following conditions: key
is valid
but token is not present.

Fix is to match the condition used in both gallery

    if (!key || !token) {

and the root page.

They seemed to have diverged in commit
c3304571a9.

Was able to reproduce this when launching the desktop app such that the
key was
picked up (possibly from a prior installation) from the secure keychain,
but the
token was not found. I feel this is also a fix for a similar navigation
loop
recently reported by QA but unreproducible so far.
2024-03-25 19:11:07 +05:30
Prateek Sunal
704abf1265 Merge remote-tracking branch 'origin/main' into beta 2024-03-25 18:41:14 +05:30
Prateek Sunal
9f32a8aa83 fix: remove unused submodules 2024-03-25 18:35:08 +05:30
Manav Rathi
4b7155dd13 Match the condition in one more place 2024-03-25 17:44:27 +05:30
Manav Rathi
3b29f8ec2c [web/desktop] Support windows environment on command (#1198)
## Description

This is my first time in ente! I modified two commands to allow the
build scripts for web and desktop to work in a Windows environment.

- Before running the command to get the git SHA in `next.config.js`, I
checked the platform of the current OS and changed it so that we could
run a command that would work on Windows.
- `NUL` is same as `/dev/null` in Windows, and `cd .` is always return
nothing with 0 status code.
- Added a new package called
[`shx`](https://[github.com/shelljs/shx](https://github.com/shelljs/shx))
to the development dependencies to support `rm` and `ln`, which are
commands not supported by Windows when running the Desktop build
command.

#1191 

## Tests

I've tested the web build and desktop build in a Windows environment. I
don't have a Mac, so I'd love for someone to test it on a Mac and let me
know the results.
2024-03-25 17:12:23 +05:30
Manav Rathi
eecb8b70f4 [web][photos] Fix infinite loop on half-logins
Fix an infinite loop of navigation under the following conditions: key is valid
but token is not present.

Fix is to match the condition used in both gallery

    if (!key || !token) {

and the root page.

They seemed to have diverged in commit c3304571a9.

Was able to reproduce this when launching the desktop app such that the key was
picked up (possibly from a prior installation) from the secure keychain, but the
token was not found. I feel this is also a fix for a similar navigation loop
recently reported by QA but unreproducible so far.
2024-03-25 16:48:08 +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
LI-NA
b98da635b6 [web] Change the command to fetch the git SHA
To make the git command work on Windows, changed it to use different commands depending on the platform of the OS.
2024-03-25 20:10:38 +09:00
Manav Rathi
37dce2bdb5 [photos-desktop] Fix preload script (#1196)
The preload script is now self contained, and the app when launched
tries to open the renderer correctly. It goes on to fail because of an
infinite navigation loop, but that's a different issue.

Beyond the navigation loop, there is more pending work to do - not all
the ipcMain/ipcRenderer communication would currently be working since
the objects being passed around (like "File") are not copyable. Still,
this PR is a checkpoint for the preload structure.
2024-03-25 15:49:55 +05:30
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
Prateek Sunal
1859bfd9da fix: remove next electron server 2024-03-25 12:47:57 +05:30
Prateek Sunal
893421de6e fix: divider theme in material 3 2024-03-25 12:45:44 +05:30
Prateek Sunal
549e1a2753 fix: delete unused files 2024-03-25 12:45:30 +05:30
Manav Rathi
e8acbd8c9f Convert the other conversion functions 2024-03-25 12:45:21 +05:30
Prateek Sunal
b185a37435 fix: onboarding page spacing 2024-03-25 12:38:51 +05:30
Manav Rathi
2522da2b5e Handle runFFMPEGCmd in preload 2024-03-25 12:32:57 +05:30
Prateek Sunal
bd5c56349a Merge remote-tracking branch 'origin/main' into beta 2024-03-25 12:26:31 +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
Ashil
ed4886a6a5 [mobile][photos] Fix performance benchmarking config (#1195)
## Description

- Fix broken integration test used for benchmarking gallery scroll
performance.
- Automate email and password entry.
- Write script to run perf test.
2024-03-25 10:30:13 +05:30
Vishnu Mohandas
bdd6663461 [auth] custom icons (#1194)
Edited the custom-icons.json for the added SVG files.
2024-03-25 10:17:11 +05:30
ludespeedny
a403cd88e2 custom icons for DCS, WYZE 2024-03-24 12:20:28 -04:00
ludespeedny
d11ee7acb4 Update custom-icons.json
update custom-icons.json for DCS and WYZE icons.
2024-03-24 12:18:33 -04:00
Prateek Sunal
47370bdeaf fix: focus of password entry box 2024-03-23 22:37:25 +05:30
Vishnu Mohandas
f3bdfa84ef [docs] Collapse the Migration guide for Auth 2024-03-23 21:06:35 +05:30
Manav Rathi
4bf99c8bea [photos-desktop] Fix preload.ts - Part x/x (#1190)
Continuation of https://github.com/ente-io/ente/pull/1189
2024-03-23 20:44:41 +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
Prateek Sunal
af22c48a99 fix: remove unwanted debug print 2024-03-23 20:01:56 +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
Prateek Sunal
19c2e50ef2 feat: add system tray for desktop 2024-03-23 19:18:30 +05:30
Manav Rathi
b1d0909675 EXtract common queueProcessor 2024-03-23 18:49:22 +05:30
Prateek Sunal
5aec3bc7fd chore: new files 2024-03-23 18:48:57 +05:30
Manav Rathi
7704b902c4 Extract shared function 2024-03-23 18:46:20 +05:30
Manav Rathi
bdb2a22863 Extract shared function 2024-03-23 18:44:30 +05:30
Prateek Sunal
1f091e33df feat: add listener to windows resize 2024-03-23 18:44:21 +05:30
Manav Rathi
47a7042d55 Remove dead code from cast 2024-03-23 18:38:31 +05:30
Manav Rathi
a5c3aff54b Expose an fs.exists over the context bridge 2024-03-23 18:28:22 +05:30
Prateek Sunal
9e6e91fe7e Merge remote-tracking branch 'origin/main' into beta 2024-03-23 18:26:11 +05:30
Prateek Sunal
35ebf37849 fix: open action pane on right click 2024-03-23 18:25:52 +05:30
Manav Rathi
120edbbc65 [photos-desktop] Fix preload.ts - Part x/x (#1189)
- Refactor towards making preload.ts self contained (see comments at the
top of the file why)
- More PRs in this series will come
- Build is still broken
2024-03-23 16:17:23 +05:30
Manav Rathi
7a3209ebf6 Fix preload.ts - Part x/x 2024-03-23 16:13:16 +05:30
Manav Rathi
efa49bd2b0 [web] New translations (#1187)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-23 16:11:29 +05:30
Crowdin Bot
e953c1c16b New Crowdin translations by GitHub Action 2024-03-23 10:40:49 +00:00
Manav Rathi
f7d2b735f9 [crowdin] Invalidate existing translations when source strings change (#1188)
Don't upload existing translation when syncing with Crowdin. This way,
we let the existing translations be invalidated when we change the
source string (this was not happening previously since we also upload
the (older) translations when
we upload the changed source strings).

**Tested by**

Doing this on a different test branch, changing a source string,
manually running the workflow against that branch, and verifying that
the strings are getting reset in the PR that Crowdin' action opens.
2024-03-23 15:28:29 +05:30
Manav Rathi
bbeac2bdf0 [crowdin] Invalidate existing translations when source strings change
Don't upload existing translation when syncing with Crowdin. This way, we let
the existing translations be invalidated when we change the source string (this
was not happening previously since we also upload the (older) translations when
we upload the changed source strings).
2024-03-23 15:26:34 +05:30
Manav Rathi
517ee0914c [web] Update the "source" translation (#1186)
https://github.com/ente-io/ente/pull/1185 updated the file but in the
accounts app. That's not the file that's used as the source - this PR
updates the one we use as the source for Crowdin.
2024-03-23 15:03:15 +05:30
Manav Rathi
53c53cebbc [web] Update the "source" translation
https://github.com/ente-io/ente/pull/1185 updated the file but in the accounts
app. That's not the file that's used as the source - this PR updates the one we
use as the source for Crowdin.
2024-03-23 15:01:44 +05:30
Vishnu Mohandas
d673537110 Fix cases (#1185)
## Description
The intent was to lower the case for "Files" and "Each" (that were in
caps), since the file was open, also ended up flipping the case for
"ente".

## Tests
Have verified the places "files" and "each" were being printed. As for
"Ente", the change should not cause any side effects.
2024-03-23 14:54:20 +05:30
vishnukvmd
a275ab7740 Set subscription to expire 7 days after payment failure 2024-03-23 14:37:29 +05:30
vishnukvmd
0fd4b2936d ente -> Ente 2024-03-23 12:22:16 +05:30
vishnukvmd
a96cb58f87 Fix case for strings 2024-03-23 12:20:15 +05:30
Manav Rathi
2de4e51c7b [photos-desktop] Disable node integration - Part x/x (#1181)
Continuing in the series of refactorings, working towards disabling node
integration in the photos desktop app.
2024-03-22 21:06:01 +05:30
Manav Rathi
d297465ea6 Dedup 2024-03-22 20:48:57 +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
0a7991bc0e Remove unused code 2024-03-22 19:52:08 +05:30
Manav Rathi
302b9a46b5 [photo-desktop] Rely heavier on local Electron cache (#1178)
Remove the special disk only cache we had when running under Electron,
and instead rely on the "disk-cache-size" flag to get the embedded
Chromium in our app to cache more generously.

This change is being done to reduce the surface area of the APIs we need
to migrate to in a post no-node-integration world.
2024-03-22 17:54:30 +05:30
Manav Rathi
68fe6f45c4 Validate that getPath is not throwing 2024-03-22 17:54:02 +05:30
Manav Rathi
03bad54bce Remove from the web side 2024-03-22 17:41:32 +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
193c8d8899 Fix an error in the order of the arguments for imagemagick (#1175)
## Description

When importing a folder, I am getting this error on each image:
```
  cmd: "'/tmp/.mount_ente-xHvuBzN/resources/image-magick' -auto-orient -define 'jpeg:size=1440x1440' 'IMG_9694.heic' -thumbnail '720x720>' -unsharp '0x.5' -quality 70 '/tmp/ente/E6YH91g3T3-thumb.jpeg'",
  stdout: '',
  stderr: "magick: no images found for operation `-auto-orient' at CLI arg 1 @ error/operation.c/CLIOption/5432.\n"
```

## Tests

This is UNTESTED because I don't have a build env ready, however it
seems like this error is coming out because we pass the input file after
specifying some modifier flag that applies to it, and we should put the
input before.
2024-03-22 16:03:10 +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
Manav Rathi
f2c288bdab Remove promise-fs
Unnecessary, and unmaintained (since now node offers it natively)
2024-03-22 15:54:18 +05:30
Mathieu Velten
87de9e2afa Fix an error in the order of the arguments for imagemagick 2024-03-22 11:21:36 +01:00
Manav Rathi
1830a1b931 Let fs.readFile throw on non-existent files 2024-03-22 15:39:05 +05:30
Manav Rathi
b6b4ee7e3a recursive: true is mkdir -p 2024-03-22 15:31:45 +05:30
Manav Rathi
c41bb571f6 Convert more promise-fs 2024-03-22 15:23:41 +05:30
Manav Rathi
94ac21950d Convert to Electron's native fetch 2024-03-22 15:21:27 +05:30
Manav Rathi
8c40b950c7 Remove old and no longer necessary desktop cutoff version flag
It's been more than an 1.5 years since this was needed, everyone should've
updated by now.
2024-03-22 15:17:59 +05:30
Manav Rathi
8391e7edfc Start migrating from promise-fs 2024-03-22 15:13:37 +05:30
Manav Rathi
d98c3686c5 Inline 2024-03-22 11:33:24 +05:30
Manav Rathi
025ef4e1d9 Shorten 2024-03-22 11:26:04 +05:30
Manav Rathi
18deac3a41 Document 2024-03-22 11:21:05 +05:30
Manav Rathi
b1f45c8602 Move export functions to preload 2024-03-22 09:49:11 +05:30
Manav Rathi
388904a46a [web] New translations (#1173)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-22 09:30:36 +05:30
Crowdin Bot
c9e008895c New Crowdin translations by GitHub Action 2024-03-22 01:36:33 +00:00
ashilkn
953824ca25 Refactor: reduce parameters and change name of function 2024-03-21 19:54:31 +05:30
Prateek Sunal
784b003ceb fix: also bundle libffi in appimage 2024-03-21 18:59:26 +05:30
ashilkn
7c05069dbd fix(viewing proXDR images): When codec fails to produce an image, try converting image to jpeg and use the jpeg file for viewing the image 2024-03-21 16:26:09 +05:30
vishnukvmd
e634310cb1 Remove unused method 2024-03-21 14:49:37 +05:30
vishnukvmd
b95d7c241d Create new subs only if the existing subscription is in a cancelled state 2024-03-21 14:48:29 +05:30
vishnukvmd
3cf680eec1 [WiP] Prevent subscription cancellation 2024-03-21 14:42:38 +05:30
vishnukvmd
1f17f2442a Handle SEPA failures 2024-03-21 14:33:10 +05:30
vishnukvmd
859af52c64 Remove commented code 2024-03-21 13:55:42 +05:30
vishnukvmd
78e5e3bdb1 Minor refactor 2024-03-21 13:31:46 +05:30
vishnukvmd
5635e63cb7 Update handling for subscription updated events 2024-03-21 13:29:42 +05:30
Manav Rathi
4c33030f28 [photos-desktop] Document a bit as I find my way around disabling nodeIntegration (#1170)
* Also includes an unrelated change to update the support email.
* See corresponding commit messages for more details about why specific
bits of code were removed.
2024-03-21 12:19:24 +05:30
Manav Rathi
1157919496 Update the support email 2024-03-21 12:14:23 +05:30
Manav Rathi
3c4619e5e4 Add a notice 2024-03-21 12:13:39 +05:30
Manav Rathi
e58ef51d12 [docs] Update sharing-logs.md (#1169)
Removing unnecessary formatting
2024-03-21 12:03:50 +05:30
Jishnuraj9
e4b0cca777 [docs] Update sharing-logs.md
Removing unecessary formatting
2024-03-21 12:01:39 +05:30
Vishnu Mohandas
11e30cf79a Update quick-link.md 2024-03-21 11:53:27 +05:30
Vishnu Mohandas
21526722df Update and rename public-links.md to public-link.md 2024-03-21 11:43:43 +05:30
Manav Rathi
4ea43e619b More docs 2024-03-21 10:54:32 +05:30
Manav Rathi
cd1d22cdfb Shorten 2024-03-21 10:45:48 +05:30
Manav Rathi
cc623e5010 Remove unnecessary steps
I'm not sure how it is happening, but both ffmpeg-static and onnx get to their
correct path without this configuration. the paths it gets to is also slightly
different, so it seems that this snippet does not have any effect (at best):

    ente.app/Contents/Resources/app.asar.unpacked/node_modules
2024-03-21 10:43:33 +05:30
Manav Rathi
bb865a7b15 Add documentation about ffmpeg
https://alexandercleasby.dev/blog/use-ffmpeg-electron
2024-03-21 10:16:21 +05:30
Abhinav
520f7ab64c only use PaymentBehaviorAllowIncomplete for SEPA payment method 2024-03-21 07:18:28 +05:30
Abhinav
4e074770d2 invoice client specific invoice api 2024-03-21 06:48:49 +05:30
Manav Rathi
1361ca0c8e [docs] import FAQs and other docs from website (#1167)
- Documentation only change.
- Verified visually, and that `yarn build` runs.
2024-03-20 22:16:47 +05:30
Manav Rathi
a4b8571642 Fixes and tweaks 2024-03-20 21:54:55 +05:30
Manav Rathi
2a5d9cd47f yarn pretty 2024-03-20 21:26:50 +05:30
Manav Rathi
93e187d9e7 Import the remaining FAQs 2024-03-20 21:24:49 +05:30
Manav Rathi
1acbe806ae Import feature pages from website 2024-03-20 20:30:59 +05:30
Manav Rathi
b1ab27e42c Rearrange 2024-03-20 19:55:17 +05:30
Manav Rathi
5710dec46b Fix index 2024-03-20 19:51:24 +05:30
Manav Rathi
3a2c7ce5f9 Import migration guides from website
Needed tweaking to handle Gatsby => Vitepress
2024-03-20 17:31:04 +05:30
Manav Rathi
46d7803da0 [meta] Fix the docs deployment workflow (#1161)
Fix what I accidentally broke in
https://github.com/ente-io/ente/pull/1149
2024-03-20 16:49:33 +05:30
Manav Rathi
19c2f07a19 [meta] Fix the docs deployment workflow
Fix what I accidentally broke in https://github.com/ente-io/ente/pull/1149
2024-03-20 16:46:18 +05:30
github-actions[bot]
43ebd7147d [auth] New translations (#1141) 2024-03-20 16:19:39 +05:30
Manav Rathi
812e02d4d7 Update sharing-logs.md (#1160)
Documentation change
2024-03-20 15:54:03 +05:30
vishnukvmd
49893d9732 Update on-hold email subject 2024-03-20 14:31:33 +05:30
vishnukvmd
db81f52cf1 Update mail when subscription is on-hold 2024-03-20 14:31:01 +05:30
Prateek Sunal
dd0678d3d0 fix: handle all types of line breaks 2024-03-20 14:18:42 +05:30
vishnukvmd
628565cfaf Merge branch 'main' into sepa-fix 2024-03-20 14:08:36 +05:30
Vishnu Mohandas
8101fe1495 Patch few Stripe related issues (#1156) 2024-03-20 14:07:26 +05:30
vishnukvmd
ec258e8b2a Extract the payments redirect URL into an environment variable 2024-03-20 14:06:53 +05:30
vishnukvmd
b769c428eb Hide the dialog on page load 2024-03-20 14:05:23 +05:30
vishnukvmd
61d5f3189b Update cancellation status on receiving webhook from Stripe 2024-03-20 14:05:09 +05:30
Manav Rathi
7b1b6bf88f Document a better, more explicit, reference 2024-03-20 13:47:38 +05:30
Manav Rathi
4c651da244 Document my current understanding 2024-03-20 13:17:41 +05:30
Manav Rathi
467acf2b8e Remove old migration path
This migration path was in the last release v1.6.63, and it has now been out
there for a couple of months so apart from some outliers the migration should've
already happened. Even for the outliers, this will increase their cache size but
won't have a functional impact.

Cleaning this code now to reduce the amount that needs to be changed to support
a contextBridge aware cache.
2024-03-20 12:29:58 +05:30
Manav Rathi
7cc795ead3 [infra] Mention that logging to stdout is a good default for services (#1155)
Documentation only change.
2024-03-20 11:29:23 +05:30
Manav Rathi
e25089a55c [infra] Mention that logging to stdout is a good default for services 2024-03-20 11:28:40 +05:30
Jishnuraj9
964fc8c992 Update sharing-logs.md 2024-03-20 11:15:19 +05:30
Manav Rathi
0eedd5e57f Add deprecation notice to ElectronFile 2024-03-20 10:52:31 +05:30
Manav Rathi
0634727ef3 Remove unused file
From my understanding, this was accidentally leftover from 3c8af97f69
2024-03-20 10:34:17 +05:30
Manav Rathi
8b0ce5d521 Add documentation links 2024-03-20 10:32:29 +05:30
Manav Rathi
b77ac2a2d8 [workers] Fallback to plain text Discord message as a 429 workaround (#1154)
**Tested by**

Deployed, and redelivered a few recent messages to see that they're
falling back to the fallback.
2024-03-20 09:58:06 +05:30
Manav Rathi
35ba5b6685 [workers] Fallback to plain text Discord message as a 429 workaround 2024-03-20 09:56:14 +05:30
Prateek Sunal
01ec6e04d4 fix: update ente-io/auth to ente-io/ente 2024-03-19 21:37:53 +05:30
Prateek Sunal
4b3a8117b7 fix: constrain language picker screen 2024-03-19 21:37:36 +05:30
Manav Rathi
2bf03cbcaf [photos-desktop] Enable contextIsolation - Part 1 (#1153)
The desktop app in its current state does not function. More PRs will
come, but I wanted to keep this branch in sync with main instead of
continually rebasing it. Now that the photos app has been deployed, it
is a good idea to merge these changes.

Have paid extra attention to ensure that the diff for the web changes is
correct and does not introduce bugs.
2024-03-19 19:25:17 +05:30
Manav Rathi
8f2bb9c861 Add note about custom errors 2024-03-19 19:18:05 +05:30
Manav Rathi
83477cfe37 Forward clearElectronStore 2024-03-19 19:18:05 +05:30
Manav Rathi
3ce8513e48 Move more standalone methods to preload 2024-03-19 19:18:05 +05:30
Manav Rathi
b3289f2b8d Remove (kindof) unused reloadWindow IPC
We now bundle the renderer code within the app. So a load-fail indicates
something really wrong, not something we can deal with upfront (the code wasn't
probably even working - e.g. it was assigning to a function parameter
mainWindow, not the actual global var behind it).
2024-03-19 19:18:05 +05:30
Manav Rathi
3a6c7b2dcd Remove unused sendNotification IPC 2024-03-19 19:18:05 +05:30
Manav Rathi
502469e97f Move some non-duplicated FS related functions to preload 2024-03-19 19:18:05 +05:30
Manav Rathi
c98762b448 Inline ML related functions 2024-03-19 19:18:05 +05:30
Manav Rathi
e00b8fd2f1 Remove unused IPC for getPlatform 2024-03-19 19:18:05 +05:30
Manav Rathi
eeaa5165ab Remove custom cache directory
From discussions, it seems that it was pre-emptively added but not specifically
requested by a customer. We can bring this back later if needed, or at least
offer better options to clean it, but for now I'm pruning the IPC surface to
reduce the amount of work needed for handling contextIsolation and sandboxing.
2024-03-19 19:18:04 +05:30
Manav Rathi
e4684b22df Move out the electron-builder config to separate file 2024-03-19 19:17:01 +05:30
Manav Rathi
d80fad6cf1 Remove unused vscode extension support
This doesn't belong in the repo even if were used
https://github.com/standard/vscode-standard
2024-03-19 19:17:01 +05:30
Manav Rathi
a8de049519 Update concurrently's major version
No breaking changes that impact us - https://github.com/open-cli-tools/concurrently/releases
2024-03-19 19:17:01 +05:30
Manav Rathi
e9fa525fe9 Remove unused electron-download
It was used for downloading symbols
2024-03-19 19:17:01 +05:30
Manav Rathi
bff58f7b78 Update eslint settings to match main project 2024-03-19 19:17:01 +05:30
Manav Rathi
a0f95b6080 Settle on a tsconfig for now
Electron also comes with its own type definitions, and from a (possibly dated)
blog post announcing this I got that we should not be overriding it with
@types/node: https://www.electronjs.org/pt/blog/typescript
2024-03-19 19:17:01 +05:30
Manav Rathi
c19370ec51 Outline an ideal tsconfig.json 2024-03-19 19:17:01 +05:30
Manav Rathi
341f0fa559 Upgrade TypeScript 2024-03-19 19:17:01 +05:30
Manav Rathi
e64d44639d Document the conceputal way forward
Alternatives considered:

- https://github.com/alex8088/electron-toolkit
- https://electron-vite.org/
- https://github.com/cawa-93/vite-electron-builder/
2024-03-19 19:17:01 +05:30
Manav Rathi
04b9966425 Quicker quick
Ref: https://webpack.electron.build/building
2024-03-19 19:17:01 +05:30
Manav Rathi
0e861d5c48 Add some notes
The helpful snippet about the purpose of install-app-deps taken from
https://webpack.electron.build/dependency-management
2024-03-19 19:17:01 +05:30
Manav Rathi
b7b33eba4a Switch to contextBridge - Part 1 2024-03-19 19:17:01 +05:30
Manav Rathi
1266648562 Merge docs 2024-03-19 19:17:01 +05:30
Manav Rathi
eb4f9402db Enable prose-wrap 2024-03-19 19:17:01 +05:30
Manav Rathi
983beb89dc Enable prose-wrap 2024-03-19 19:17:01 +05:30
Manav Rathi
f29d9e1583 Re-enable contextIsolation and sandboxing
Things will break, but let's try to fix them. In the current state, this is
preventing us from running `yarn dev` without reverting back to Electron 21.
2024-03-19 19:17:01 +05:30
Manav Rathi
d83f9d0210 Still need submodules
Until web needs them
2024-03-19 19:17:01 +05:30
Abhinav
6b749294ce fix sepa issue 2024-03-19 18:40:32 +05:30
Manav Rathi
65d25690e5 [workers] Add the cast-albums worker (#1151) 2024-03-19 15:35:11 +05:30
Manav Rathi
7c383023e4 [workers] Add the cast-albums worker 2024-03-19 15:33:09 +05:30
Manav Rathi
5092b74503 [workers] Add github-discord-notifier (#1150)
Start migrating workers to the monorepo. This PR brings in
github-discord-notifier.
2024-03-19 14:26:34 +05:30
Manav Rathi
ed547d5f2c Add empty vars section 2024-03-19 13:55:31 +05:30
Manav Rathi
1e50570936 wrangler publish is deprecated 2024-03-19 13:51:13 +05:30
Manav Rathi
2419b079af Add the github-discord-notifier code 2024-03-19 13:50:39 +05:30
Manav Rathi
cfd298a052 [workers] Start migrating workers to the monorepo 2024-03-19 13:14:25 +05:30
Manav Rathi
f0547d0a10 [meta] Omit unnecessary reruns of workflows when deploying (#1149)
When we merge main into a deploy/* branch (e.g.
https://github.com/ente-io/ente/pull/1147), all changes get pulled in
not just the one related to that deployment, and this causes almost all
of the path based workflows to run again unnecessarily. Exclude the
various "deploy/**" branches to stop these unnecessary workflows from
being triggered.
2024-03-19 13:10:21 +05:30
Manav Rathi
fa3f249a7a [meta] Omit unnecessary reruns of workflows when deploying
When we merge main into a deploy/* branch
(e.g. https://github.com/ente-io/ente/pull/1147), all changes get pulled in not
just the one related to that deployment, and this causes almost all of the path
based workflows to run again unnecessarily. Exclude the various "deploy/**"
branches to stop these unnecessary workflows from being triggered.
2024-03-19 12:59:04 +05:30
Neeraj Gupta
449284a6a1 [server] API to fetch ML embeddings for given fileIDs (#1144)
## Description
- Also started storing the embedding size and version in the table. This
will come handy while comparing overall size when different compression
and serialization formats are used..
- Also, it can be used to smartly auto-download the embeddings or inform
the user about approximate size when they decide to enable indexing or
search on a particular client.

## Tests

 Verified that embedding fetch and store is working fine.
 Verified that embeddings/diff API is working fine.
2024-03-19 12:23:24 +05:30
Neeraj Gupta
685e1b82c9 [server] Fix query for diff API 2024-03-19 12:09:39 +05:30
Manav Rathi
e7de4da64e [web] Update yarn.lock (#1145)
This seems to have been overwritten in a recent PR, perhaps because of a
different yarn version being used.
2024-03-19 11:43:02 +05:30
Neeraj Gupta
2b3494e61c [server] Return embedding version in API response 2024-03-19 11:25:00 +05:30
Manav Rathi
fc3aea7694 [web] Update yarn.lock 2024-03-19 11:24:42 +05:30
Neeraj Gupta
e8756a8cf7 [server] Remove unused code 2024-03-19 11:06:36 +05:30
Neeraj Gupta
3df49beb07 [server] Remove unused model name 2024-03-19 11:04:25 +05:30
Neeraj Gupta
05b0f1649f [server] store embedding objSize & version 2024-03-19 11:02:22 +05:30
Neeraj Gupta
7634b2c153 [server] DB migration scripts for emedding table changes 2024-03-19 10:56:25 +05:30
Manav Rathi
14ad67e86c [server] Fix the dependency on nginx (#1143)
Noticed during the recent deployment.
2024-03-19 10:35:42 +05:30
Manav Rathi
2f9a49e1ca [web] New translations (#1139)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-19 10:33:18 +05:30
Manav Rathi
303b12c709 Fix the dependency on nginx 2024-03-19 09:31:51 +05:30
Crowdin Bot
9e44f5cc20 New Crowdin translations by GitHub Action 2024-03-19 01:37:04 +00:00
Neeraj Gupta
f0236acf8f [server] Minor bug fixes in embedding/files API 2024-03-19 06:15:55 +05:30
Manav Rathi
100fa04de7 [infra] Status service (#1138)
- Add the service the serves status.ente.io
- Support nginx configuration reloads
2024-03-19 05:54:36 +05:30
Manav Rathi
f6e575885d Note the dashboard URL 2024-03-19 05:41:16 +05:30
Manav Rathi
9fe8d1fd53 Add recommended headers 2024-03-18 21:57:25 +05:30
Manav Rathi
19724367df Support nginx configuration reloads 2024-03-18 21:47:53 +05:30
Manav Rathi
ba896f2f3a Match file name convention 2024-03-18 21:36:01 +05:30
Manav Rathi
64c95d2397 Tweak formatting 2024-03-18 21:34:24 +05:30
Manav Rathi
2486a94d21 Add the service the serves status.ente.io 2024-03-18 21:22:15 +05:30
Manav Rathi
19799957c0 [web] Update translations for the non-photos apps (#1134) 2024-03-18 20:06:28 +05:30
Manav Rathi
4ff378cd06 [web] Update translations for the non-photos apps 2024-03-18 20:01:37 +05:30
Manav Rathi
4e8222afa1 [server] Deploy behind nginx (#1132)
Tweaks and fixes as we go towards a real deployment
2024-03-18 19:35:54 +05:30
Prateek Sunal
bc0716808f fix: remove the custom next-electron-server 2024-03-18 18:44:57 +05:30
Prateek Sunal
37a1f01b3f Merge remote-tracking branch 'origin/main' into beta 2024-03-18 18:42:09 +05:30
Prateek Sunal
99fbfea65f chore: bump flutter to v3.19.3 2024-03-18 18:41:34 +05:30
Prateek Sunal
42142514a1 fix: clear search text on exit 2024-03-18 18:15:30 +05:30
Prateek Sunal
adf38b9262 chore: lint fixes and ignores 2024-03-18 18:07:01 +05:30
Prateek Sunal
44f0bfd8b5 fix: remove deprecated code 2024-03-18 18:06:51 +05:30
Prateek Sunal
d9b56a95aa fix: export logs action 2024-03-18 18:03:48 +05:30
Prateek Sunal
a292114d68 feat: search ui change 2024-03-18 17:52:48 +05:30
Prateek Sunal
99c43cc3ef fix: don't show rate on desktop 2024-03-18 17:40:54 +05:30
Manav Rathi
fb0e2d2604 Don't restart museum on restarting nginx 2024-03-18 15:54:25 +05:30
Manav Rathi
c177efe79c Add documentation comments 2024-03-18 15:44:00 +05:30
Manav Rathi
27b13765d7 Fix the environment var 2024-03-18 15:23:23 +05:30
Manav Rathi
f494832bd7 Limit max connections at the nginx level 2024-03-18 15:21:47 +05:30
Neeraj Gupta
c564e50d59 [server] change method type to post 2024-03-18 14:38:11 +05:30
Manav Rathi
53cf5ffc45 Fix some paths in README 2024-03-18 14:35:42 +05:30
Manav Rathi
a341f81932 [museum] Support running behind Nginx (#1130)
- Move deployment related stuff into a separate folder
- Document the overall approach better
- Add an Nginx specific environment and service definition
- Remove the restart limiter
2024-03-18 13:56:01 +05:30
Manav Rathi
c43a0a7182 Shorten 2024-03-18 13:31:10 +05:30
Manav Rathi
2f38f23b77 Update install instructions 2024-03-18 13:30:07 +05:30
Neeraj Gupta
b9ec72bbb4 Merge branch 'main' into file_embedding 2024-03-18 13:12:14 +05:30
Manav Rathi
7ded8ad4fe Fix key name 2024-03-18 13:07:36 +05:30
Manav Rathi
30cf709eb2 Wrap 2024-03-18 12:39:16 +05:30
Manav Rathi
d8347c3976 Remove extra environment 2024-03-18 12:36:29 +05:30
Manav Rathi
5ee878c30e Require nginx before starting museum.nginx 2024-03-18 12:33:27 +05:30
Manav Rathi
f695c5e0d3 Remove extra newline 2024-03-18 11:06:54 +05:30
Manav Rathi
303b26b95f Tweak the nginx setup 2024-03-18 11:04:31 +05:30
Manav Rathi
9ba9b8a984 Add initial nginx conf 2024-03-18 10:39:39 +05:30
Manav Rathi
d893efe5d1 Remove the restart limiter
During recent DDoS attacks, these restart limits had to be manually
disabled. For now, disabling them in our reference copy too, will bring them
back if they are needed later.
2024-03-18 10:27:42 +05:30
Manav Rathi
a0599f7b33 Outline the nginx approach 2024-03-18 10:25:11 +05:30
Manav Rathi
9beedcf4e0 Move into separate folder 2024-03-18 10:16:55 +05:30
Neeraj Gupta
c7fd976ab7 [server] Update alert copy & frequency (#1129)
## Description

## Tests
2024-03-18 10:15:16 +05:30
Neeraj Gupta
47747f1d56 Update config 2024-03-18 10:12:02 +05:30
Neeraj Gupta
7de60f1ced [server] Reduce discord message frequency 2024-03-18 10:02:13 +05:30
Neeraj Gupta
4acc8395ba [server] Prefix discord msg with hostname 2024-03-18 09:59:35 +05:30
Manav Rathi
309c72d934 [web] New translations (#1128)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-18 09:17:53 +05:30
Manav Rathi
efe6a5a713 [infra] Import the base nginx service definition we use (#1127) 2024-03-18 09:17:29 +05:30
Shubh
e098511960 [auth] add rockstar games icon (#1125)
add Rockstar Games icon

Signed-off-by: Shubh <shubhisroking@proton.me>
2024-03-18 09:08:31 +05:30
Crowdin Bot
6bbd296c25 New Crowdin translations by GitHub Action 2024-03-18 03:38:20 +00:00
Manav Rathi
3dfd993430 [web] Add passkeys related translations (#1124)
Obtained these strings from
33faadf83e/apps/accounts/public/locales/en/translation.json (L632)

I didn't have a way of exhaustively ensuring that all strings are
covered, but I've tried to manually verify.

Once this is merged and translation files synced with Crowdin, I'll do
another PR to update the `local/**/translation.json` files within
apps/accounts.
2024-03-18 09:07:27 +05:30
Manav Rathi
022c11d7fa Import the base nginx service definition we use 2024-03-18 03:50:21 +05:30
Manav Rathi
9012a96a58 [web] Add passkeys related translations
Obtained these strings from 33faadf83e/apps/accounts/public/locales/en/translation.json (L632)

I didn't have a way of exhaustively ensuring that all strings are covered, but
I've tried to manually verify.

Once this is merged and translation files synced with Crowdin, I'll do another
PR to update the `local/**/translation.json` files within apps/accounts.
2024-03-17 11:55:57 +05:30
Manav Rathi
f85f220c1d Web Passkey Recovery (#1047)
## Description

* Adds passkey recovery feature parity from #1013

## Tests
2024-03-17 11:44:13 +05:30
Neeraj Gupta
ba6a8b6aa4 [docs] Update family-plans.md (#1123)
## Description

## Tests
2024-03-17 11:30:35 +05:30
Neeraj Gupta
12b9ac4db6 [server] Rate limit (#1121)
## Description

## Tests
2024-03-17 09:59:59 +05:30
Neeraj Gupta
e927064476 [server] Add endpoint to get embedding for givenFilesIds 2024-03-17 09:37:02 +05:30
Neeraj Gupta
b78b2fe715 Delete yarn.lock 2024-03-16 23:57:05 +05:30
Neeraj Gupta
36982c5332 [server] Add util to findMissingElements while comparing two arrays 2024-03-16 02:30:25 +05:30
Vishnu Mohandas
a5340764a8 [mobile][photos] Share to multiple people at once (#1116)
[mobile][photos] Share to multiple people at once
2024-03-16 00:07:12 +05:30
Vishnu Mohandas
bf3b257344 [mobile] Enhance ML (#1114)
## Description
- Increase the interaction timeout to 15s
- Make sure that models aren't downloaded over mobile data, and that it
resumes initialization when network conditions are favorable

## Tests
- [x] Tested manually
2024-03-16 00:05:29 +05:30
Prateek Sunal
426e1c772f chore: update deps 2024-03-15 21:45:20 +05:30
ashilkn
64814ef82f minor fixes 2024-03-15 21:07:38 +05:30
ashilkn
bb622bfcd0 fix typo in file name 2024-03-15 20:49:51 +05:30
ashilkn
07c41c4c92 extract strings 2024-03-15 20:22:15 +05:30
Prateek Sunal
e1b1d57714 fix: endpoint in network.dart 2024-03-15 20:00:48 +05:30
Prateek Sunal
2a84f7810d Merge remote-tracking branch 'origin/main' into beta 2024-03-15 19:58:35 +05:30
Vishnu Mohandas
11ccb37382 [server] Enhancements for self hosters (#1115)
- Disable the example.org domains in the default self-hosted
configuration (saner default)
- Add a new flag to support S3 path style URLs without disabling SSL
(needed for folks who want to run minio as their production S3, without
disabling SSL)

**Tested by**

Running a local cluster with the following `museum.yaml` and verifying
that the path style URLs are kicking in.

```
s3:
    use_path_style_urls: true
```
2024-03-15 17:35:10 +05:30
Manav Rathi
92ae1be40a Add a new flag to support S3 path style URLs without disabling SSL
The use case for this came up in Discord - someone is running a custom self
hosted instance where they're using MinIO as their "production S3", but it is
not local (so they don't want the clients to connect without SSL). So we need a
way to get MinIO to work, which needs path style URLs, without also disabling
the SSL.
2024-03-15 17:18:48 +05:30
Manav Rathi
87d39ae2dd Disable the example.org domains in the default self-hosted configuration
People won't be able to get emails, but they can still create accounts on that
domain in the default setup. So just comment it out as a saner default.
2024-03-15 17:09:40 +05:30
vishnukvmd
14c75333f3 Simplify states 2024-03-15 16:49:02 +05:30
vishnukvmd
7941d4bcb6 Skip model downloads over mobile data 2024-03-15 16:36:45 +05:30
ashilkn
ed2e3bae0d clean up 2024-03-15 16:21:04 +05:30
ashilkn
1e8f772280 feat(share-to-multi-contacts-at-once): multiple changes in one commit due mistakes when commiting
- Change 'Add viewer' buttons logic to work with the new UI.
- Long press on an email to verify.
- Filter suggestions list with the text entered in 'Enter email' text field.
2024-03-15 15:47:14 +05:30
Vishnu Mohandas
ebbdf8335b [auth] New translations (#1111)
New translations from
[Crowdin](https://crowdin.com/project/ente-authenticator-app)
2024-03-15 13:37:42 +05:30
Manav Rathi
d488924f78 [infra] Remind about needing to also enable node-exporter (#1113) 2024-03-15 13:06:56 +05:30
Manav Rathi
5841aefb75 [infra] Remind about needing to also enable node-exporter 2024-03-15 13:06:07 +05:30
Manav Rathi
1874053004 [docs] Mention submodules in the community external S3 guide (#1112)
Someone got confused about this missing instruction in Discord. Have
added the submodule step, and also called out that it might be a good
idea to also refer to the project READMEs in case this guide in the
future drifts out of sync.
2024-03-15 13:03:04 +05:30
Manav Rathi
bd75eba941 [docs] Mention submodules in the community external S3 guide 2024-03-15 13:00:15 +05:30
ashilkn
a4985116b8 feat(share-to-multi-contacts-at-once): change data structure of selected emails from List to Set to avoid duplicates 2024-03-15 12:53:32 +05:30
ashilkn
487be4a451 feat(share-to-multi-contacts-at-once): change state to selected state of an existing email if an already existing email in the list is added from 'add new email' 2024-03-15 12:44:54 +05:30
ashilkn
987250d4f3 feat(share-to-multi-contacts-at-once): add new email to list below with selected state 2024-03-15 12:34:30 +05:30
ashilkn
0b6d44eb99 feat(share-to-multi-contacts-at-once): make list of suggested users a state variable 2024-03-15 11:21:21 +05:30
Manav Rathi
53e4b490cc [web] New translations (#1110)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-15 09:01:33 +05:30
Crowdin Bot
2f86fbdd95 New Crowdin translations by GitHub Action 2024-03-15 02:03:25 +00:00
Crowdin Bot
123fc8a883 New Crowdin translations by GitHub Action 2024-03-15 01:37:14 +00:00
Manav Rathi
cd9c6f713a [infra] Add more details about services (#1109)
- Import the existing DesktopDistribute notes
- Define services
- Add prometheus and promtail definitions
2024-03-14 22:33:26 +05:30
Manav Rathi
12bdbcfbdc npx prettier --config ../docs/.prettierrc.json --write '**/*.md' 2024-03-14 22:33:00 +05:30
Manav Rathi
dc29ab496f Add prometheus and promtail definitions 2024-03-14 21:56:36 +05:30
Ashil
dc2474801c [photos][mobile]Update home_widget git dependency URL (#1098) 2024-03-14 21:23:53 +05:30
Manav Rathi
477e3fee80 Define services 2024-03-14 21:18:38 +05:30
Manav Rathi
b79f8347b6 Import the existing DesktopDistribute notes 2024-03-14 20:31:47 +05:30
Manav Rathi
74a2cd7fe4 [mobile] Update the README link to GitHub APK for photos (#1108) 2024-03-14 18:23:44 +05:30
Manav Rathi
7aed641189 Also update the links in the fastlane descriptions 2024-03-14 18:22:51 +05:30
Manav Rathi
ddeafe0749 [mobile] Update the link to GitHub APK for photos 2024-03-14 18:16:01 +05:30
Manav Rathi
0472cde0cb [infra] Import copycat db (#1107)
- Create infra directory
- Import the code for copycat-db
- Update its paths for the monorepo
- Fix up its GitHub workflow for the monorepo (untested yet)
2024-03-14 17:35:38 +05:30
Manav Rathi
7ddfeb93dd Fix up the workflow 2024-03-14 17:32:54 +05:30
Manav Rathi
aaffc740bc Update paths 2024-03-14 17:29:11 +05:30
Manav Rathi
3e38d56579 Import the code for copycat-db 2024-03-14 17:20:00 +05:30
Manav Rathi
6e9893e5c5 Create infra directory 2024-03-14 17:14:47 +05:30
Manav Rathi
678879e5fd [server] Move the server related gitattributes within that folder (#1106)
I mistakenly assumed that the gitattributes file can only be at the top
level. However, this doesn't seem to be the case - I noticed this in a
recent PR - https://github.com/ente-io/ente/pull/1104/

And it is indeed documented:

> When deciding what attributes are assigned to a path, Git ....
.gitattributes file in the same directory as the path in question. ..
>
> - https://git-scm.com/docs/gitattributes

Ref:
https://stackoverflow.com/questions/71784062/can-we-have-multiple-gitattributes-files-in-different-repo-subfolders
2024-03-14 16:48:08 +05:30
vishnukvmd
22685ae911 Increase interaction timeout to 15s 2024-03-14 16:35:38 +05:30
Manav Rathi
966cc697e7 [server] Move the server related gitattributes within that folder
I mistakenly assumed that the gitattributes file can only be at the top
level. However, this doesn't seem to be the case - I noticed this in a recent PR
- https://github.com/ente-io/ente/pull/1104/files.

And it is indeed documented:

> When deciding what attributes are assigned to a path, Git .... .gitattributes
> file in the same directory as the path in question. ..
>
> - https://git-scm.com/docs/gitattributes

Ref: https://stackoverflow.com/questions/71784062/can-we-have-multiple-gitattributes-files-in-different-repo-subfolders
2024-03-14 16:35:36 +05:30
Manav Rathi
3d23a3b21a [server] Improve the architecture diagram (#1105)
Add a dotted arrow between museum and the hot object storage to indicate
that clients talk directly to the primary S3 storage.

This has confused some users who were trying to setup self-hosting, them
not realizing that the minio buckets need to be accessible outside the
container.

The actual flow is - for both GET and PUT, museum conjures up pre-signed
URLs by talking to the S3 bucket, and vends these pre-signed URLs back
to the client. Thereafter though (unless routed via a Cloudflare worker,
which is not the case when self-hosting), the clients directly connect
to this presigned URL.

Maybe too much information to convey with a single dotted arrow, but at
least it'll give a hint that there is a direct connection there
somewhere.
2024-03-14 16:31:10 +05:30
Neeraj Gupta
ffae4ae99b [cli] Admin APIs for list-users, disable-2fa, & delete-user (#1104)
## Description
Also made it optional to pass the admin-user when there's only one
account is configured.

## Tests

Tested locally
2024-03-14 16:26:31 +05:30
github-actions[bot]
a010a90ed6 [mobile] New translations (#1092)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-app)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-03-14 16:24:13 +05:30
Manav Rathi
2905315e00 [server] Improve the architecture diagram
Add a dotted arrow between museum and the hot object storage to indicate that
clients talk directly to the primary S3 storage.

This has confused some users who were trying to setup self-hosting, them not
realizing that the minio buckets need to be accessible outside the container.

The actual flow is - for both GET and PUT, museum conjures up pre-signed URLs by
talking to the S3 bucket, and vends these pre-signed URLs back to the
client. Thereafter though (unless routed via a Cloudflare worker, which is not
the case when self-hosting), the clients directly connect to this presigned URL.

Maybe too much information to convey with a single dotted arrow, but at least
it'll give a hint that there is a direct connection there somewhere.
2024-03-14 16:23:53 +05:30
github-actions[bot]
b9a7d09265 [auth] New translations (#1093)
New translations from
[Crowdin](https://crowdin.com/project/ente-authenticator-app)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-03-14 16:23:51 +05:30
Neeraj Gupta
80498340b6 [cli] Mark docs/generated as generated for Github 2024-03-14 16:20:47 +05:30
ashilkn
96072a607c nit: fix typo 2024-03-14 16:20:08 +05:30
Neeraj Gupta
9c04c8fbe6 [cli] Generate docs 2024-03-14 16:18:37 +05:30
Neeraj Gupta
bc47368a01 [cli] Add API to delete-user 2024-03-14 16:18:08 +05:30
ashilkn
8bf17af6de feat(share-to-multi-contacts-at-once): make multi-select possible from list of existing contacts 2024-03-14 16:14:06 +05:30
Neeraj Gupta
6af62d8727 [cli] Add admin disable-2fa cmd 2024-03-14 16:13:11 +05:30
Neeraj Gupta
da3c6a78d4 [cli] Make it optional to pass adminUser when only one account is configured 2024-03-14 16:01:40 +05:30
Neeraj Gupta
324eeed1c5 [cli] Add admin list-user cmd 2024-03-14 15:53:26 +05:30
Manav Rathi
3ecc699962 [docs] Note boxes fix (#1103)
## Description
This fixes note boxes having incorrect titles, like this one:
<img width="719" alt="image"
src="https://github.com/ente-io/ente/assets/41323182/4072f774-f507-4161-98ff-86724c84c680">

## Tests
- [x] Tested fixes on a selfhosted instance
<img width="701" alt="image"
src="https://github.com/ente-io/ente/assets/41323182/e0338c2b-c0c6-42b0-82a5-cba068f192e1">
<img width="699" alt="image"
src="https://github.com/ente-io/ente/assets/41323182/0c839ec9-13fd-46cd-bbb7-7f0347b19a8e">
2024-03-14 15:50:46 +05:30
Prateek Sunal
46e2cb6012 chore: lint fix 2024-03-14 15:47:13 +05:30
green
91c5e54cdc Update index.md 2024-03-14 11:11:44 +01:00
Manav Rathi
cc7dc0f142 [web] Exit fullscreen if needed when pressing the info button (#1102)
Fixes: Info button is not working when videos are playing in full screen
mode.

**Tested by**

Wasn't working before, but it works now. Still doesn't work with the
keybinding,
have left a note about that in the code.
2024-03-14 15:41:34 +05:30
Manav Rathi
56b750c1ac [web] Exit fullscreen if needed when pressing the info button
Fixes: Info button is not working when videos are playing in full screen mode.

**Tested by**

Wasn't working before, but it works now. Still doesn't work with the keybinding,
have left a note about that in the code.
2024-03-14 15:39:03 +05:30
green
39e5415e0a Update index.md 2024-03-14 11:08:52 +01:00
Prateek Sunal
5634b50528 Merge remote-tracking branch 'origin/main' into beta 2024-03-14 15:35:28 +05:30
Manav Rathi
318e8643fb [web] Show select-all-for-day checkmark only when there is a selection (#1101)
For now, this at least makes it less obtrusive. Once I have cleaned up
the state handling around selection (to better integrate this with the
rest of the selection state so that there are no discrepancies), can
revisit the UI - e.g. show it only on hover, or reduce the size of the
checkbox / give it a rounded look etc to make it look even less
obstrusive.
2024-03-14 14:53:16 +05:30
Manav Rathi
f1e68e9eef Show select-all-for-day checkmark only when there is a selection 2024-03-14 14:42:27 +05:30
ashilkn
6b70d8556b Use MediaQuery.viewInsetsOf() instead of MediaQuery.of() to reduce rebuids 2024-03-14 11:52:13 +05:30
Manav Rathi
6f94cfb2ce [docs] Call out the gotcha of not connecting to the correct instance (#1100) 2024-03-14 11:37:48 +05:30
Manav Rathi
0e4ca2ad21 [docs] Call out the gotcha of not connecting to the correct instance 2024-03-14 11:37:27 +05:30
ashilkn
d4cf8c5f9a move super.initState to top 2024-03-14 11:25:38 +05:30
ashilkn
48a8bab862 dispose text field focus node 2024-03-14 11:24:50 +05:30
Manav Rathi
23aacd5810 [docs] Move migration guides, and otherwise enhance and rearrange (#1099)
For the migration guides in particular, I've retained the original files
also for now to avoid breaking links.
2024-03-14 11:14:46 +05:30
Manav Rathi
c71d06d405 Mention the self-hosting docs in the server README 2024-03-14 11:12:27 +05:30
Manav Rathi
b1da0c1b70 yarn pretty 2024-03-14 11:10:47 +05:30
Manav Rathi
cfe7b1baa0 Remove duplicate section 2024-03-14 11:09:26 +05:30
Manav Rathi
abc93872e9 Add header 2024-03-14 11:08:11 +05:30
Manav Rathi
7b850cec43 Remove incomplete notice 2024-03-14 11:06:16 +05:30
Manav Rathi
3ffe43e9bf Also add a FAQ entry 2024-03-14 11:05:40 +05:30
Manav Rathi
6287d40a18 Split 2024-03-14 11:01:36 +05:30
Manav Rathi
03c875a8b8 Rearrange 2024-03-14 10:54:42 +05:30
Manav Rathi
c18115ef52 Fix link 2024-03-14 10:48:25 +05:30
Manav Rathi
55e3a93cf6 Mention the word "export" in the sidebar item 2024-03-14 10:46:26 +05:30
Manav Rathi
306ee1ad1c Fix the next page link on the index page
...by reintroducing it in the sidebar listing.
2024-03-14 10:44:35 +05:30
Manav Rathi
60d216c6fa yarn pretty 2024-03-14 10:43:19 +05:30
Manav Rathi
b2d64d9b72 Add page headers 2024-03-14 10:41:52 +05:30
Manav Rathi
bb0f584e91 [docs][auth] Move the migration guides to the help docs
Keep the old files, adding redirection notices to them.
2024-03-14 10:38:39 +05:30
Manav Rathi
26ad4a0a70 [web] New translations (#1091)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-03-14 09:59:58 +05:30
Manav Rathi
fd04b59985 [meta] Document the tag format, and call out the need to keep tag == title (#1096)
Related:
https://github.com/ente-io/ente/discussions/1087#discussioncomment-8775807
2024-03-14 09:58:54 +05:30
Crowdin Bot
419f562aed New Crowdin translations by GitHub Action 2024-03-14 04:22:53 +00:00
Vishnu Mohandas
3cd7d68192 [meta] Reduce the frequency of the sync translations cron (#1095)
[meta] Reduce the frequency of the sync translations cron
2024-03-14 09:52:00 +05:30
Manav Rathi
7fabb3a03c [meta] Document the tag format, and call out the need to keep tag == title
Related: https://github.com/ente-io/ente/discussions/1087#discussioncomment-8775807
2024-03-14 09:50:08 +05:30
Manav Rathi
1abf7edb99 [meta] Reduce the frequency of the sync translations cron
Every day is too much noise - we really only need this

- When a string gets changed in the source translation, in which case this
  workflow gets triggered automatically anyway.

- Before we do a new release (this doesn't automatically happen, but the
  workflow can be triggered manually if needed).

For now, reduce the frequency of the daily job to pull new translations from
Crowdin: now it'll only happen on Tuesdays and Fridays (just an arbitrary
choice).
2024-03-14 09:32:30 +05:30
Manav Rathi
925133a297 [meta] Reintroduce .vscode in the mobile gitignores (#1094)
The intent had always been to have the individual project gitignores be
self contained. In my previous PR
(https://github.com/ente-io/ente/pull/516) I'd for some reason not
followed this: correcting my mistake now. .vscode is gitignored both at
the top level and at the individual project levels (as it was
originally).
2024-03-14 09:22:47 +05:30
Manav Rathi
3b10c7e93f [meta] Reintroduce .vscode in the mobile gitignores
The intent had always been to have the individual project gitignores be self
contained. In my previous PR (https://github.com/ente-io/ente/pull/516) I'd for
some reason not followed this: correcting my mistake now. .vscode is gitignored
both at the top level and at the individual project levels (as it was
originally).
2024-03-14 09:20:17 +05:30
Manav Rathi
f884aa6d71 [auth] Authy guide rewrite (#1088)
## Description
Authy migration guide rewrite to make things much clearer and easier to
follow.
## Tests
N/A
2024-03-14 09:15:35 +05:30
Manav Rathi
0c670d785b [docs] Authy migration guide (#1089)
## Description
Adds the Authy migration guide from auth/migration-guides into the new
help website.
## Tests
- [X] Tested on a selfhosted instance to ensure that all new content is
properly visible, see screenshot below
<img width="1440" alt="image"
src="https://github.com/ente-io/ente/assets/41323182/aeb59c9f-0e36-4d94-a5f8-1042081db87b">
2024-03-14 09:13:36 +05:30
green
0b96b1afe6 Use same style as wiki 2024-03-13 19:05:52 +01:00
green
40cea19634 Merge branch 'ente-io:main' into help-guide 2024-03-13 19:02:19 +01:00
Prateek Sunal
343eb34a7a chore: bump version 2024-03-13 23:32:03 +05:30
Vishnu Mohandas
ba5686a07a v0.8.71 (#1090) 2024-03-13 21:57:05 +05:30
vishnukvmd
1cacefa1fd v0.8.71 2024-03-13 21:56:48 +05:30
green
20a6b81b05 Update index.md
More formal language to make it more wiki-esque
2024-03-13 16:30:54 +01:00
green
4731f2c43b Update sidebar.ts 2024-03-13 16:22:25 +01:00
green
190357fe64 Rename docs/docs/auth/migration-guides/authy.md to docs/docs/auth/migration-guides/authy/index.md 2024-03-13 16:17:50 +01:00
green
d65daba103 Update sidebar.ts 2024-03-13 16:16:52 +01:00
green
38c36d203a Create authy.md 2024-03-13 16:11:33 +01:00
green
a4a1ee93f8 Update authy.md 2024-03-13 15:58:08 +01:00
green
f4acb98044 Update authy.md 2024-03-13 15:53:57 +01:00
green
4ccab22c3f Update authy.md 2024-03-13 15:46:53 +01:00
green
8d8591cf60 Update authy.md 2024-03-13 15:44:44 +01:00
Vishnu Mohandas
72719d2234 [server] Add admin API to change email address (#1086)
## Tests
- [x] Tested on a local instance to verify that the email is updated as
expected
2024-03-13 17:37:14 +05:30
vishnukvmd
77276d8d6c [server] Add admin API to change email address 2024-03-13 17:31:38 +05:30
Vishnu Mohandas
c6c7b0ab32 Ignore linter on the f-droid branch (#1083) 2024-03-13 14:58:01 +05:30
vishnukvmd
df316463ef Ignore linter on the f-droid branch 2024-03-13 14:57:19 +05:30
Manav Rathi
be9af355ce [web] Fix the upload tests (#1082)
The current approach wasn't working. Not sure what caused it to stop
working,
but anyway that was an hacky import, as evidenced by the ungainly
warning
webpack would print on `yarn dev`. So instead of taking the path, we
just take
the JSON contents directly, sidestepping all that.

**Tested by**

Rerunning the upload tests
2024-03-13 14:31:20 +05:30
Manav Rathi
2faef37f4b Fix the upload tests
The current approach wasn't working. Not sure what caused it to stop working,
but anyway that was an hacky import, as evidenced by the ungainly warning
webpack would print on `yarn dev`. So instead of taking the path, we just take
the JSON contents directly, sidestepping all that.

**Tested by**

Rerunning the upload tests
2024-03-13 14:25:07 +05:30
httpjamesm
d9b1081849 Merge branch 'main' into feature/web-passkey-recovery 2024-03-12 13:57:57 -04:00
httpjamesm
cfb7c61c63 fix: lock file 2024-03-12 13:57:20 -04:00
httpjamesm
609e4d1207 feat: open accounts portal in a new tab 2024-03-12 13:56:59 -04:00
httpjamesm
d4d2c68299 feat: use encryption key for more entropy in reset secret 2024-03-12 13:56:34 -04:00
httpjamesm
438387a4cb fix: remove organize imports dep 2024-03-11 13:55:44 -04:00
httpjamesm
60a8ca3e2e feat: link to recovery page 2024-03-11 13:54:22 -04:00
httpjamesm
d0a73d729d feat: passkey recover page 2024-03-11 13:53:49 -04:00
httpjamesm
267bd56285 feat: twoFactorType prop with default in recovery page 2024-03-11 13:52:46 -04:00
httpjamesm
44568dc142 feat: text recovery two factor button on passkey error 2024-03-11 13:48:05 -04:00
httpjamesm
83a17e4d11 feat: default to totp 2024-03-11 13:40:49 -04:00
httpjamesm
cbdb4907cf feat: two factor type 2024-03-11 13:30:11 -04:00
httpjamesm
27a1d420db feat: configure passkey recovery on passkeys click 2024-03-11 13:24:25 -04:00
httpjamesm
69048844d7 fix: add prettier-plugin-organize-imports 2024-03-11 13:10:27 -04:00
httpjamesm
048162ba1f fix: resp data 2024-03-11 13:09:27 -04:00
httpjamesm
2928cae79a feat: configurePasskeyRecovery in service 2024-03-11 13:04:53 -04:00
httpjamesm
1d4f92c39b feat: isPasskeyRecoveryEnabled in service 2024-03-11 13:03:15 -04:00
Prateek Sunal
d1ce545e5f chore: bump flutter in auth workflow 2024-03-10 12:24:50 +05:30
Prateek Sunal
174274ee41 chore: version bump 2024-03-10 12:24:34 +05:30
Prateek Sunal
9dad24313c fix: auth desktop workflow 2024-03-10 12:24:26 +05:30
Prateek Sunal
b007bec3c2 fix: download button in desktop 2024-03-10 00:13:33 +05:30
Prateek Sunal
9057ee92c6 chore: flutter version bump to latest stable 2024-03-10 00:07:20 +05:30
Prateek Sunal
09098c6d07 fix: update service logic 2024-03-10 00:07:04 +05:30
Prateek Sunal
d33bc6956c Merge branch 'beta' of https://github.com/ente-io/ente into beta 2024-03-07 21:11:08 +05:30
Prateek Sunal
666649d218 fix: recovery key text 2024-03-07 21:10:44 +05:30
Prateek Sunal
868190928d chore: lint fixes 2024-03-07 16:12:16 +05:30
Prateek Sunal
06104f2d3b fix: don't init window manager on mobile 2024-03-07 15:34:49 +05:30
Prateek Sunal
4e452d6b43 chore: lint fixes 2024-03-06 22:25:09 +05:30
Prateek Sunal
5fe5ac0935 Merge branch 'main' into beta 2024-03-06 22:23:32 +05:30
Prateek Sunal
47d7238f2b feat: revert removed features 2024-03-05 14:49:26 +05:30
Prateek Sunal
4b3ba41159 chore: lint fixes 2024-03-05 14:43:25 +05:30
Prateek Sunal
b86729050a feat: desktop (7124ed710acf33d895faa4730a04b87f9c5cac24) 2024-03-05 14:33:39 +05:30
1017 changed files with 20910 additions and 38206 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -2,15 +2,15 @@ name: "Sync Crowdin translations (auth)"
on:
push:
branches: [main]
paths:
# Run workflow when auth's intl_en.arb is changed
- "mobile/lib/l10n/arb/app_en.arb"
# Or the workflow itself is changed
- ".github/workflows/auth-crowdin.yml"
branches: [main]
schedule:
# See: [Note: Run every 24 hours]
- cron: "50 1 * * *"
# See: [Note: Run workflow on specific days of the week]
- cron: "50 1 * * 2,5"
# Also allow manually running the workflow
workflow_dispatch:
@@ -28,7 +28,7 @@ jobs:
base_path: "auth/"
config: "auth/crowdin.yml"
upload_sources: true
upload_translations: true
upload_translations: false
download_translations: true
localization_branch_name: crowdin-translations-auth
create_pull_request: true

View File

@@ -3,13 +3,13 @@ name: "Lint (auth)"
on:
# Run on every push to a branch other than main that changes auth/
push:
branches-ignore: [main]
branches-ignore: [main, "deploy/**"]
paths:
- "auth/**"
- ".github/workflows/auth-lint.yml"
env:
FLUTTER_VERSION: "3.16.9"
FLUTTER_VERSION: "3.19.3"
jobs:
lint:

View File

@@ -29,11 +29,11 @@ on:
- "auth-v*"
env:
FLUTTER_VERSION: "3.13.4"
FLUTTER_VERSION: "3.19.3"
jobs:
build-ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
defaults:
run:
@@ -72,6 +72,8 @@ jobs:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Build PlayStore AAB
# disable this step if release tag contains nightly or beta
if: startsWith(github.ref, 'refs/tags/auth-v') && !contains(github.ref, 'nightly') && !contains(github.ref, 'beta')
run: |
flutter build appbundle --release --flavor playstore --dart-define=app.flavor=playstore
env:
@@ -83,7 +85,7 @@ jobs:
- name: Install dependencies for desktop build
run: |
sudo apt-get update -y
sudo apt-get install -y libsecret-1-dev libsodium-dev libwebkit2gtk-4.0-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm libsqlite3-dev locate
sudo apt-get install -y libsecret-1-dev libsodium-dev libwebkit2gtk-4.0-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm libsqlite3-dev locate appindicator3-0.1 libappindicator3-dev libffi7
- name: Install appimagetool
run: |
@@ -92,8 +94,6 @@ jobs:
mv appimagetool /usr/local/bin/
- name: Build desktop app
# Temporarily disable desktop builds
if: false
run: |
flutter config --enable-linux-desktop
dart pub global activate flutter_distributor
@@ -118,6 +118,8 @@ jobs:
updateOnlyUnreleased: true
- name: Upload AAB to PlayStore
# disable this step if release tag contains nightly or beta
if: startsWith(github.ref, 'refs/tags/auth-v') && !contains(github.ref, 'nightly') && !contains(github.ref, 'beta')
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
@@ -149,8 +151,6 @@ jobs:
run: mkdir artifacts
- name: Build Windows installer
# Temporarily disable desktop builds
if: false
run: |
flutter config --enable-windows-desktop
dart pub global activate flutter_distributor
@@ -159,13 +159,9 @@ jobs:
mv dist/**/ente_auth-*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe
- name: Retain Windows EXE and DLLs
# Temporarily disable desktop builds
if: false
run: cp -r build/windows/x64/runner/Release ente-${{ github.ref_name }}-windows
- name: Code sign Windows installer and EXE
# Temporarily disable desktop builds
if: false
uses: dlemstra/code-sign-action@v1
with:
certificate: "${{ secrets.WINDOWS_CERTIFICATE }}"
@@ -175,9 +171,10 @@ jobs:
auth/ente-${{ github.ref_name }}-windows/auth.exe
- name: Zip Windows EXE and DLLs
# Temporarily disable desktop builds
if: false
run: tar.exe -a -c -f auth/artifacts/ente-${{ github.ref_name }}-windows.zip auth/ente-${{ github.ref_name }}-windows
run: tar.exe -a -c -f artifacts/ente-${{ github.ref_name }}-windows.zip ente-${{ github.ref_name }}-windows
- name: Generate checksums
run: sha256sum artifacts/ente-* > artifacts/sha256sum-windows
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
@@ -248,8 +245,6 @@ jobs:
run: mkdir artifacts
- name: Build macOS DMG
# Temporarily disable desktop builds
if: false
run: |
flutter config --enable-macos-desktop
dart pub global activate flutter_distributor
@@ -257,16 +252,12 @@ jobs:
mv dist/**/ente_auth-*-macos.dmg artifacts/ente-${{ github.ref_name }}.dmg
- name: Code sign DMG
# Temporarily disable desktop builds
if: false
run: |
CERT_NAME=$(security find-identity -v -p codesigning | grep "Developer ID Application" | awk -F'"' '{print $2}' | grep -m1 "")
codesign --force --timestamp --sign "$CERT_NAME" --options runtime artifacts/ente-${{ github.ref_name }}.dmg
codesign --verify --verbose=4 artifacts/ente-${{ github.ref_name }}.dmg
- name: Notarize and staple DMG
# Temporarily disable desktop builds
if: false
run: |
xcrun notarytool submit artifacts/ente-${{ github.ref_name }}.dmg \
--wait \
@@ -279,6 +270,9 @@ jobs:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Generate checksums
run: shasum -a 256 artifacts/ente-* > artifacts/sha256sum-macos
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:

View File

@@ -0,0 +1,24 @@
name: "Release (copycat-db)"
on:
workflow_dispatch: # Run manually
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & Push
with:
dockerfile: infra/copycat-db/Dockerfile
directory: infra/copycat-db
image: ente/copycat-db
registry: rg.fr-par.scw.cloud
enableBuildKit: true
buildArgs: GIT_COMMIT=${GITHUB_SHA}
tags: ${GITHUB_SHA}, latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -6,7 +6,7 @@ name: "Verify build (docs)"
on:
# Run on every push to a branch other than main that changes docs/
push:
branches-ignore: [main]
branches-ignore: [main, "deploy/**"]
paths:
- "docs/**"
- ".github/workflows/docs-verify-build.yml"

View File

@@ -2,15 +2,15 @@ name: "Sync Crowdin translations (mobile)"
on:
push:
branches: [main]
paths:
# Run workflow when mobiles's intl_en.arb is changed
- "mobile/lib/l10n/intl_en.arb"
# Or the workflow itself is changed
- ".github/workflows/mobile-crowdin.yml"
branches: [main]
schedule:
# See: [Note: Run every 24 hours]
- cron: "40 1 * * *"
# See: [Note: Run workflow on specific days of the week]
- cron: "40 1 * * 2,5"
# Also allow manually running the workflow
workflow_dispatch:
@@ -28,7 +28,7 @@ jobs:
base_path: "mobile/"
config: "mobile/crowdin.yml"
upload_sources: true
upload_translations: true
upload_translations: false
download_translations: true
localization_branch_name: crowdin-translations-mobile
create_pull_request: true

View File

@@ -3,7 +3,7 @@ name: "Lint (mobile)"
on:
# Run on every push to a branch other than main that changes mobile/
push:
branches-ignore: [main]
branches-ignore: [main, f-droid, "deploy/**"]
paths:
- "mobile/**"
- ".github/workflows/mobile-lint.yml"

View File

@@ -3,7 +3,7 @@ name: "Lint (server)"
on:
# Run on every push to a branch other than main that changes server/
push:
branches-ignore: [main]
branches-ignore: [main, "deploy/**"]
paths:
- "server/**"
- ".github/workflows/server-lint.yml"

40
.github/workflows/server-publish.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: "Publish (server)"
on:
# Run manually, providing it the commit.
#
# To obtain the commit from the currently deployed museum, do:
# curl -s https://api.ente.io/ping | jq -r '.id'
#
# See server/docs/publish.md for more details.
workflow_dispatch:
inputs:
commit:
description: "Commit to publish the image from"
type: string
required: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
with:
dockerfile: server/Dockerfile
directory: server
# Resultant package name will be ghcr.io/ente-io/server
image: server
registry: ghcr.io
enableBuildKit: true
multiPlatform: true
platform: linux/amd64,linux/arm64,linux/arm/v7
buildArgs: GIT_COMMIT=${{ inputs.commit }}
tags: ${{ inputs.commit }}, latest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -7,11 +7,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code
- name: Checkout code
uses: actions/checkout@v4
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & Push
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
with:
dockerfile: server/Dockerfile
directory: server

View File

@@ -2,15 +2,21 @@ name: "Sync Crowdin translations (web)"
on:
push:
branches: [main]
paths:
# Run workflow when web's en-US/translation.json is changed
- "web/apps/photos/public/locales/en-US/translation.json"
- "web/packages/next/locales/en-US/translation.json"
# Or the workflow itself is changed
- ".github/workflows/web-crowdin.yml"
branches: [main]
schedule:
# See: [Note: Run every 24 hours]
- cron: "20 1 * * *"
# [Note: Run workflow on specific days of the week]
#
# The last (5th) component of the cron syntax denotes the day of the
# week, with 0 == SUN and 6 == SAT. So, for example, to run on every TUE
# and FRI, this can be set to `2,5`.
#
# See also: [Note: Run workflow every 24 hours]
- cron: "20 1 * * 2,5"
# Also allow manually running the workflow
workflow_dispatch:
@@ -28,7 +34,7 @@ jobs:
base_path: "web/"
config: "web/crowdin.yml"
upload_sources: true
upload_translations: true
upload_translations: false
download_translations: true
localization_branch_name: crowdin-translations-web
create_pull_request: true

View File

@@ -24,7 +24,7 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install

View File

@@ -24,7 +24,7 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install

View File

@@ -24,7 +24,7 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install

View File

@@ -0,0 +1,43 @@
name: "Deploy (payments)"
on:
push:
# Run workflow on pushes to the deploy/payments
branches: [deploy/payments]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build payments
run: yarn build:payments
- name: Publish payments
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: deploy/payments
directory: web/apps/payments/dist
wranglerVersion: "3"

View File

@@ -24,7 +24,7 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install

48
.github/workflows/web-deploy-staff.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: "Deploy (staff)"
on:
# Run on every push to main that changes web/apps/staff/
push:
branches: [main]
paths:
- "web/apps/staff/**"
- ".github/workflows/web-deploy-staff.yml"
# Also allow manually running the workflow
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build staff
run: yarn build:staff
- name: Publish staff
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: deploy/staff
directory: web/apps/staff/dist
wranglerVersion: "3"

View File

@@ -3,7 +3,7 @@ name: "Lint (web)"
on:
# Run on every push to a branch other than main that changes web/
push:
branches-ignore: [main]
branches-ignore: [main, "deploy/**"]
paths:
- "web/**"
- ".github/workflows/web-lint.yml"

View File

@@ -2,7 +2,7 @@ name: "Nightly (web)"
on:
schedule:
# [Note: Run every 24 hours]
# [Note: Run workflow every 24 hours]
#
# Run every 24 hours - First field is minute, second is hour of the day
# This runs 23:15 UTC everyday - 1 and 15 are just arbitrary offset to
@@ -34,7 +34,7 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
@@ -78,6 +78,19 @@ jobs:
directory: web/apps/cast/out
wranglerVersion: "3"
- name: Build payments
run: yarn build:payments
- name: Publish payments
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: n-payments
directory: web/apps/payments/dist
wranglerVersion: "3"
- name: Build photos
run: yarn build:photos
env:

View File

@@ -12,6 +12,7 @@ on:
- "accounts"
- "auth"
- "cast"
- "payments"
- "photos"
jobs:
@@ -33,7 +34,7 @@ jobs:
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install

View File

@@ -59,7 +59,10 @@ See [docs/](docs/README.md) for how to edit these documents.
## Code contributions
If you'd like to contribute code, it is best to start small.
Code is a small aspect of community, and the ways mentioned above are more
important in helping us. But if you'd _really_ like to contribute code, it is
best to start small. Consider some well-scoped changes, say like adding more
[custom icons to auth](auth/docs/adding-icons.md).
Each of the individual product/platform specific directories in this repository
have instructions on setting up a dev environment and making changes. The issues

View File

@@ -70,7 +70,7 @@ existing users will be grandfathered in.
[<img height="42" src=".github/assets/app-store-badge.svg">](https://apps.apple.com/app/id6444121398)
[<img height="42" src=".github/assets/play-store-badge.png">](https://play.google.com/store/apps/details?id=io.ente.auth)
[<img height="42" src=".github/assets/f-droid-badge.png">](https://f-droid.org/packages/io.ente.auth/)
[<img height="42" src=".github/assets/github-badge.png">](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v2)
[<img height="42" src=".github/assets/desktop-badge.png">](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v2)
[<img height="42" src=".github/assets/web-badge.svg">](https://auth.ente.io)
</div>

9
auth/.gitignore vendored
View File

@@ -9,12 +9,20 @@
.history
.svn/
# Editors
.vscode/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
@@ -32,3 +40,4 @@ lib/generated_plugin_registrant.dart
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
android/key.properties
dist/

View File

@@ -1,11 +1,11 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.
version:
revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
channel: unknown
revision: "ba393198430278b6595976de84fe170f553cc728"
channel: "[user-branch]"
project_type: app
@@ -13,17 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: android
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: ios
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: linux
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: macos
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: web
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: windows
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
# User provided section

View File

@@ -31,14 +31,16 @@ You can alternatively install the build from PlayStore or F-Droid.
<img height="59" src="../.github/assets/app-store-badge.svg">
</a>
### Desktop
You can [**download**](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v2)
a native desktop app from this repository's GitHub releases. The desktop app
works on Windows, Linux and macOS.
### Web
You can view your 2FA codes at [auth.ente.io](https://auth.ente.io). For adding
or managing your secrets, please use our mobile app.
### Desktop
A native desktop app is coming soon!
or managing your secrets, please use our mobile or desktop app.
## 🧑‍💻 Build from source

View File

@@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
compileSdkVersion 33
compileSdkVersion 34
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@@ -46,7 +46,7 @@ android {
defaultConfig {
applicationId "io.ente.auth"
minSdkVersion 20
minSdkVersion 21
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
@@ -56,11 +56,11 @@ android {
signingConfigs {
release {
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : System.getenv("SIGNING_KEY_PATH") ? file(System.getenv("SIGNING_KEY_PATH")) : null
keyAlias keystoreProperties['keyAlias'] ? keystoreProperties['keyAlias'] : System.getenv("SIGNING_KEY_ALIAS")
keyPassword keystoreProperties['keyPassword'] ? keystoreProperties['keyPassword'] : System.getenv("SIGNING_KEY_PASSWORD")
storePassword keystoreProperties['storePassword'] ? keystoreProperties['storePassword'] : System.getenv("SIGNING_STORE_PASSWORD")
}
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : System.getenv("SIGNING_KEY_PATH") ? file(System.getenv("SIGNING_KEY_PATH")) : null
keyAlias keystoreProperties['keyAlias'] ? keystoreProperties['keyAlias'] : System.getenv("SIGNING_KEY_ALIAS")
keyPassword keystoreProperties['keyPassword'] ? keystoreProperties['keyPassword'] : System.getenv("SIGNING_KEY_PASSWORD")
storePassword keystoreProperties['storePassword'] ? keystoreProperties['storePassword'] : System.getenv("SIGNING_STORE_PASSWORD")
}
}
flavorDimensions "default"
@@ -109,6 +109,7 @@ dependencies {
implementation 'io.sentry:sentry-android:2.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.guava:guava:28.2-android'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'

View File

@@ -0,0 +1,40 @@
Ente Auth helps you generate and store 2 step verification (2FA)
tokens on your mobile devices.
FEATURES
- Secure Backups
Auth provides end-to-end encrypted cloud backups so that you don't have to worry
about losing your tokens. We use the same protocols ente Photos uses to encrypt
and preserve your data.
- Multi Device Synchronization
Auth will automatically sync the 2FA tokens you add to your account, across all
your devices. Every new device you sign into will have access to these tokens.
- Web access
You can access your 2FA code from any web browser by visiting https://auth.ente.io .
- Offline Mode
Auth generates 2FA tokens offline, so your network connectivity will not get in
the way of your workflow.
- Import and Export Tokens
You can add tokens to Auth by one of the following methods:
1. Scanning a QR code
2. Manually entering (copy-pasting) a 2FA secret
3. Bulk importing from a file that contains a list of codes in the following format:
otpauth://totp/provider.com:you@email.com?secret=YOUR_SECRET
The codes maybe separated by new lines or commas.
You can also export the codes you have added to Auth, to an **unencrypted** text
file, that adheres to the above format.
SUPPORT
If you need help, please reach out to support@ente.io, and a human will get in touch with you.
If you have feature requests, please create an issue @ https://github.com/ente-io/ente

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -0,0 +1 @@
Auth is a FOSS authenticator app that provides end-to-end encrypted backups for your 2FA secrets.

View File

@@ -0,0 +1 @@
Ente Auth

View File

@@ -36,7 +36,9 @@
},
{
"title": "BorgBase",
"altNames": ["borg"],
"altNames": [
"borg"
],
"slug": "BorgBase"
},
{
@@ -46,11 +48,17 @@
{
"title": "Bybit"
},
{
"title": "CERN"
},
{
"title": "Channel Island Hosting",
"slug": "cih",
"hex": "D14633"
},
{
"title": "ConfigCat"
},
{
"title": "Cloudflare"
},
@@ -62,6 +70,13 @@
{
"title": "Crowdpear"
},
{
"title": "DCS",
"altNames": [
"Digital Combat Simulator"
],
"slug": "dcs"
},
{
"title": "DEGIRO"
},
@@ -107,9 +122,14 @@
},
{
"title": "Gosuslugi",
"altNames": ["Госуслуги"],
"altNames": [
"Госуслуги"
],
"slug": "Gosuslugi"
},
{
"title": "Habbo"
},
{
"title": "Healthchecks.io",
"slug": "healthchecks"
@@ -172,13 +192,24 @@
},
{
"title": "Mastodon",
"altNames": ["mstdn", "fediscience", "mathstodon", "fosstodon"],
"altNames": [
"mstdn",
"fediscience",
"mathstodon",
"fosstodon"
],
"slug": "mastodon",
"hex": "6364FF"
},
{
"title": "Mercado Livre",
"slug": "mercado_livre"
},
{
"title": "Murena",
"altNames": ["eCloud"],
"altNames": [
"eCloud"
],
"slug": "ecloud"
},
{
@@ -267,11 +298,18 @@
"title": "Revolt",
"hex": "858585"
},
{
"title": "Rockstar Games",
"slug": "rockstar_games"
},
{
"title": "Rust Language Forum",
"slug": "rust_language_forum",
"hex": "000000"
},
{
"title": "Sendgrid"
},
{
"title": "service-bw"
},
@@ -356,15 +394,24 @@
{
"title": "Wise"
},
{
"title": "WYZE",
"slug": "wyze"
},
{
"title": "X",
"altNames": ["twitter"],
"altNames": [
"twitter"
],
"slug": "x"
},
{
"title": "Yandex",
"altNames": ["Ya", "Яндекс"],
"altNames": [
"Ya",
"Яндекс"
],
"slug": "Yandex"
}
]
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 283.465 283.465" enable-background="new 0 0 283.465 283.465" xml:space="preserve">
<rect x="0.752" y="-0.337" fill="#FFFFFF" width="283.465" height="283.465"/>
<path fill="#0033A0" d="M210.282,120.915c0.429,24.998-11.023,41.967-14.629,47.856c-3.143,5.13-10.654,15.024-25.11,30.374
c-18.235,19.365-75.231,79.947-79.029,83.983h154.558l-35.636-162.227L210.282,120.915z M224.498,203.72l1.277,5.803
c-15.302,16.528-38.73,28.912-66,28.912c-5.841,0-11.941-0.565-18.719-2.005c1.375-1.463,2.693-2.867,3.937-4.188
c4.352,0.773,9.361,1.284,14.506,1.286C186.023,233.541,209.198,221.605,224.498,203.72z M0.752-0.337v283.465h84.595l83.686-88.992
l-0.117-0.107c-13.455,9.491-30.532,14.646-48.943,14.646c-34.121,0-64.191-20.244-77.232-45.437l-0.132,0.088l17.755,59.9h-4.806
c0,0-8.809-30.352-16.33-56.812c-5.692-20.026-9.198-34.861-9.154-48.029c0.156-45.284,35.77-86.809,83.128-89.874
c1.3-0.086,5.328-0.506,11.328-0.511c36.48-0.022,148.884,0.84,159.687,0.923v-29.26H0.752z M100.261,210.453
c6.786,5.88,17.542,13.273,30.838,18.05c-1.113,1.185-2.321,2.469-3.603,3.833c-13.279-5.257-26.271-13.409-36.369-24.392
C93.969,208.901,97.099,209.768,100.261,210.453z M145.883,32.427c13.977,3.923,27.086,11.109,37.504,20.825
c-3.006-0.803-6.071-1.451-9.188-1.939c-14.647-11.578-33.714-18.482-53.64-18.482c-47.069,0-85.592,38.386-85.592,85.565
c0,47.18,38.382,85.564,85.565,85.564c47.179,0,85.565-38.384,85.565-85.564c0-18.252-6.876-36.487-16.318-49.367
c2.255,0.678,5.004,1.841,8.162,3.708c6.393,9.69,12.32,25.515,17.398,49.787c5.33,25.462,32.732,147.426,35.694,160.605h33.182
V33.152l-138.333-0.85C145.883,32.303,145.883,32.311,145.883,32.427z M50.595,116.383c0-11.441,8.652-19.051,20.412-19.051
c4.577,0,9.814,1.409,12.738,2.664c-0.611,1.353-1.113,3.142-1.326,4.258l-0.319,0.106c-2.261-2.503-5.898-4.672-11.279-4.672
c-6.83,0-14.689,5.528-14.689,16.557c0,10.737,8.009,16.442,15.169,16.442c6.434,0,9.513-3,12.278-5.337l0.212,0.213l-0.783,4.172
c-1.268,0.96-5.664,3.695-12.279,3.695C58.754,135.429,50.595,127.885,50.595,116.383z M78.765,187.656
c-6.344-12.899-9.219-25.995-9.6-38.519c1.612,0,3.481,0.067,5.093,0.067c0.556,11.987,3.274,26.892,12.648,43.087
C83.521,191.047,80.974,189.405,78.765,187.656z M112.787,134.755c0,0.001,0,0.001,0,0.001c-1.911-0.098-4.565-0.176-7.084-0.221
c-1.451-0.024-2.861-0.041-3.973-0.044c-0.158,0-0.319,0-0.47,0c-3.247,0-8.227,0.105-11.475,0.266
c0.214-4.631,0.429-9.26,0.429-13.836v-9.15c0-4.578-0.215-9.206-0.429-13.728c3.193,0.16,8.121,0.265,11.313,0.265
c3.193,0,9.149-0.141,10.991-0.265c-0.078,0.498-0.127,1.089-0.127,1.815c0,0.725,0.071,1.473,0.127,1.836
c-3.505-0.263-9.766-0.692-16.682-0.692c-0.056,2.287-0.162,11.991-0.162,13.324c6.278,0,10.301-0.269,13.441-0.532
c-0.105,0.532-0.16,1.486-0.16,2.017c0,0.532,0.054,1.32,0.16,1.853c-3.671-0.374-11.887-0.48-13.441-0.48
c-0.095,1.779-0.012,13.294,0.053,14.266c3.889-0.057,13.857-0.359,17.489-0.693c-0.057,0.403-0.125,1.233-0.125,2.042
C112.661,133.608,112.708,134.198,112.787,134.755z M144.039,134.58c-0.485,0-2.321,0.017-3.334,0.177
c-2.103-3.205-8.839-13.302-13.419-18.015c-0.137,0-2.708,0.003-2.708,0.003v4.23c0,4.575,0.212,9.205,0.426,13.781
c-0.906-0.161-2.542-0.177-2.877-0.177c-0.335,0-1.971,0.017-2.878,0.177c0.214-4.577,0.428-9.206,0.428-13.781v-9.152
c0-4.577-0.213-9.207-0.428-13.782c2.024,0.16,4.584,0.265,6.606,0.265c2.021,0,4.043-0.265,6.064-0.265
c6.013,0,11.523,1.776,11.523,8.472c0,7.084-7.06,9.632-11.104,10.163c2.606,3.246,11.946,14.619,15.032,18.08
C146.309,134.596,144.525,134.58,144.039,134.58z M184.319,135.253l-1.742-0.017c-2.13-2.888-24.461-26.18-26.395-28.237
c-0.053,1.967-0.055,6.062-0.055,10.043c0,5.287,0.4,13.354,0.634,17.714c-0.54-0.098-1.338-0.195-2.268-0.195
c-0.939,0-1.709,0.086-2.331,0.195c0.436-5.625,0.558-14.755,0.558-23.337c0-6.704-0.099-10.38-0.178-13.762l1.744,0.015
c2.256,2.45,24.457,25.428,26.392,27.487c0.053-1.967,0.057-5.441,0.057-9.424c0-5.285-0.402-13.354-0.636-17.711
c0.542,0.094,1.338,0.192,2.269,0.192c0.942,0,1.71-0.084,2.332-0.192c-0.438,5.624-0.56,14.753-0.56,23.336
C184.14,128.063,184.239,131.868,184.319,135.253z M230.093,88.11c9.889,12.128,17.896,31.314,19.065,47.379h0.156l8.24-85.104
l4.646-0.003c0,0-5.271,55.013-8.341,82.351c-3.844,34.241-8.729,48.448-18.071,63.403l-1.43-6.508
c7.28-12.787,9.357-23.946,10.306-29.823c2.956-18.304-1.273-43.291-14.025-62.789c-14.291-21.849-39.84-37.924-71.2-37.924
c-25.762,0-48.143,11.327-63.766,28.993l-3.789-3.003c16.539-18.764,40.576-30.737,67.558-30.737
C187.735,54.346,212.924,67.058,230.093,88.11z M138.305,107.241c0-5.29-4.629-6.973-8.248-6.973c-2.448,0-4.043,0.161-5.162,0.268
c-0.159,3.885-0.318,7.457-0.318,11.287v2.926c0.529,0.071,3.021,0.059,3.566,0.049
C132.537,114.707,138.305,113.312,138.305,107.241z"/>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;">
<g transform="matrix(1.59257,0,0,1.59257,0,9.06171)">
<path d="M0.87,0.08L3.17,0.08C4.2,0.08 5.13,0.51 5.13,1.67C5.13,2.92 3.91,3.6 2.78,3.6L0.06,3.6C0.06,3.6 0.87,0.09 0.87,0.08ZM2.85,2.82C3.44,2.82 4.14,2.39 4.14,1.74C4.14,1.19 3.7,0.85 3.17,0.85L1.71,0.85L1.26,2.81L2.85,2.81L2.85,2.82Z" style="fill:rgb(245,158,15);fill-rule:nonzero;stroke:rgb(245,158,15);stroke-width:0.09px;"/>
<path d="M11.95,1.33C11.87,1.31 11.65,1.26 11.65,1.14C11.65,0.81 12.52,0.81 12.74,0.81C13.25,0.81 13.96,0.91 14.4,1.17L15,0.59C14.39,0.18 13.59,0.04 12.86,0.04C12.07,0.04 10.65,0.18 10.65,1.24C10.65,2.45 13.65,1.96 13.65,2.52C13.65,2.86 12.89,2.88 12.66,2.88C11.9,2.88 11.39,2.74 10.77,2.29C10.57,2.48 10.36,2.67 10.16,2.86C10.95,3.44 11.7,3.64 12.67,3.64C13.4,3.64 14.68,3.36 14.68,2.42C14.68,1.34 12.67,1.5 11.97,1.32L11.95,1.32L11.95,1.33Z" style="fill:rgb(245,158,15);fill-rule:nonzero;stroke:rgb(245,158,15);stroke-width:0.09px;"/>
<path d="M9.18,2.35L9.16,2.35C9.07,2.43 8.41,2.95 7.67,2.87C7.14,2.81 6.41,2.44 6.41,1.95C6.41,1.15 7.26,0.83 7.94,0.83C8.39,0.83 8.82,0.93 9.17,1.18C9.48,1.07 9.8,0.97 10.11,0.86C9.59,0.3 8.82,0.07 8.06,0.07C6.92,0.07 5.43,0.73 5.43,2.06C5.43,3.22 6.65,3.63 7.61,3.63C8.41,3.63 9.18,3.4 9.78,2.88C9.78,2.88 9.18,2.38 9.17,2.37L9.16,2.37L9.18,2.35Z" style="fill:rgb(245,158,15);fill-rule:nonzero;stroke:rgb(245,158,15);stroke-width:0.09px;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="6.525 7.459 339.266 319.582"><path fill="orange" d="M71.598 11.25H280.72c33.844 0 61.282 25.782 61.282 57.586v196.512c0 31.804-27.437 57.586-61.282 57.586H71.598c-33.845 0-61.28-25.782-61.28-57.586V68.836c0-31.804 27.435-57.586 61.28-57.586z"/><path d="M280.719 326.725H71.598c-35.881 0-65.072-27.533-65.072-61.377V68.836c0-33.844 29.19-61.377 65.072-61.377H280.72c35.88 0 65.072 27.533 65.072 61.377v196.512c0 33.844-29.192 61.377-65.073 61.377zM71.598 15.042c-31.7 0-57.49 24.131-57.49 53.794v196.512c0 29.662 25.79 53.794 57.49 53.794H280.72c31.7 0 57.49-24.132 57.49-53.794V68.836c0-29.662-25.79-53.794-57.49-53.794H71.598z"/><path d="M127.423 64.013l62.975.149c13.161-.099 22.989 2.002 29.48 6.303 7.928 5.272 11.89 14.343 11.89 27.213 0 21.19-9.828 33.195-29.482 36.012v.297c8.667 2.159 13.048 9.335 13.146 21.528 0 6.245-.233 14.245-.7 24 0 6.542 1.384 12.202 4.156 16.98H184.38c-1.611-1.747-2.416-5.305-2.416-10.677.66-8.98.99-16.347.99-22.098 0-11.617-5.582-17.425-16.746-17.425h-22.329l-9.738 46.987h-33.613l26.895-129.269zm53.236 26.941h-24.744l-6.453 31.192h26.775c14.967 0 22.497-5.906 22.595-17.721.001-8.98-6.058-13.47-18.173-13.47z"/><path d="M223.456 196.346l24.915-43.18 6.717 43.478h42.506l-38.349 27.534 6.14 43.18-33.204-26.05-44.633 27.089 20.878-45.973-24.333-26.2 39.363.122zm113.568 113.887c1.38 0 2.726.362 4.04 1.086 1.315.723 2.339 1.76 3.07 3.108.735 1.348 1.101 2.753 1.101 4.216 0 1.449-.36 2.841-1.084 4.177a7.735 7.735 0 01-3.039 3.114c-1.302.74-2.665 1.108-4.09 1.108-1.421 0-2.784-.37-4.089-1.108a7.762 7.762 0 01-3.044-3.114c-.725-1.336-1.089-2.73-1.089-4.177 0-1.463.369-2.868 1.106-4.216.738-1.348 1.763-2.384 3.077-3.108 1.316-.725 2.662-1.086 4.04-1.086zm0 1.391c-1.154 0-2.278.303-3.37.909a6.451 6.451 0 00-2.566 2.594c-.617 1.126-.926 2.297-.926 3.514 0 1.211.304 2.372.91 3.482a6.542 6.542 0 002.542 2.596c1.089.619 2.224.93 3.409.93 1.183 0 2.32-.311 3.41-.93a6.498 6.498 0 002.536-2.596c.603-1.11.904-2.27.904-3.482 0-1.218-.308-2.388-.92-3.514a6.39 6.39 0 00-2.565-2.594c-1.094-.606-2.216-.909-3.364-.909zm-3.604 11.664v-9.045h3.038c1.039 0 1.79.083 2.254.25.466.167.835.459 1.11.875.277.416.415.857.415 1.325 0 .661-.23 1.237-.692 1.726-.46.49-1.072.764-1.835.824.312.135.563.294.75.48.358.356.792.954 1.308 1.792l1.078 1.772h-1.742l-.783-1.426c-.617-1.12-1.115-1.823-1.492-2.105-.262-.209-.643-.313-1.145-.313h-.838v3.844h-1.426zm1.426-5.092h1.732c.829 0 1.393-.126 1.694-.38.3-.25.451-.586.451-1.002a1.24 1.24 0 00-.218-.718 1.302 1.302 0 00-.604-.473c-.258-.103-.734-.157-1.431-.157h-1.624v2.73z"/><path fill="#FFF" d="M252.503 221.088l25.47-18.142h-28.177l-4.881-31.464-17.882 31.168h-28.467l17.302 18.587-14.305 31.193 31.052-18.735 24.48 19.18-4.592-31.787z"/></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -0,0 +1 @@
<svg fill="#1DF0BB" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Wyze</title><path d="M5.475 13.171 7.3 9.469h.974L5.779 14.53h-.608l-1.034-2.082-1.034 2.082h-.609L0 9.469h.973l1.826 3.673.851-1.706-.973-1.967h.973l1.825 3.702Zm8.457-3.702-2.251 3.442v1.591h-.882v-1.591L8.517 9.469h1.034l1.673 2.545 1.673-2.545h1.035Zm5.444 4.194H24v.867h-4.624v-.867Zm0-4.194H24v.868h-4.624v-.868Zm0 2.083H24v.867h-4.624v-.867Zm-.273-2.083-3.438 4.223h3.133v.838H13.84l3.407-4.222h-3.042v-.839h4.898Z"/></svg>

After

Width:  |  Height:  |  Size: 523 B

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,25 @@
output: dist/
releases:
- name: dev
jobs:
- name: release-dev-linux-zip
package:
platform: linux
target: zip
- name: release-dev-linux-deb
package:
platform: linux
target: deb
- name: release-dev-linux-appimage
package:
platform: linux
target: appimage
- name: release-dev-windows-exe
package:
platform: windows
target: exe
- name: release-dev-macos-dmg
package:
platform: macos
target: dmg

View File

@@ -1,7 +1,14 @@
# Releases
Create a PR to bump up the version in `pubspec.yaml`. Once that is merged, tag
main, and push the tag.
Create a PR to bump up the version in `pubspec.yaml`.
> [!NOTE]
>
> Use [semver](https://semver.org/) for the tags, with `auth-` as a prefix.
> Multiple beta releases for the same upcoming version can be done by adding
> build metadata at the end, e.g. `auth-v1.2.3-beta+3`.
Once that is merged, tag main, and push the tag.
```sh
git tag auth-v1.2.3
@@ -16,6 +23,11 @@ This'll trigger a GitHub workflow that:
* Creates a new release in the internal track on Play Store.
Once the workflow completes, go to the draft GitHub release that was created.
> [!NOTE]
>
> Keep the title of the release same as the tag.
Set "Previous tag" to the last release of auth and press "Generate release
notes". The generated release note will contain all PRs and new contributors
from all the releases in the monorepo, so you'll need to filter them to keep

View File

@@ -37,4 +37,4 @@ file, that adheres to the above format.
SUPPORT
If you need help, please reach out to support@ente.io, and a human will get in touch with you.
If you have feature requests, please create an issue @ https://github.com/ente-io/auth
If you have feature requests, please create an issue @ https://github.com/ente-io/ente

View File

@@ -1 +1 @@
ente Authenticator
Ente Authenticator

View File

@@ -1,6 +1,6 @@
flutter_icons:
android: "launcher_icon"
image_path: "assets/icon-light.png"
adaptive_icon_foreground: "assets/icon-light-adaptive-fg.png"
adaptive_icon_background: "#ffffff"
flutter_icons:
android: "launcher_icon"
image_path: "assets/generation-icons/icon-light.png"
adaptive_icon_foreground: "assets/generation-icons/icon-light-adaptive-fg.png"
adaptive_icon_background: "#ffffff"

View File

@@ -1,7 +1,9 @@
PODS:
- connectivity (0.0.1):
- app_links (0.0.1):
- Flutter
- Reachability
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.4):
@@ -45,28 +47,25 @@ PODS:
- Flutter (1.0.0)
- flutter_email_sender (0.0.1):
- Flutter
- flutter_inappwebview (0.0.1):
- flutter_inappwebview_ios (0.0.1):
- Flutter
- flutter_inappwebview/Core (= 0.0.1)
- flutter_inappwebview_ios/Core (= 0.0.1)
- OrderedSet (~> 5.0)
- flutter_inappwebview/Core (0.0.1):
- flutter_inappwebview_ios/Core (0.0.1):
- Flutter
- OrderedSet (~> 5.0)
- flutter_local_authentication (1.2.0):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_native_splash (0.0.1):
- Flutter
- flutter_secure_storage (6.0.0):
- Flutter
- flutter_sodium (0.0.1):
- Flutter
- fluttertoast (0.0.2):
- Flutter
- Toast
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- local_auth_ios (0.0.1):
- local_auth_darwin (0.0.1):
- Flutter
- move_to_background (0.0.1):
- Flutter
@@ -82,47 +81,63 @@ PODS:
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
- Reachability (3.2)
- SDWebImage (5.17.0):
- SDWebImage/Core (= 5.17.0)
- SDWebImage/Core (5.17.0)
- Sentry/HybridSDK (8.9.1):
- SentryPrivate (= 8.9.1)
- ReachabilitySwift (5.2.1)
- SDWebImage (5.19.0):
- SDWebImage/Core (= 5.19.0)
- SDWebImage/Core (5.19.0)
- Sentry/HybridSDK (8.21.0):
- SentryPrivate (= 8.21.0)
- sentry_flutter (0.0.1):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.9.1)
- SentryPrivate (8.9.1)
- Sentry/HybridSDK (= 8.21.0)
- SentryPrivate (8.21.0)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sodium_libs (2.2.1):
- Flutter
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- SwiftyGif (5.4.4)
- Toast (4.0.0)
- uni_links (0.0.1):
- FlutterMacOS
- sqlite3 (3.45.1):
- sqlite3/common (= 3.45.1)
- sqlite3/common (3.45.1)
- sqlite3/fts5 (3.45.1):
- sqlite3/common
- sqlite3/perf-threadsafe (3.45.1):
- sqlite3/common
- sqlite3/rtree (3.45.1):
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- sqlite3 (~> 3.45.1)
- sqlite3/fts5
- sqlite3/perf-threadsafe
- sqlite3/rtree
- SwiftyGif (5.4.4)
- Toast (4.1.0)
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- app_links (from `.symlinks/plugins/app_links/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- file_saver (from `.symlinks/plugins/file_saver/ios`)
- fk_user_agent (from `.symlinks/plugins/fk_user_agent/ios`)
- Flutter (from `Flutter`)
- flutter_email_sender (from `.symlinks/plugins/flutter_email_sender/ios`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
- flutter_local_authentication (from `.symlinks/plugins/flutter_local_authentication/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_sodium (from `.symlinks/plugins/flutter_sodium/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- move_to_background (from `.symlinks/plugins/move_to_background/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
@@ -131,27 +146,30 @@ DEPENDENCIES:
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
- sodium_libs (from `.symlinks/plugins/sodium_libs/ios`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- FMDB
- MTBBarcodeScanner
- OrderedSet
- Reachability
- ReachabilitySwift
- SDWebImage
- Sentry
- SentryPrivate
- sqlite3
- SwiftyGif
- Toast
EXTERNAL SOURCES:
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
app_links:
:path: ".symlinks/plugins/app_links/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
@@ -164,20 +182,20 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_email_sender:
:path: ".symlinks/plugins/flutter_email_sender/ios"
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_inappwebview_ios:
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios"
flutter_local_authentication:
:path: ".symlinks/plugins/flutter_local_authentication/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
flutter_sodium:
:path: ".symlinks/plugins/flutter_sodium/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
local_auth_ios:
:path: ".symlinks/plugins/local_auth_ios/ios"
local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin"
move_to_background:
:path: ".symlinks/plugins/move_to_background/ios"
package_info_plus:
@@ -194,50 +212,54 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sodium_libs:
:path: ".symlinks/plugins/sodium_libs/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
uni_links:
:path: ".symlinks/plugins/uni_links/ios"
:path: ".symlinks/plugins/sqflite/darwin"
sqlite3_flutter_libs:
:path: ".symlinks/plugins/sqlite3_flutter_libs/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808
fk_user_agent: 1f47ec39291e8372b1d692b50084b0d54103c545
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_email_sender: 02d7443217d8c41483223627972bfdc09f74276b
flutter_inappwebview: acd4fc0f012cefd09015000c241137d82f01ba62
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_inappwebview_ios: 97215cf7d4677db55df76782dbd2930c5e1c1ea0
flutter_local_authentication: 1172a4dd88f6306dadce067454e2c4caf07977bb
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_sodium: c84426b4de738514b5b66cfdeb8a06634e72fe0b
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605
local_auth_darwin: c7e464000a6a89e952235699e32b329457608d98
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
privacy_screen: 1a131c052ceb3c3659934b003b0d397c2381a24e
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
Sentry: e3203780941722a1fcfee99e351de14244c7f806
sentry_flutter: 8f0ffd53088e6a4d50c095852c5cad9e4405025c
SentryPrivate: 5e3683390f66611fc7c6215e27645873adb55d13
ReachabilitySwift: 5ae15e16814b5f9ef568963fb2c87aeb49158c66
SDWebImage: 981fd7e860af070920f249fd092420006014c3eb
Sentry: ebc12276bd17613a114ab359074096b6b3725203
sentry_flutter: dff1df05dc39c83d04f9330b36360fc374574c5e
SentryPrivate: d651efb234cf385ec9a1cdd3eff94b5e78a0e0fe
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sodium_libs: 1faae17af662384acbd13e41867a0008cd2e2318
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
sqlite3: 73b7fc691fdc43277614250e04d183740cb15078
sqlite3_flutter_libs: af0e8fe9bce48abddd1ffdbbf839db0302d72d80
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
Toast: ec33c32b8688982cecc6348adeae667c1b9938da
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
PODFILE CHECKSUM: b4e3a7eabb03395b66e81fc061789f61526ee6bb

View File

@@ -159,7 +159,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,5 +1,6 @@
import UIKit
import Flutter
import UIKit
import app_links
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@@ -8,6 +9,15 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
super.application(application, didFinishLaunchingWithOptions: launchOptions)
if let url = AppLinks.shared.getLink(launchOptions: launchOptions) {
AppLinks.shared.handleLink(url: url)
}
return false
// return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

View File

@@ -78,5 +78,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>
</dict>
</plist>

View File

@@ -12,15 +12,18 @@ import 'package:ente_auth/locale.dart';
import "package:ente_auth/onboarding/view/onboarding_page.dart";
import 'package:ente_auth/services/update_service.dart';
import 'package:ente_auth/services/user_service.dart';
import 'package:ente_auth/services/window_listener_service.dart';
import 'package:ente_auth/ui/home_page.dart';
import 'package:ente_auth/ui/settings/app_update_dialog.dart';
import 'package:flutter/foundation.dart';
import "package:flutter/material.dart";
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:tray_manager/tray_manager.dart';
import 'package:window_manager/window_manager.dart';
class App extends StatefulWidget {
final Locale locale;
const App({Key? key, this.locale = const Locale("en")}) : super(key: key);
const App({super.key, this.locale = const Locale("en")});
static void setLocale(BuildContext context, Locale newLocale) {
_AppState state = context.findAncestorStateOfType<_AppState>()!;
@@ -31,7 +34,7 @@ class App extends StatefulWidget {
State<App> createState() => _AppState();
}
class _AppState extends State<App> {
class _AppState extends State<App> with WindowListener, TrayListener {
late StreamSubscription<SignedOutEvent> _signedOutEvent;
late StreamSubscription<SignedInEvent> _signedInEvent;
Locale? locale;
@@ -41,8 +44,19 @@ class _AppState extends State<App> {
});
}
Future<void> initWindowManager() async {
windowManager.addListener(this);
}
Future<void> initTrayManager() async {
trayManager.addListener(this);
}
@override
void initState() {
initWindowManager();
initTrayManager();
_signedOutEvent = Bus.instance.on<SignedOutEvent>().listen((event) {
if (mounted) {
setState(() {});
@@ -76,6 +90,10 @@ class _AppState extends State<App> {
@override
void dispose() {
super.dispose();
windowManager.removeListener(this);
trayManager.removeListener(this);
_signedOutEvent.cancel();
_signedInEvent.cancel();
}
@@ -134,4 +152,45 @@ class _AppState extends State<App> {
: const OnboardingPage(),
};
}
@override
void onWindowResize() {
WindowListenerService.instance.onWindowResize().ignore();
}
@override
void onTrayIconMouseDown() {
if (Platform.isWindows) {
windowManager.show();
} else {
trayManager.popUpContextMenu();
}
}
@override
void onTrayIconRightMouseDown() {
if (Platform.isWindows) {
trayManager.popUpContextMenu();
} else {
windowManager.show();
}
}
@override
void onTrayIconRightMouseUp() {}
@override
void onTrayMenuItemClick(MenuItem menuItem) {
switch (menuItem.key) {
case 'hide_window':
windowManager.hide();
break;
case 'show_window':
windowManager.show();
break;
case 'exit_app':
windowManager.close();
break;
}
}
}

View File

@@ -1,4 +0,0 @@
class AppRoute {
static const String enterSecretKeyPage = "enterSecretKeyPage";
static const String settings = "settings";
}

View File

@@ -1,163 +0,0 @@
import "package:flutter/material.dart";
final lightTheme = ThemeData(
fontFamily: "Inter",
brightness: Brightness.light,
scaffoldBackgroundColor: Colors.white,
appBarTheme: const AppBarTheme().copyWith(
backgroundColor: Colors.white,
foregroundColor: Colors.black,
iconTheme: const IconThemeData(color: Colors.black),
elevation: 0,
),
colorScheme: const ColorScheme.light(
primary: Colors.black,
),
textTheme: _buildTextTheme(Colors.black),
outlinedButtonTheme: buildOutlinedButtonThemeData(
bgDisabled: Colors.grey.shade500,
bgEnabled: Colors.black,
fgDisabled: Colors.white,
fgEnabled: Colors.white,
),
inputDecorationTheme: InputDecorationTheme(
fillColor: null,
filled: true,
contentPadding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 14,
),
border: UnderlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(6),
),
),
);
final darkTheme = ThemeData(
fontFamily: "Inter",
brightness: Brightness.dark,
scaffoldBackgroundColor: Colors.black,
appBarTheme: const AppBarTheme(color: Colors.orange),
textTheme: _buildTextTheme(Colors.white),
outlinedButtonTheme: buildOutlinedButtonThemeData(
bgDisabled: Colors.grey.shade500,
bgEnabled: Colors.white,
fgDisabled: Colors.white,
fgEnabled: Colors.black,
),
inputDecorationTheme: InputDecorationTheme(
fillColor: null,
filled: true,
contentPadding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 14,
),
border: UnderlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(6),
),
), colorScheme: const ColorScheme.dark(primary: Colors.white).copyWith(background: Colors.black),
);
TextTheme _buildTextTheme(Color textColor) {
return const TextTheme().copyWith(
headlineMedium: TextStyle(
color: textColor,
fontSize: 32,
fontWeight: FontWeight.w700,
fontFamily: "Inter",
),
headlineSmall: TextStyle(
color: textColor,
fontSize: 24,
fontWeight: FontWeight.w600,
fontFamily: "Inter",
),
// AG: Body
titleLarge: TextStyle(
color: textColor,
fontSize: 18,
fontFamily: "Inter",
fontWeight: FontWeight.w500,
),
// Use labels for buttons or notifications
labelMedium: TextStyle(
color: textColor,
fontFamily: "Inter",
fontSize: 18,
fontWeight: FontWeight.w700,
height: 28,
),
titleMedium: TextStyle(
color: textColor,
fontFamily: "Inter",
fontSize: 16,
fontWeight: FontWeight.w500,
),
titleSmall: TextStyle(
color: textColor,
fontFamily: "Inter",
fontSize: 14,
fontWeight: FontWeight.w500,
),
bodyLarge: TextStyle(
fontFamily: "Inter",
color: textColor,
fontSize: 16,
fontWeight: FontWeight.w500,
),
bodyMedium: TextStyle(
fontFamily: "Inter",
color: textColor,
fontSize: 14,
fontWeight: FontWeight.w500,
),
bodySmall: TextStyle(
color: textColor.withOpacity(0.6),
fontSize: 14,
fontWeight: FontWeight.w500,
),
);
}
OutlinedButtonThemeData buildOutlinedButtonThemeData({
required Color bgDisabled,
required Color bgEnabled,
required Color fgDisabled,
required Color fgEnabled,
}) {
return OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 50),
textStyle: const TextStyle(
fontWeight: FontWeight.w700,
fontFamily: "Inter",
fontSize: 18,
),
).copyWith(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return bgDisabled;
}
return bgEnabled;
},
),
foregroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return fgDisabled;
}
return fgEnabled;
},
),
alignment: Alignment.center,
),
);
}

View File

@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use
import "dart:async";
import "dart:developer";

View File

@@ -13,12 +13,12 @@ import 'package:ente_auth/models/key_attributes.dart';
import 'package:ente_auth/models/key_gen_result.dart';
import 'package:ente_auth/models/private_key_attributes.dart';
import 'package:ente_auth/store/authenticator_db.dart';
import 'package:ente_auth/utils/crypto_util.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:flutter_sodium/flutter_sodium.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:tuple/tuple.dart';
class Configuration {
@@ -72,9 +72,10 @@ class Configuration {
Future<void> init() async {
_preferences = await SharedPreferences.getInstance();
sqfliteFfiInit();
_secureStorage = const FlutterSecureStorage();
_documentsDirectory = (await getApplicationDocumentsDirectory()).path;
_tempDirectory = _documentsDirectory + "/temp/";
_tempDirectory = "$_documentsDirectory/temp/";
final tempDirectory = io.Directory(_tempDirectory);
try {
final currentTime = DateTime.now().microsecondsSinceEpoch;
@@ -162,7 +163,7 @@ class Configuration {
// decrypt the master key
final kekSalt = CryptoUtil.getSaltToDeriveKey();
final derivedKeyResult = await CryptoUtil.deriveSensitiveKey(
utf8.encode(password) as Uint8List,
utf8.encode(password),
kekSalt,
);
final loginKey = await CryptoUtil.deriveLoginKey(derivedKeyResult.key);
@@ -172,28 +173,28 @@ class Configuration {
CryptoUtil.encryptSync(masterKey, derivedKeyResult.key);
// Generate a public-private keypair and encrypt the latter
final keyPair = await CryptoUtil.generateKeyPair();
final keyPair = CryptoUtil.generateKeyPair();
final encryptedSecretKeyData =
CryptoUtil.encryptSync(keyPair.sk, masterKey);
CryptoUtil.encryptSync(keyPair.secretKey.extractBytes(), masterKey);
final attributes = KeyAttributes(
Sodium.bin2base64(kekSalt),
Sodium.bin2base64(encryptedKeyData.encryptedData!),
Sodium.bin2base64(encryptedKeyData.nonce!),
Sodium.bin2base64(keyPair.pk),
Sodium.bin2base64(encryptedSecretKeyData.encryptedData!),
Sodium.bin2base64(encryptedSecretKeyData.nonce!),
CryptoUtil.bin2base64(kekSalt),
CryptoUtil.bin2base64(encryptedKeyData.encryptedData!),
CryptoUtil.bin2base64(encryptedKeyData.nonce!),
CryptoUtil.bin2base64(keyPair.publicKey),
CryptoUtil.bin2base64(encryptedSecretKeyData.encryptedData!),
CryptoUtil.bin2base64(encryptedSecretKeyData.nonce!),
derivedKeyResult.memLimit,
derivedKeyResult.opsLimit,
Sodium.bin2base64(encryptedMasterKey.encryptedData!),
Sodium.bin2base64(encryptedMasterKey.nonce!),
Sodium.bin2base64(encryptedRecoveryKey.encryptedData!),
Sodium.bin2base64(encryptedRecoveryKey.nonce!),
CryptoUtil.bin2base64(encryptedMasterKey.encryptedData!),
CryptoUtil.bin2base64(encryptedMasterKey.nonce!),
CryptoUtil.bin2base64(encryptedRecoveryKey.encryptedData!),
CryptoUtil.bin2base64(encryptedRecoveryKey.nonce!),
);
final privateAttributes = PrivateKeyAttributes(
Sodium.bin2base64(masterKey),
Sodium.bin2hex(recoveryKey),
Sodium.bin2base64(keyPair.sk),
CryptoUtil.bin2base64(masterKey),
CryptoUtil.bin2hex(recoveryKey),
CryptoUtil.bin2base64(keyPair.secretKey.extractBytes()),
);
return KeyGenResult(attributes, privateAttributes, loginKey);
}
@@ -208,7 +209,7 @@ class Configuration {
// decrypt the master key
final kekSalt = CryptoUtil.getSaltToDeriveKey();
final derivedKeyResult = await CryptoUtil.deriveSensitiveKey(
utf8.encode(password) as Uint8List,
utf8.encode(password),
kekSalt,
);
final loginKey = await CryptoUtil.deriveLoginKey(derivedKeyResult.key);
@@ -220,9 +221,9 @@ class Configuration {
final existingAttributes = getKeyAttributes();
final updatedAttributes = existingAttributes!.copyWith(
kekSalt: Sodium.bin2base64(kekSalt),
encryptedKey: Sodium.bin2base64(encryptedKeyData.encryptedData!),
keyDecryptionNonce: Sodium.bin2base64(encryptedKeyData.nonce!),
kekSalt: CryptoUtil.bin2base64(kekSalt),
encryptedKey: CryptoUtil.bin2base64(encryptedKeyData.encryptedData!),
keyDecryptionNonce: CryptoUtil.bin2base64(encryptedKeyData.nonce!),
memLimit: derivedKeyResult.memLimit,
opsLimit: derivedKeyResult.opsLimit,
);
@@ -240,8 +241,8 @@ class Configuration {
}) async {
_logger.info('Start decryptAndSaveSecrets');
keyEncryptionKey ??= await CryptoUtil.deriveKey(
utf8.encode(password) as Uint8List,
Sodium.base642bin(attributes.kekSalt),
utf8.encode(password),
CryptoUtil.base642bin(attributes.kekSalt),
attributes.memLimit,
attributes.opsLimit,
);
@@ -250,31 +251,31 @@ class Configuration {
Uint8List key;
try {
key = CryptoUtil.decryptSync(
Sodium.base642bin(attributes.encryptedKey),
CryptoUtil.base642bin(attributes.encryptedKey),
keyEncryptionKey,
Sodium.base642bin(attributes.keyDecryptionNonce),
CryptoUtil.base642bin(attributes.keyDecryptionNonce),
);
} catch (e) {
_logger.severe('master-key failed, incorrect password?', e);
throw Exception("Incorrect password");
}
_logger.info("master-key done");
await setKey(Sodium.bin2base64(key));
await setKey(CryptoUtil.bin2base64(key));
final secretKey = CryptoUtil.decryptSync(
Sodium.base642bin(attributes.encryptedSecretKey),
CryptoUtil.base642bin(attributes.encryptedSecretKey),
key,
Sodium.base642bin(attributes.secretKeyDecryptionNonce),
CryptoUtil.base642bin(attributes.secretKeyDecryptionNonce),
);
_logger.info("secret-key done");
await setSecretKey(Sodium.bin2base64(secretKey));
await setSecretKey(CryptoUtil.bin2base64(secretKey));
final token = CryptoUtil.openSealSync(
Sodium.base642bin(getEncryptedToken()!),
Sodium.base642bin(attributes.publicKey),
CryptoUtil.base642bin(getEncryptedToken()!),
CryptoUtil.base642bin(attributes.publicKey),
secretKey,
);
_logger.info('appToken done');
await setToken(
Sodium.bin2base64(token, variant: Sodium.base64VariantUrlsafe),
CryptoUtil.bin2base64(token, urlSafe: true),
);
return keyEncryptionKey;
}
@@ -293,28 +294,28 @@ class Configuration {
Uint8List masterKey;
try {
masterKey = await CryptoUtil.decrypt(
Sodium.base642bin(attributes!.masterKeyEncryptedWithRecoveryKey),
Sodium.hex2bin(recoveryKey),
Sodium.base642bin(attributes.masterKeyDecryptionNonce),
CryptoUtil.base642bin(attributes!.masterKeyEncryptedWithRecoveryKey),
CryptoUtil.hex2bin(recoveryKey),
CryptoUtil.base642bin(attributes.masterKeyDecryptionNonce),
);
} catch (e) {
_logger.severe(e);
rethrow;
}
await setKey(Sodium.bin2base64(masterKey));
await setKey(CryptoUtil.bin2base64(masterKey));
final secretKey = CryptoUtil.decryptSync(
Sodium.base642bin(attributes.encryptedSecretKey),
CryptoUtil.base642bin(attributes.encryptedSecretKey),
masterKey,
Sodium.base642bin(attributes.secretKeyDecryptionNonce),
CryptoUtil.base642bin(attributes.secretKeyDecryptionNonce),
);
await setSecretKey(Sodium.bin2base64(secretKey));
await setSecretKey(CryptoUtil.bin2base64(secretKey));
final token = CryptoUtil.openSealSync(
Sodium.base642bin(getEncryptedToken()!),
Sodium.base642bin(attributes.publicKey),
CryptoUtil.base642bin(getEncryptedToken()!),
CryptoUtil.base642bin(attributes.publicKey),
secretKey,
);
await setToken(
Sodium.bin2base64(token, variant: Sodium.base64VariantUrlsafe),
CryptoUtil.bin2base64(token, urlSafe: true),
);
}
@@ -407,27 +408,31 @@ class Configuration {
}
Uint8List? getKey() {
return _key == null ? null : Sodium.base642bin(_key!);
return _key == null ? null : CryptoUtil.base642bin(_key!);
}
Uint8List? getSecretKey() {
return _secretKey == null ? null : Sodium.base642bin(_secretKey!);
return _secretKey == null ? null : CryptoUtil.base642bin(_secretKey!);
}
Uint8List? getAuthSecretKey() {
return _authSecretKey == null ? null : Sodium.base642bin(_authSecretKey!);
return _authSecretKey == null
? null
: CryptoUtil.base642bin(_authSecretKey!);
}
Uint8List? getOfflineSecretKey() {
return _offlineAuthKey == null ? null : Sodium.base642bin(_offlineAuthKey!);
return _offlineAuthKey == null
? null
: CryptoUtil.base642bin(_offlineAuthKey!);
}
Uint8List getRecoveryKey() {
final keyAttributes = getKeyAttributes()!;
return CryptoUtil.decryptSync(
Sodium.base642bin(keyAttributes.recoveryKeyEncryptedWithMasterKey),
CryptoUtil.base642bin(keyAttributes.recoveryKeyEncryptedWithMasterKey),
getKey()!,
Sodium.base642bin(keyAttributes.recoveryKeyDecryptionNonce),
CryptoUtil.base642bin(keyAttributes.recoveryKeyDecryptionNonce),
);
}
@@ -454,7 +459,7 @@ class Configuration {
iOptions: _secureStorageOptionsIOS,
);
} else {
_offlineAuthKey = Sodium.bin2base64(CryptoUtil.generateKey());
_offlineAuthKey = CryptoUtil.bin2base64(CryptoUtil.generateKey());
await _secureStorage.write(
key: offlineAuthSecretKey,
value: _offlineAuthKey,

View File

@@ -7,7 +7,8 @@ const String sentryDSN =
"https://ed4ddd6309b847ba8849935e26e9b648@sentry.ente.io/9";
const String sentryTunnel = "https://sentry-reporter.ente.io";
const String roadmapURL = "https://roadmap.ente.io";
const String githubDiscussionsUrl = "https://github.com/ente-io/ente/discussions";
const String githubIssuesUrl =
"https://github.com/ente-io/ente/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc";
const int microSecondsInDay = 86400000000;
const int android11SDKINT = 30;
const int galleryLoadStartTime = -8000000000000000; // Wednesday, March 6, 1748

View File

@@ -1,9 +1,9 @@
class InvalidFileError extends ArgumentError {
InvalidFileError(String message) : super(message);
InvalidFileError(String super.message);
}
class InvalidFileUploadState extends AssertionError {
InvalidFileUploadState(String message) : super(message);
InvalidFileUploadState(String super.message);
}
class SubscriptionAlreadyClaimedError extends Error {}
@@ -30,19 +30,15 @@ class UnauthorizedError extends Error {}
class RequestCancelledError extends Error {}
class InvalidSyncStatusError extends AssertionError {
InvalidSyncStatusError(String message) : super(message);
InvalidSyncStatusError(String super.message);
}
class UnauthorizedEditError extends AssertionError {}
class InvalidStateError extends AssertionError {
InvalidStateError(String message) : super(message);
InvalidStateError(String super.message);
}
class KeyDerivationError extends Error {}
class LoginKeyDerivationError extends Error {}
class SrpSetupNotCompleteError extends Error {}
class AuthenticatorKeyNotFound extends Error {}

View File

@@ -235,14 +235,14 @@ class SuperLogging {
extraLines = null;
}
final str = (config.prefix) + " " + rec.toPrettyString(extraLines);
final str = "${config.prefix} ${rec.toPrettyString(extraLines)}";
// write to stdout
printLog(str);
// push to log queue
if (fileIsEnabled) {
fileQueueEntries.add(str + '\n');
fileQueueEntries.add('$str\n');
if (fileQueueEntries.length == 1) {
flushQueue();
}
@@ -275,7 +275,7 @@ class SuperLogging {
static var logChunkSize = 800;
static void printLog(String text) {
text.chunked(logChunkSize).forEach(print);
text.chunked(logChunkSize).forEach(debugPrint);
}
/// A queue to be consumed by [setupSentry].
@@ -354,7 +354,7 @@ class SuperLogging {
final date = config.dateFmt!.parse(basename(file.path));
dates[file as File] = date;
files.add(file);
} on FormatException {}
} on Exception catch (_) {}
}
final nowTime = DateTime.now();
@@ -374,7 +374,7 @@ class SuperLogging {
"deleting log file ${file.path}",
);
await file.delete();
} catch (ignore) {}
} on Exception catch (_) {}
}
}

View File

@@ -46,7 +46,7 @@ class TunneledTransport implements Transport {
_options.logger(
SentryLevel.error,
'API returned an error, statusCode = ${response.statusCode}, '
'body = ${response.body}',
'body = ${response.body}',
);
}
return const SentryId.empty();
@@ -65,8 +65,8 @@ class TunneledTransport implements Transport {
}
Future<StreamedRequest> _createStreamedRequest(
SentryEnvelope envelope,
) async {
SentryEnvelope envelope,
) async {
final streamedRequest = StreamedRequest('POST', _tunnel);
envelope
.envelopeStream(_options)
@@ -91,10 +91,10 @@ class _CredentialBuilder {
_clock = clock;
factory _CredentialBuilder(
Dsn? dsn,
String sdkIdentifier,
ClockProvider clock,
) {
Dsn? dsn,
String sdkIdentifier,
ClockProvider clock,
) {
final authHeader = _buildAuthHeader(
publicKey: dsn?.publicKey,
secretKey: dsn?.secretKey,

View File

@@ -4,9 +4,10 @@ import 'package:dio/dio.dart';
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/core/event_bus.dart';
import 'package:ente_auth/events/endpoint_updated_event.dart';
import 'package:ente_auth/utils/package_info_util.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:fk_user_agent/fk_user_agent.dart';
import 'package:flutter/foundation.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:uuid/uuid.dart';
int kConnectTimeout = 15000;
@@ -16,34 +17,41 @@ class Network {
late Dio _enteDio;
Future<void> init() async {
await FkUserAgent.init();
final packageInfo = await PackageInfo.fromPlatform();
if (PlatformUtil.isMobile()) await FkUserAgent.init();
final packageInfo = await PackageInfoUtil().getPackageInfo();
final version = PackageInfoUtil().getVersion(packageInfo);
final packageName = PackageInfoUtil().getPackageName(packageInfo);
final endpoint = Configuration.instance.getHttpEndpoint();
_dio = Dio(
BaseOptions(
connectTimeout: kConnectTimeout,
connectTimeout: Duration(milliseconds: kConnectTimeout),
headers: {
HttpHeaders.userAgentHeader: FkUserAgent.userAgent,
'X-Client-Version': packageInfo.version,
'X-Client-Package': packageInfo.packageName,
HttpHeaders.userAgentHeader: PlatformUtil.isMobile()
? FkUserAgent.userAgent
: Platform.operatingSystem,
'X-Client-Version': version,
'X-Client-Package': packageName,
},
),
);
_enteDio = Dio(
BaseOptions(
baseUrl: endpoint,
connectTimeout: kConnectTimeout,
connectTimeout: Duration(milliseconds: kConnectTimeout),
headers: {
HttpHeaders.userAgentHeader: FkUserAgent.userAgent,
'X-Client-Version': packageInfo.version,
'X-Client-Package': packageInfo.packageName,
if (PlatformUtil.isMobile())
HttpHeaders.userAgentHeader: FkUserAgent.userAgent
else
HttpHeaders.userAgentHeader: Platform.operatingSystem,
'X-Client-Version': version,
'X-Client-Package': packageName,
},
),
);
_setupInterceptors(endpoint);
Bus.instance.on<EndpointUpdatedEvent>().listen((event) {
final endpoint = Configuration.instance.getHttpEndpoint();
_enteDio.options.baseUrl = endpoint;

View File

@@ -5,12 +5,16 @@ import 'package:flutter/material.dart';
final lightThemeData = ThemeData(
fontFamily: 'Inter',
brightness: Brightness.light,
dividerTheme: const DividerThemeData(
color: Colors.black12,
),
hintColor: const Color.fromRGBO(158, 158, 158, 1),
primaryColor: const Color.fromRGBO(255, 110, 64, 1),
primaryColorLight: const Color.fromRGBO(0, 0, 0, 0.541),
iconTheme: const IconThemeData(color: Colors.black),
primaryIconTheme:
const IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
buttonTheme: const ButtonThemeData(),
outlinedButtonTheme: buildOutlinedButtonThemeData(
bgDisabled: const Color.fromRGBO(158, 158, 158, 1),
bgEnabled: const Color.fromRGBO(0, 0, 0, 1),
@@ -72,24 +76,42 @@ final lightThemeData = ThemeData(
? const Color.fromRGBO(255, 255, 255, 1)
: const Color.fromRGBO(0, 0, 0, 1);
}),
), radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
return null;
}),
), switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
return null;
}),
trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
return null;
}),
), colorScheme: const ColorScheme.light(
),
radioTheme: RadioThemeData(
fillColor:
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return const Color.fromRGBO(102, 187, 106, 1);
}
return null;
}),
),
switchTheme: SwitchThemeData(
thumbColor:
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return const Color.fromRGBO(102, 187, 106, 1);
}
return null;
}),
trackColor:
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return const Color.fromRGBO(102, 187, 106, 1);
}
return null;
}),
),
colorScheme: const ColorScheme.light(
primary: Colors.black,
secondary: Color.fromARGB(255, 163, 163, 163),
).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)),
@@ -98,6 +120,9 @@ final lightThemeData = ThemeData(
final darkThemeData = ThemeData(
fontFamily: 'Inter',
brightness: Brightness.dark,
dividerTheme: const DividerThemeData(
color: Colors.white12,
),
primaryColorLight: const Color.fromRGBO(255, 255, 255, 0.702),
iconTheme: const IconThemeData(color: Colors.white),
primaryIconTheme:
@@ -105,6 +130,7 @@ final darkThemeData = ThemeData(
hintColor: const Color.fromRGBO(158, 158, 158, 1),
buttonTheme: const ButtonThemeData().copyWith(
buttonColor: const Color.fromRGBO(45, 194, 98, 1.0),
height: 56,
),
textTheme: _buildTextTheme(const Color.fromRGBO(255, 255, 255, 1)),
outlinedButtonTheme: buildOutlinedButtonThemeData(
@@ -164,24 +190,43 @@ final darkThemeData = ThemeData(
return const Color.fromRGBO(158, 158, 158, 1);
}
}),
), radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
return null;
}),
), switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
return null;
}),
trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
return null;
}),
), colorScheme: const ColorScheme.dark(primary: Colors.white).copyWith(background: const Color.fromRGBO(0, 0, 0, 1)),
),
radioTheme: RadioThemeData(
fillColor:
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return const Color.fromRGBO(102, 187, 106, 1);
}
return null;
}),
),
switchTheme: SwitchThemeData(
thumbColor:
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return const Color.fromRGBO(102, 187, 106, 1);
}
return null;
}),
trackColor:
MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(MaterialState.selected)) {
return const Color.fromRGBO(102, 187, 106, 1);
}
return null;
}),
),
colorScheme: const ColorScheme.dark(primary: Colors.white)
.copyWith(background: const Color.fromRGBO(0, 0, 0, 1)),
);
TextTheme _buildTextTheme(Color textColor) {
@@ -400,6 +445,7 @@ OutlinedButtonThemeData buildOutlinedButtonThemeData({
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
fixedSize: const Size.fromHeight(56),
alignment: Alignment.center,
padding: const EdgeInsets.fromLTRB(50, 16, 50, 16),
textStyle: const TextStyle(
@@ -436,7 +482,9 @@ ElevatedButtonThemeData buildElevatedButtonThemeData({
}) {
return ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
foregroundColor: onPrimary, backgroundColor: primary, elevation: elevation,
foregroundColor: onPrimary,
backgroundColor: primary,
elevation: elevation,
alignment: Alignment.center,
textStyle: const TextStyle(
fontWeight: FontWeight.w600,

View File

@@ -25,7 +25,7 @@ class AuthenticatorGateway {
try {
final response = await _enteDio.get("/authenticator/key");
return AuthKey.fromMap(response.data);
} on DioError catch (e) {
} on DioException catch (e) {
if (e.response != null && (e.response!.statusCode ?? 0) == 404) {
throw AuthenticatorKeyNotFound();
} else {
@@ -90,7 +90,7 @@ class AuthenticatorGateway {
}
return authEntities;
} catch (e) {
if (e is DioError && e.response?.statusCode == 401) {
if (e is DioException && e.response?.statusCode == 401) {
throw UnauthorizedError();
} else {
rethrow;

View File

@@ -145,6 +145,7 @@
"lostDeviceTitle": "Gerät verloren?",
"twoFactorAuthTitle": "Zwei-Faktor-Authentifizierung",
"passkeyAuthTitle": "Passkey Authentifizierung",
"verifyPasskey": "Passkey verifizieren",
"recoverAccount": "Konto wiederherstellen",
"enterRecoveryKeyHint": "Geben Sie Ihren Wiederherstellungsschlüssel ein",
"recover": "Wiederherstellen",
@@ -407,7 +408,7 @@
"hearUsWhereTitle": "Wie hast du von Ente erfahren? (optional)",
"hearUsExplanation": "Wir tracken keine App-Installationen. Es würde uns jedoch helfen, wenn du uns mitteilst, wie du von uns erfahren hast!",
"waitingForBrowserRequest": "Warten auf Browseranfrage...",
"launchPasskeyUrlAgain": "Passwort-URL erneut starten",
"waitingForVerification": "Warte auf Bestätigung...",
"passkey": "Passkey",
"developerSettingsWarning": "Sind Sie sicher, dass Sie die Entwicklereinstellungen ändern möchten?",
"developerSettings": "Entwicklereinstellungen",

View File

@@ -199,6 +199,10 @@
"recoveryKeySaveDescription": "We don't store this key, please save this 24 word key in a safe place.",
"doThisLater": "Do this later",
"saveKey": "Save key",
"save": "Save",
"send": "Send",
"saveOrSendDescription": "Do you want to save this to your storage (Downloads folder by default) or send it to other apps?",
"saveOnlyDescription": "Do you want to save this to your storage (Downloads folder by default)?",
"back": "Back",
"createAccount": "Create account",
"passwordStrength": "Password strength: {passwordStrengthValue}",
@@ -407,6 +411,7 @@
"doNotSignOut": "Do not sign out",
"hearUsWhereTitle": "How did you hear about Ente? (optional)",
"hearUsExplanation": "We don't track app installs. It'd help if you told us where you found us!",
"recoveryKeySaved": "Recovery key saved in Downloads folder!",
"waitingForBrowserRequest": "Waiting for browser request...",
"waitingForVerification": "Waiting for verification...",
"passkey": "Passkey",

View File

@@ -145,6 +145,7 @@
"lostDeviceTitle": "デバイスを紛失しましたか?",
"twoFactorAuthTitle": "2 要素認証",
"passkeyAuthTitle": "パスキー認証",
"verifyPasskey": "パスキーの認証",
"recoverAccount": "アカウントを回復",
"enterRecoveryKeyHint": "回復キーを入力",
"recover": "回復",
@@ -407,7 +408,7 @@
"hearUsWhereTitle": "Ente についてどのようにお聞きになりましたか?(任意)",
"hearUsExplanation": "私たちはアプリのインストールを追跡していません。私たちをお知りになった場所を教えてください!",
"waitingForBrowserRequest": "ブラウザのリクエストを待っています...",
"launchPasskeyUrlAgain": "パスキーのURLを再度起動する",
"waitingForVerification": "認証を待っています...",
"passkey": "パスキー",
"developerSettingsWarning": "開発者向け設定を変更してもよろしいですか?",
"developerSettings": "開発者向け設定",

View File

@@ -0,0 +1 @@
{}

View File

@@ -144,6 +144,8 @@
"enterCodeHint": "Voer de 6-cijferige code van je verificatie-app in",
"lostDeviceTitle": "Apparaat verloren?",
"twoFactorAuthTitle": "Tweestapsverificatie",
"passkeyAuthTitle": "Passkey verificatie",
"verifyPasskey": "Bevestig passkey",
"recoverAccount": "Account herstellen",
"enterRecoveryKeyHint": "Voer je herstelsleutel in",
"recover": "Herstellen",
@@ -404,5 +406,15 @@
"signOutOtherDevices": "Afmelden bij andere apparaten",
"doNotSignOut": "Niet uitloggen",
"hearUsWhereTitle": "Hoe hoorde je over Ente? (optioneel)",
"hearUsExplanation": "Wij gebruiken geen tracking. Het zou helpen als je ons vertelt waar je ons gevonden hebt!"
"hearUsExplanation": "Wij gebruiken geen tracking. Het zou helpen als je ons vertelt waar je ons gevonden hebt!",
"waitingForBrowserRequest": "Wachten op browserverzoek...",
"waitingForVerification": "Wachten op verificatie...",
"passkey": "Passkey",
"developerSettingsWarning": "Weet u zeker dat u de ontwikkelaarsinstellingen wilt wijzigen?",
"developerSettings": "Ontwikkelaarsinstellingen",
"serverEndpoint": "Server eindpunt",
"invalidEndpoint": "Ongeldig eindpunt",
"invalidEndpointMessage": "Sorry, het eindpunt dat u hebt ingevoerd is ongeldig. Voer een geldig eindpunt in en probeer het opnieuw.",
"endpointUpdatedMessage": "Eindpunt met succes bijgewerkt",
"customEndpoint": "Verbonden met {endpoint}"
}

View File

@@ -338,5 +338,22 @@
"deleteCodeAuthMessage": "Uwierzytelnij, aby usunąć kod",
"showQRAuthMessage": "Uwierzytelnij, aby pokazać kod QR",
"confirmAccountDeleteTitle": "Potwierdź usunięcie konta",
"confirmAccountDeleteMessage": "To konto jest połączone z innymi aplikacjami ente, jeśli ich używasz.\n\nTwoje przesłane dane, we wszystkich aplikacjach ente, zostaną zaplanowane do usunięcia, a Twoje konto zostanie trwale usunięte."
"confirmAccountDeleteMessage": "To konto jest połączone z innymi aplikacjami ente, jeśli ich używasz.\n\nTwoje przesłane dane, we wszystkich aplikacjach ente, zostaną zaplanowane do usunięcia, a Twoje konto zostanie trwale usunięte.",
"androidBiometricNotRecognized": "Nie rozpoznano. Spróbuj ponownie.",
"@androidBiometricNotRecognized": {
"description": "Message to let the user know that authentication was failed. It is used on Android side. Maximum 60 characters."
},
"androidSignInTitle": "Wymagana autoryzacja",
"@androidSignInTitle": {
"description": "Message showed as a title in a dialog which indicates the user that they need to scan biometric to continue. It is used on Android side. Maximum 60 characters."
},
"goToSettings": "Przejdź do Ustawień",
"@goToSettings": {
"description": "Message showed on a button that the user can click to go to settings pages from the current dialog. It is used on both Android and iOS side. Maximum 30 characters."
},
"noInternetConnection": "Brak połączenia z Internetem",
"pleaseCheckYourInternetConnectionAndTryAgain": "Proszę sprawdzić połączenie internetowe i spróbować ponownie.",
"hearUsWhereTitle": "Jak usłyszałeś o Ente? (opcjonalnie)",
"waitingForVerification": "Oczekiwanie na weryfikację...",
"developerSettings": "Ustawienia deweloperskie"
}

View File

@@ -47,9 +47,9 @@
},
"copyEmailAction": "Copiar e-mail",
"exportLogsAction": "Exportar logs",
"reportABug": "Reportar um bug",
"reportABug": "Reportar um problema",
"crashAndErrorReporting": "Reporte de erros e falhas",
"reportBug": "Reportar bug",
"reportBug": "Reportar problema",
"emailUsMessage": "Por favor, envie um e-mail para {email}",
"@emailUsMessage": {
"placeholders": {
@@ -145,6 +145,7 @@
"lostDeviceTitle": "Perdeu seu dispositivo?",
"twoFactorAuthTitle": "Autenticação de dois fatores",
"passkeyAuthTitle": "Autenticação via Chave de acesso",
"verifyPasskey": "Verificar chave de acesso",
"recoverAccount": "Recuperar conta",
"enterRecoveryKeyHint": "Digite sua chave de recuperação",
"recover": "Recuperar",
@@ -162,7 +163,7 @@
"invalidEmailMessage": "Por favor, insira um endereço de e-mail válido.",
"deleteAccount": "Excluir conta",
"deleteAccountQuery": "Sentiremos muito por vê-lo partir. Você está enfrentando algum problema?",
"yesSendFeedbackAction": "Sim, enviar feedback",
"yesSendFeedbackAction": "Sim, enviar comentário",
"noDeleteAccountAction": "Não, excluir conta",
"initiateAccountDeleteTitle": "Por favor, autentique-se para iniciar a exclusão de conta",
"sendEmail": "Enviar e-mail",
@@ -407,7 +408,7 @@
"hearUsWhereTitle": "Como você ouviu sobre o Ente? (opcional)",
"hearUsExplanation": "Não rastreamos instalações do aplicativo. Seria útil se você nos contasse onde nos encontrou!",
"waitingForBrowserRequest": "Aguardando solicitação do navegador...",
"launchPasskeyUrlAgain": "Iniciar a URL de chave de acesso novamente",
"waitingForVerification": "Esperando por verificação...",
"passkey": "Chave de acesso",
"developerSettingsWarning": "Tem certeza de que deseja modificar as configurações de Desenvolvedor?",
"developerSettings": "Configurações de desenvolvedor",

View File

@@ -145,6 +145,7 @@
"lostDeviceTitle": "丢失了设备吗?",
"twoFactorAuthTitle": "双因素认证",
"passkeyAuthTitle": "通行密钥认证",
"verifyPasskey": "验证通行密钥",
"recoverAccount": "恢复账户",
"enterRecoveryKeyHint": "输入您的恢复密钥",
"recover": "恢复",
@@ -407,7 +408,7 @@
"hearUsWhereTitle": "您是如何知道Ente的 (可选的)",
"hearUsExplanation": "我们不跟踪应用程序安装情况。如果您告诉我们您是在哪里找到我们的,将会有所帮助!",
"waitingForBrowserRequest": "正在等待浏览器请求...",
"launchPasskeyUrlAgain": "再次启动 通行密钥 URL",
"waitingForVerification": "等待验证...",
"passkey": "通行密钥",
"developerSettingsWarning": "您确定要修改开发者设置吗?",
"developerSettings": "开发者设置",

View File

@@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:io';
import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:computer/computer.dart';
import "package:ente_auth/app/view/app.dart";
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/core/constants.dart';
@@ -17,11 +16,14 @@ import 'package:ente_auth/services/preference_service.dart';
import 'package:ente_auth/services/update_service.dart';
import 'package:ente_auth/services/user_remote_flag_service.dart';
import 'package:ente_auth/services/user_service.dart';
import 'package:ente_auth/services/window_listener_service.dart';
import 'package:ente_auth/store/code_store.dart';
import 'package:ente_auth/ui/tools/app_lock.dart';
import 'package:ente_auth/ui/tools/lock_screen.dart';
import 'package:ente_auth/ui/utils/icon_utils.dart';
import 'package:ente_auth/utils/crypto_util.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:ente_auth/utils/window_protocol_handler.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter/foundation.dart';
import "package:flutter/material.dart";
import 'package:flutter/scheduler.dart';
@@ -29,11 +31,52 @@ import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:privacy_screen/privacy_screen.dart';
import 'package:tray_manager/tray_manager.dart';
import 'package:window_manager/window_manager.dart';
final _logger = Logger("main");
Future<void> initSystemTray() async {
String path = Platform.isWindows
? 'assets/icons/auth-icon.ico'
: 'assets/icons/auth-icon.png';
await trayManager.setIcon(path);
Menu menu = Menu(
items: [
MenuItem(
key: 'hide_window',
label: 'Hide Window',
),
MenuItem(
key: 'show_window',
label: 'Show Window',
),
MenuItem.separator(),
MenuItem(
key: 'exit_app',
label: 'Exit App',
),
],
);
await trayManager.setContextMenu(menu);
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
initSystemTray().ignore();
if (PlatformUtil.isDesktop()) {
await windowManager.ensureInitialized();
await WindowListenerService.instance.init();
WindowOptions windowOptions = WindowOptions(
size: WindowListenerService.instance.getWindowSize(),
);
await windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
}
await _runInForeground();
await _setupPrivacyScreen();
if (Platform.isAndroid) {
@@ -70,10 +113,14 @@ ThemeMode _themeMode(AdaptiveThemeMode? savedThemeMode) {
}
Future _runWithLogs(Function() function, {String prefix = ""}) async {
String dir = "";
try {
dir = "${(await getApplicationSupportDirectory()).path}/logs";
} catch (_) {}
await SuperLogging.main(
LogConfig(
body: function,
logDirPath: (await getApplicationSupportDirectory()).path + "/logs",
logDirPath: dir,
maxLogFiles: 5,
sentryDsn: sentryDSN,
enableInDebugMode: true,
@@ -82,10 +129,19 @@ Future _runWithLogs(Function() function, {String prefix = ""}) async {
);
}
void _registerWindowsProtocol() {
const kWindowsScheme = 'ente';
// Register our protocol only on Windows platform
if (!kIsWeb && Platform.isWindows) {
WindowsProtocolHandler()
.register(kWindowsScheme, executable: null, arguments: null);
}
}
Future<void> _init(bool bool, {String? via}) async {
// Start workers asynchronously. No need to wait for them to start
Computer.shared().turnOn(workersCount: 4, verbose: kDebugMode).ignore();
CryptoUtil.init();
_registerWindowsProtocol();
await initCryptoUtil();
await PreferenceService.instance.init();
await CodeStore.instance.init();
await Configuration.instance.init();
@@ -100,6 +156,7 @@ Future<void> _init(bool bool, {String? via}) async {
}
Future<void> _setupPrivacyScreen() async {
if (!PlatformUtil.isMobile()) return;
final brightness =
SchedulerBinding.instance.platformDispatcher.platformBrightness;
bool isInDarkMode = brightness == Brightness.dark;

View File

@@ -57,14 +57,7 @@ class Code {
updatedAlgo,
updatedType,
updatedCounter,
"otpauth://${updatedType.name}/" +
updateIssuer +
":" +
updateAccount +
"?algorithm=${updatedAlgo.name}&digits=$updatedDigits&issuer=" +
updateIssuer +
"&period=$updatePeriod&secret=" +
updatedSecret + (updatedType == Type.hotp ? "&counter=$updatedCounter" : ""),
"otpauth://${updatedType.name}/$updateIssuer:$updateAccount?algorithm=${updatedAlgo.name}&digits=$updatedDigits&issuer=$updateIssuer&period=$updatePeriod&secret=$updatedSecret${updatedType == Type.hotp ? "&counter=$updatedCounter" : ""}",
generatedID: generatedID,
);
}
@@ -83,35 +76,28 @@ class Code {
Algorithm.sha1,
Type.totp,
0,
"otpauth://totp/" +
issuer +
":" +
account +
"?algorithm=SHA1&digits=6&issuer=" +
issuer +
"&period=30&secret=" +
secret,
"otpauth://totp/$issuer:$account?algorithm=SHA1&digits=6&issuer=$issuer&period=30&secret=$secret",
);
}
static Code fromRawData(String rawData) {
Uri uri = Uri.parse(rawData);
try {
return Code(
_getAccount(uri),
_getIssuer(uri),
_getDigits(uri),
_getPeriod(uri),
getSanitizedSecret(uri.queryParameters['secret']!),
_getAlgorithm(uri),
_getType(uri),
_getCounter(uri),
rawData,
);
} catch(e) {
return Code(
_getAccount(uri),
_getIssuer(uri),
_getDigits(uri),
_getPeriod(uri),
getSanitizedSecret(uri.queryParameters['secret']!),
_getAlgorithm(uri),
_getType(uri),
_getCounter(uri),
rawData,
);
} catch (e) {
// if account name contains # without encoding,
// rest of the url are treated as url fragment
if(rawData.contains("#")) {
if (rawData.contains("#")) {
return Code.fromRawData(rawData.replaceAll("#", '%23'));
} else {
rethrow;
@@ -141,7 +127,7 @@ class Code {
if (uri.queryParameters.containsKey("issuer")) {
String issuerName = uri.queryParameters['issuer']!;
// Handle issuer name with period
// See https://github.com/ente-io/auth/pull/77
// See https://github.com/ente-io/ente/pull/77
if (issuerName.contains("period=")) {
return issuerName.substring(0, issuerName.indexOf("period="));
}

View File

@@ -1,9 +0,0 @@
import 'dart:typed_data';
class DerivedKeyResult {
final Uint8List key;
final int memLimit;
final int opsLimit;
DerivedKeyResult(this.key, this.memLimit, this.opsLimit);
}

View File

@@ -1,15 +0,0 @@
import 'dart:typed_data';
class EncryptionResult {
final Uint8List? encryptedData;
final Uint8List? key;
final Uint8List? header;
final Uint8List? nonce;
EncryptionResult({
this.encryptedData,
this.key,
this.header,
this.nonce,
});
}

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:ente_auth/app/view/app.dart';
import 'package:ente_auth/core/configuration.dart';
@@ -28,7 +29,7 @@ import "package:flutter/material.dart";
import 'package:local_auth/local_auth.dart';
class OnboardingPage extends StatefulWidget {
const OnboardingPage({Key? key}) : super(key: key);
const OnboardingPage({super.key});
@override
State<OnboardingPage> createState() => _OnboardingPageState();
@@ -86,118 +87,128 @@ class _OnboardingPageState extends State<OnboardingPage> {
}
}
},
child: Center(
child: SingleChildScrollView(
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 40.0, horizontal: 40),
child: Column(
children: [
Column(
children: [
kDebugMode
? GestureDetector(
child: const Align(
alignment: Alignment.topRight,
child: Text("Lang"),
),
onTap: () async {
final locale = await getLocale();
// ignore: unawaited_futures
routeToPage(
context,
LanguageSelectorPage(
appSupportedLocales,
(locale) async {
await setLocale(locale);
App.setLocale(context, locale);
},
locale,
),
).then((value) {
setState(() {});
});
},
)
: const SizedBox(),
Image.asset(
"assets/sheild-front-gradient.png",
width: 200,
height: 200,
),
const SizedBox(height: 12),
const Text(
"ente",
style: TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Montserrat',
fontSize: 42,
),
),
const SizedBox(height: 4),
Text(
"Authenticator",
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(height: 32),
Text(
l10n.onBoardingBody,
textAlign: TextAlign.center,
style:
Theme.of(context).textTheme.titleLarge!.copyWith(
color: Colors.white38,
child: SingleChildScrollView(
child: Center(
child: ConstrainedBox(
constraints:
const BoxConstraints.tightFor(height: 800, width: 450),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 40.0,
horizontal: 40,
),
child: Column(
children: [
Column(
children: [
kDebugMode
? GestureDetector(
child: const Align(
alignment: Alignment.topRight,
child: Text("Lang"),
),
),
],
),
const SizedBox(height: 100),
Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 20),
child: GradientButton(
onTap: _navigateToSignUpPage,
text: l10n.newUser,
onTap: () async {
final locale = await getLocale();
// ignore: unawaited_futures
routeToPage(
context,
LanguageSelectorPage(
appSupportedLocales,
(locale) async {
await setLocale(locale);
App.setLocale(context, locale);
},
locale,
),
).then((value) {
setState(() {});
});
},
)
: const SizedBox(),
Image.asset(
"assets/sheild-front-gradient.png",
width: 200,
height: 200,
),
const SizedBox(height: 12),
const Text(
"ente",
style: TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Montserrat',
fontSize: 42,
),
),
const SizedBox(height: 4),
Text(
"Authenticator",
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(height: 32),
Text(
l10n.onBoardingBody,
textAlign: TextAlign.center,
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(
color: Colors.white38,
),
),
],
),
),
const SizedBox(height: 4),
Container(
width: double.infinity,
padding: const EdgeInsets.fromLTRB(20, 12, 20, 0),
child: Hero(
tag: "log_in",
child: ElevatedButton(
style: Theme.of(context)
.colorScheme
.optionalActionButtonStyle,
onPressed: _navigateToSignInPage,
child: Text(
l10n.existingUser,
style: const TextStyle(
color: Colors.black, // same for both themes
const SizedBox(height: 100),
Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 20),
child: GradientButton(
onTap: _navigateToSignUpPage,
text: l10n.newUser,
),
),
const SizedBox(height: 16),
Container(
height: 56,
width: double.infinity,
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
child: Hero(
tag: "log_in",
child: ElevatedButton(
style: Theme.of(context)
.colorScheme
.optionalActionButtonStyle,
onPressed: _navigateToSignInPage,
child: Text(
l10n.existingUser,
style: const TextStyle(
color: Colors.black, // same for both themes
),
),
),
),
),
),
const SizedBox(height: 4),
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 20, bottom: 20),
child: GestureDetector(
onTap: _optForOfflineMode,
child: Center(
child: Text(
l10n.useOffline,
style: body.copyWith(
color:
Theme.of(context).colorScheme.mutedTextColor,
const SizedBox(height: 4),
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 20, bottom: 20),
child: GestureDetector(
onTap: _optForOfflineMode,
child: Center(
child: Text(
l10n.useOffline,
style: body.copyWith(
color: Theme.of(context)
.colorScheme
.mutedTextColor,
),
),
),
),
),
),
const DeveloperSettingsWidget(),
],
const DeveloperSettingsWidget(),
],
),
),
),
),
@@ -208,7 +219,9 @@ class _OnboardingPageState extends State<OnboardingPage> {
}
Future<void> _optForOfflineMode() async {
bool canCheckBio = await LocalAuthentication().canCheckBiometrics;
bool canCheckBio = Platform.isMacOS || Platform.isLinux
? true
: await LocalAuthentication().canCheckBiometrics;
if (!canCheckBio) {
showToast(
context,

View File

@@ -9,7 +9,7 @@ import "package:flutter/material.dart";
class SetupEnterSecretKeyPage extends StatefulWidget {
final Code? code;
SetupEnterSecretKeyPage({this.code, Key? key}) : super(key: key);
SetupEnterSecretKeyPage({this.code, super.key});
@override
State<SetupEnterSecretKeyPage> createState() =>
@@ -32,7 +32,7 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
widget.code != null ? safeDecode(widget.code!.account).trim() : null,
);
_secretController = TextEditingController(
text: widget.code != null ? widget.code!.secret : null,
text: widget.code?.secret,
);
_secretKeyObscured = widget.code != null;
super.initState();
@@ -45,8 +45,8 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
appBar: AppBar(
title: Text(l10n.importAccountPageTitle),
),
body: SafeArea(
child: Center(
body: Center(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 40),
child: Column(

View File

@@ -1,4 +1,3 @@
import 'dart:math';
import "package:ente_auth/l10n/l10n.dart";
@@ -10,7 +9,7 @@ import 'package:qr_flutter/qr_flutter.dart';
class ViewQrPage extends StatelessWidget {
final Code? code;
ViewQrPage({this.code, Key? key}) : super(key: key);
ViewQrPage({this.code, super.key});
@override
Widget build(BuildContext context) {
@@ -22,15 +21,22 @@ class ViewQrPage extends StatelessWidget {
appBar: AppBar(
title: Text(l10n.qrCode),
),
body: SafeArea(
child: Center(
body: Center(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 40),
child: Column(
children: [
QrImage(
QrImageView(
data: code!.rawData,
foregroundColor: Theme.of(context).colorScheme.onBackground,
eyeStyle: QrEyeStyle(
eyeShape: QrEyeShape.square,
color: Theme.of(context).colorScheme.onBackground,
),
dataModuleStyle: QrDataModuleStyle(
dataModuleShape: QrDataModuleShape.square,
color: Theme.of(context).colorScheme.onBackground,
),
version: QrVersions.auto,
size: qrSize,
),

View File

@@ -15,9 +15,8 @@ import 'package:ente_auth/models/authenticator/entity_result.dart';
import 'package:ente_auth/models/authenticator/local_auth_entity.dart';
import 'package:ente_auth/store/authenticator_db.dart';
import 'package:ente_auth/store/offline_authenticator_db.dart';
import 'package:ente_auth/utils/crypto_util.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_sodium/flutter_sodium.dart';
import 'package:logging/logging.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -75,10 +74,10 @@ class AuthenticatorService {
final key = await getOrCreateAuthDataKey(mode);
for (LocalAuthEntity e in result) {
try {
final decryptedValue = await CryptoUtil.decryptChaCha(
Sodium.base642bin(e.encryptedData),
final decryptedValue = await CryptoUtil.decryptData(
CryptoUtil.base642bin(e.encryptedData),
key,
Sodium.base642bin(e.header),
CryptoUtil.base642bin(e.header),
);
final hasSynced = !(e.id == null || e.shouldSync);
entities.add(
@@ -101,12 +100,13 @@ class AuthenticatorService {
AccountMode accountMode,
) async {
var key = await getOrCreateAuthDataKey(accountMode);
final encryptedKeyData = await CryptoUtil.encryptChaCha(
utf8.encode(plainText) as Uint8List,
final encryptedKeyData = await CryptoUtil.encryptData(
utf8.encode(plainText),
key,
);
String encryptedData = Sodium.bin2base64(encryptedKeyData.encryptedData!);
String header = Sodium.bin2base64(encryptedKeyData.header!);
String encryptedData =
CryptoUtil.bin2base64(encryptedKeyData.encryptedData!);
String header = CryptoUtil.bin2base64(encryptedKeyData.header!);
final insertedID = accountMode.isOnline
? await _db.insert(encryptedData, header)
: await _offlineDb.insert(encryptedData, header);
@@ -123,12 +123,13 @@ class AuthenticatorService {
AccountMode accountMode,
) async {
var key = await getOrCreateAuthDataKey(accountMode);
final encryptedKeyData = await CryptoUtil.encryptChaCha(
utf8.encode(plainText) as Uint8List,
final encryptedKeyData = await CryptoUtil.encryptData(
utf8.encode(plainText),
key,
);
String encryptedData = Sodium.bin2base64(encryptedKeyData.encryptedData!);
String header = Sodium.bin2base64(encryptedKeyData.header!);
String encryptedData =
CryptoUtil.bin2base64(encryptedKeyData.encryptedData!);
String header = CryptoUtil.bin2base64(encryptedKeyData.header!);
final int affectedRows = accountMode.isOnline
? await _db.updateEntry(generatedID, encryptedData, header)
: await _offlineDb.updateEntry(generatedID, encryptedData, header);
@@ -191,25 +192,25 @@ class AuthenticatorService {
Future<void> _remoteToLocalSync() async {
_logger.info('Initiating remote to local sync');
final int lastSyncTime = _prefs.getInt(_lastEntitySyncTime) ?? 0;
_logger.info("Current sync is " + lastSyncTime.toString());
_logger.info("Current sync is $lastSyncTime");
const int fetchLimit = 500;
final List<AuthEntity> result =
await _gateway.getDiff(lastSyncTime, limit: fetchLimit);
_logger.info(result.length.toString() + " entries fetched from remote");
_logger.info("${result.length} entries fetched from remote");
if (result.isEmpty) {
return;
}
final maxSyncTime = result.map((e) => e.updatedAt).reduce(max);
List<String> deletedIDs =
result.where((element) => element.isDeleted).map((e) => e.id).toList();
_logger.info(deletedIDs.length.toString() + " entries deleted");
_logger.info("${deletedIDs.length} entries deleted");
result.removeWhere((element) => element.isDeleted);
await _db.insertOrReplace(result);
if (deletedIDs.isNotEmpty) {
await _db.deleteByIDs(ids: deletedIDs);
}
await _prefs.setInt(_lastEntitySyncTime, maxSyncTime);
_logger.info("Setting synctime to " + maxSyncTime.toString());
_logger.info("Setting synctime to $maxSyncTime");
if (result.length == fetchLimit) {
_logger.info("Diff limit reached, pulling again");
await _remoteToLocalSync();
@@ -223,7 +224,7 @@ class AuthenticatorService {
.where((element) => element.shouldSync || element.id == null)
.toList();
_logger.info(
pendingUpdate.length.toString() + " entries to be updated at remote",
"${pendingUpdate.length} entries to be updated at remote",
);
for (LocalAuthEntity entity in pendingUpdate) {
if (entity.id == null) {
@@ -262,21 +263,21 @@ class AuthenticatorService {
try {
final AuthKey response = await _gateway.getKey();
final authKey = CryptoUtil.decryptSync(
Sodium.base642bin(response.encryptedKey),
CryptoUtil.base642bin(response.encryptedKey),
_config.getKey()!,
Sodium.base642bin(response.header),
CryptoUtil.base642bin(response.header),
);
await _config.setAuthSecretKey(Sodium.bin2base64(authKey));
await _config.setAuthSecretKey(CryptoUtil.bin2base64(authKey));
return authKey;
} on AuthenticatorKeyNotFound catch (e) {
_logger.info("AuthenticatorKeyNotFound generating key ${e.stackTrace}");
final key = CryptoUtil.generateKey();
final encryptedKeyData = CryptoUtil.encryptSync(key, _config.getKey()!);
await _gateway.createKey(
Sodium.bin2base64(encryptedKeyData.encryptedData!),
Sodium.bin2base64(encryptedKeyData.nonce!),
CryptoUtil.bin2base64(encryptedKeyData.encryptedData!),
CryptoUtil.bin2base64(encryptedKeyData.nonce!),
);
await _config.setAuthSecretKey(Sodium.bin2base64(key));
await _config.setAuthSecretKey(CryptoUtil.bin2base64(key));
return key;
} catch (e, s) {
_logger.severe("Failed to getOrCreateAuthDataKey", e, s);

View File

@@ -50,7 +50,7 @@ class BillingService {
Future<Response<dynamic>> _fetchPrivateBillingPlans() {
return _dio.get(
_config.getHttpEndpoint() + "/billing/user-plans/",
"${_config.getHttpEndpoint()}/billing/user-plans/",
options: Options(
headers: {
"X-Auth-Token": _config.getToken(),
@@ -60,7 +60,7 @@ class BillingService {
}
Future<Response<dynamic>> _fetchPublicBillingPlans() {
return _dio.get(_config.getHttpEndpoint() + "/billing/plans/v2");
return _dio.get("${_config.getHttpEndpoint()}/billing/plans/v2");
}
Future<Subscription> verifySubscription(
@@ -70,7 +70,7 @@ class BillingService {
}) async {
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/billing/verify-subscription",
"${_config.getHttpEndpoint()}/billing/verify-subscription",
data: {
"paymentProvider": paymentProvider ??
(Platform.isAndroid ? "playstore" : "appstore"),
@@ -84,7 +84,7 @@ class BillingService {
),
);
return Subscription.fromMap(response.data["subscription"]);
} on DioError catch (e) {
} on DioException catch (e) {
if (e.response != null && e.response!.statusCode == 409) {
throw SubscriptionAlreadyClaimedError();
} else {
@@ -100,7 +100,7 @@ class BillingService {
if (_cachedSubscription == null) {
try {
final response = await _dio.get(
_config.getHttpEndpoint() + "/billing/subscription",
"${_config.getHttpEndpoint()}/billing/subscription",
options: Options(
headers: {
"X-Auth-Token": _config.getToken(),
@@ -109,7 +109,7 @@ class BillingService {
);
_cachedSubscription =
Subscription.fromMap(response.data["subscription"]);
} on DioError catch (e, s) {
} on DioException catch (e, s) {
_logger.severe(e, s);
rethrow;
}
@@ -120,7 +120,7 @@ class BillingService {
Future<Subscription> cancelStripeSubscription() async {
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/billing/stripe/cancel-subscription",
"${_config.getHttpEndpoint()}/billing/stripe/cancel-subscription",
options: Options(
headers: {
"X-Auth-Token": _config.getToken(),
@@ -129,7 +129,7 @@ class BillingService {
);
final subscription = Subscription.fromMap(response.data["subscription"]);
return subscription;
} on DioError catch (e, s) {
} on DioException catch (e, s) {
_logger.severe(e, s);
rethrow;
}
@@ -138,7 +138,7 @@ class BillingService {
Future<Subscription> activateStripeSubscription() async {
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/billing/stripe/activate-subscription",
"${_config.getHttpEndpoint()}/billing/stripe/activate-subscription",
options: Options(
headers: {
"X-Auth-Token": _config.getToken(),
@@ -147,7 +147,7 @@ class BillingService {
);
final subscription = Subscription.fromMap(response.data["subscription"]);
return subscription;
} on DioError catch (e, s) {
} on DioException catch (e, s) {
_logger.severe(e, s);
rethrow;
}
@@ -158,7 +158,7 @@ class BillingService {
}) async {
try {
final response = await _dio.get(
_config.getHttpEndpoint() + "/billing/stripe/customer-portal",
"${_config.getHttpEndpoint()}/billing/stripe/customer-portal",
queryParameters: {
"redirectURL": kWebPaymentRedirectUrl,
},
@@ -169,7 +169,7 @@ class BillingService {
),
);
return response.data["url"];
} on DioError catch (e, s) {
} on DioException catch (e, s) {
_logger.severe(e, s);
rethrow;
}

View File

@@ -1,15 +1,21 @@
import 'dart:io';
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/ui/tools/app_lock.dart';
import 'package:ente_auth/utils/auth_util.dart';
import 'package:ente_auth/utils/dialog_util.dart';
import 'package:ente_auth/utils/toast_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_local_authentication/flutter_local_authentication.dart';
import 'package:local_auth/local_auth.dart';
import 'package:logging/logging.dart';
class LocalAuthenticationService {
LocalAuthenticationService._privateConstructor();
static final LocalAuthenticationService instance =
LocalAuthenticationService._privateConstructor();
final logger = Logger((LocalAuthenticationService).toString());
Future<bool> requestLocalAuthentication(
BuildContext context,
@@ -38,7 +44,7 @@ class LocalAuthenticationService {
String errorDialogContent, [
String errorDialogTitle = "",
]) async {
if (await LocalAuthentication().isDeviceSupported()) {
if (await _isLocalAuthSupportedOnDevice()) {
AppLock.of(context)!.disable();
final result = await requestAuthentication(
context,
@@ -65,6 +71,12 @@ class LocalAuthenticationService {
}
Future<bool> _isLocalAuthSupportedOnDevice() async {
return await LocalAuthentication().isDeviceSupported();
try {
return Platform.isMacOS || Platform.isLinux
? await FlutterLocalAuthentication().canAuthenticate()
: await LocalAuthentication().isDeviceSupported();
} on MissingPluginException {
return false;
}
}
}

View File

@@ -27,8 +27,7 @@ class NotificationService {
_flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>();
if (implementation != null) {
// ignore: unawaited_futures
implementation.requestPermission();
await implementation.requestNotificationsPermission();
}
}

View File

@@ -4,6 +4,7 @@ import 'dart:io';
import 'package:ente_auth/core/constants.dart';
import 'package:ente_auth/core/network.dart';
import 'package:ente_auth/services/notification_service.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:logging/logging.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -130,7 +131,8 @@ class UpdateService {
bool isIndependent() {
return flavor == "independent" ||
_packageInfo.packageName.endsWith("independent");
_packageInfo.packageName.endsWith("independent") ||
PlatformUtil.isDesktop();
}
}
@@ -141,6 +143,7 @@ class LatestVersionInfo {
final bool? shouldForceUpdate;
final int lastSupportedVersionCode;
final String? url;
final String? release;
final int? size;
final bool? shouldNotify;
@@ -151,6 +154,7 @@ class LatestVersionInfo {
this.shouldForceUpdate,
this.lastSupportedVersionCode,
this.url,
this.release,
this.size,
this.shouldNotify,
);
@@ -163,6 +167,7 @@ class LatestVersionInfo {
map['shouldForceUpdate'],
map['lastSupportedVersionCode'] ?? 1,
map['url'],
map['release'],
map['size'],
map['shouldNotify'],
);

View File

@@ -96,7 +96,7 @@ class UserRemoteFlagService {
queryParams["defaultValue"] = defaultValue;
}
final response = await _dio.get(
_config.getHttpEndpoint() + "/remote-store",
"${_config.getHttpEndpoint()}/remote-store",
queryParameters: queryParams,
options: Options(
headers: {
@@ -119,7 +119,7 @@ class UserRemoteFlagService {
Future<void> _updateKeyValue(String key, String value) async {
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/remote-store/update",
"${_config.getHttpEndpoint()}/remote-store/update",
data: {
"key": key,
"value": value,

View File

@@ -30,9 +30,9 @@ import 'package:ente_auth/ui/home_page.dart';
import 'package:ente_auth/ui/passkey_page.dart';
import 'package:ente_auth/ui/two_factor_authentication_page.dart';
import 'package:ente_auth/ui/two_factor_recovery_page.dart';
import 'package:ente_auth/utils/crypto_util.dart';
import 'package:ente_auth/utils/dialog_util.dart';
import 'package:ente_auth/utils/toast_util.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import "package:flutter/foundation.dart";
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
@@ -80,7 +80,7 @@ class UserService {
await dialog.show();
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/users/ott",
"${_config.getHttpEndpoint()}/users/ott",
data: {"email": email, "purpose": isChangeEmail ? "change" : ""},
);
await dialog.hide();
@@ -102,7 +102,7 @@ class UserService {
return;
}
unawaited(showGenericErrorDialog(context: context));
} on DioError catch (e) {
} on DioException catch (e) {
await dialog.hide();
_logger.info(e);
if (e.response != null && e.response!.statusCode == 403) {
@@ -129,7 +129,7 @@ class UserService {
String type = "SubCancellation",
}) async {
await _dio.post(
_config.getHttpEndpoint() + "/anonymous/feedback",
"${_config.getHttpEndpoint()}/anonymous/feedback",
data: {"feedback": feedback, "type": "type"},
);
}
@@ -173,7 +173,7 @@ class UserService {
try {
final response = await _enteDio.get("/users/sessions");
return Sessions.fromMap(response.data);
} on DioError catch (e) {
} on DioException catch (e) {
_logger.info(e);
rethrow;
}
@@ -187,7 +187,7 @@ class UserService {
"token": token,
},
);
} on DioError catch (e) {
} on DioException catch (e) {
_logger.info(e);
rethrow;
}
@@ -196,7 +196,7 @@ class UserService {
Future<void> leaveFamilyPlan() async {
try {
await _enteDio.delete("/family/leave");
} on DioError catch (e) {
} on DioException catch (e) {
_logger.warning('failed to leave family plan', e);
rethrow;
}
@@ -306,11 +306,11 @@ class UserService {
"ott": ott,
};
if (!_config.isLoggedIn()) {
verifyData["source"] = 'auth:' + _getRefSource();
verifyData["source"] = 'auth:${_getRefSource()}';
}
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/users/verify-email",
"${_config.getHttpEndpoint()}/users/verify-email",
data: verifyData,
);
await dialog.hide();
@@ -346,7 +346,7 @@ class UserService {
// should never reach here
throw Exception("unexpected response during email verification");
}
} on DioError catch (e) {
} on DioException catch (e) {
_logger.info(e);
await dialog.hide();
if (e.response != null && e.response!.statusCode == 410) {
@@ -410,7 +410,7 @@ class UserService {
context.l10n.oops,
context.l10n.verificationFailedPleaseTryAgain,
);
} on DioError catch (e) {
} on DioException catch (e) {
await dialog.hide();
if (e.response != null && e.response!.statusCode == 403) {
// ignore: unawaited_futures
@@ -460,7 +460,7 @@ class UserService {
Future<SrpAttributes> getSrpAttributes(String email) async {
try {
final response = await _dio.get(
_config.getHttpEndpoint() + "/users/srp/attributes",
"${_config.getHttpEndpoint()}/users/srp/attributes",
queryParameters: {
"email": email,
},
@@ -470,7 +470,7 @@ class UserService {
} else {
throw Exception("get-srp-attributes action failed");
}
} on DioError catch (e) {
} on DioException catch (e) {
if (e.response != null && e.response!.statusCode == 404) {
throw SrpSetupNotCompleteError();
}
@@ -523,7 +523,7 @@ class UserService {
// ignore: need to calculate secret to get M1, unused_local_variable
final clientS = client.calculateSecret(serverB);
final clientM = client.calculateClientEvidenceMessage();
// ignore: unused_local_variable
late Response _;
if (setKeysRequest == null) {
_ = await _enteDio.post(
@@ -573,7 +573,7 @@ class UserService {
late Uint8List keyEncryptionKey;
_logger.finest('Start deriving key');
keyEncryptionKey = await CryptoUtil.deriveKey(
utf8.encode(userPassword) as Uint8List,
utf8.encode(userPassword),
CryptoUtil.base642bin(srpAttributes.kekSalt),
srpAttributes.memLimit,
srpAttributes.opsLimit,
@@ -596,7 +596,7 @@ class UserService {
final A = client.generateClientCredentials(salt, identity, password);
final createSessionResponse = await _dio.post(
_config.getHttpEndpoint() + "/users/srp/create-session",
"${_config.getHttpEndpoint()}/users/srp/create-session",
data: {
"srpUserID": srpAttributes.srpUserID,
"srpA": base64Encode(SRP6Util.encodeBigInt(A!)),
@@ -610,7 +610,7 @@ class UserService {
final clientS = client.calculateSecret(serverB);
final clientM = client.calculateClientEvidenceMessage();
final response = await _dio.post(
_config.getHttpEndpoint() + "/users/srp/verify-session",
"${_config.getHttpEndpoint()}/users/srp/verify-session",
data: {
"sessionID": sessionID,
"srpUserID": srpAttributes.srpUserID,
@@ -709,7 +709,7 @@ class UserService {
await dialog.show();
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/users/two-factor/verify",
"${_config.getHttpEndpoint()}/users/two-factor/verify",
data: {
"sessionID": sessionID,
"code": code,
@@ -729,7 +729,7 @@ class UserService {
(route) => route.isFirst,
);
}
} on DioError catch (e) {
} on DioException catch (e) {
await dialog.hide();
_logger.severe(e);
if (e.response != null && e.response!.statusCode == 404) {
@@ -772,7 +772,7 @@ class UserService {
await dialog.show();
try {
final response = await _dio.get(
_config.getHttpEndpoint() + "/users/two-factor/recover",
"${_config.getHttpEndpoint()}/users/two-factor/recover",
queryParameters: {
"sessionID": sessionID,
"twoFactorType": twoFactorTypeToString(type),
@@ -794,7 +794,7 @@ class UserService {
(route) => route.isFirst,
);
}
} on DioError catch (e) {
} on DioException catch (e) {
await dialog.hide();
_logger.severe(e);
if (e.response != null && e.response!.statusCode == 404) {
@@ -868,7 +868,7 @@ class UserService {
}
try {
final response = await _dio.post(
_config.getHttpEndpoint() + "/users/two-factor/remove",
"${_config.getHttpEndpoint()}/users/two-factor/remove",
data: {
"sessionID": sessionID,
"secret": secret,
@@ -891,7 +891,7 @@ class UserService {
(route) => route.isFirst,
);
}
} on DioError catch (e) {
} on DioException catch (e) {
await dialog.hide();
_logger.severe(e);
if (e.response != null && e.response!.statusCode == 404) {

View File

@@ -0,0 +1,36 @@
import 'dart:async';
import 'dart:ui';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:window_manager/window_manager.dart';
class WindowListenerService {
late SharedPreferences _preferences;
WindowListenerService._privateConstructor();
static final WindowListenerService instance =
WindowListenerService._privateConstructor();
Future<void> init() async {
_preferences = await SharedPreferences.getInstance();
}
Size getWindowSize() {
final double windowWidth = _preferences.getDouble('windowWidth') ?? 450.0;
final double windowHeight = _preferences.getDouble('windowHeight') ?? 800.0;
return Size(windowWidth, windowHeight);
}
Future<void> onWindowResize() async {
// Save the window size to shared preferences
await _preferences.setDouble(
'windowWidth',
(await windowManager.getSize()).width,
);
await _preferences.setDouble(
'windowHeight',
(await windowManager.getSize()).height,
);
}
}

View File

@@ -3,10 +3,12 @@ import 'dart:io';
import 'package:ente_auth/models/authenticator/auth_entity.dart';
import 'package:ente_auth/models/authenticator/local_auth_entity.dart';
import 'package:ente_auth/utils/directory_utils.dart';
import 'package:flutter/foundation.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
import 'package:sqflite/sqflite.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
class AuthenticatorDB {
static const _databaseName = "ente.authenticator.db";
@@ -25,6 +27,16 @@ class AuthenticatorDB {
}
Future<Database> _initDatabase() async {
if (Platform.isWindows || Platform.isLinux) {
var databaseFactory = databaseFactoryFfi;
return await databaseFactory.openDatabase(
await DirectoryUtils.getDatabasePath(_databaseName),
options: OpenDatabaseOptions(
version: _databaseVersion,
onCreate: _onCreate,
),
);
}
final Directory documentsDirectory =
await getApplicationDocumentsDirectory();
final String path = join(documentsDirectory.path, _databaseName);
@@ -166,7 +178,7 @@ class AuthenticatorDB {
batch.delete(entityTable, where: whereID, whereArgs: [id]);
}
}
await batch.commit();
final _ = await batch.commit();
debugPrint("Done");
}

View File

@@ -3,10 +3,11 @@ import 'dart:io';
import 'package:ente_auth/models/authenticator/auth_entity.dart';
import 'package:ente_auth/models/authenticator/local_auth_entity.dart';
import 'package:ente_auth/utils/directory_utils.dart';
import 'package:flutter/foundation.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
import 'package:sqflite/sqflite.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
class OfflineAuthenticatorDB {
static const _databaseName = "ente.offline_authenticator.db";
@@ -26,6 +27,16 @@ class OfflineAuthenticatorDB {
}
Future<Database> _initDatabase() async {
if (Platform.isWindows || Platform.isLinux) {
var databaseFactory = databaseFactoryFfi;
return await databaseFactory.openDatabase(
await DirectoryUtils.getDatabasePath(_databaseName),
options: OpenDatabaseOptions(
version: _databaseVersion,
onCreate: _onCreate,
),
);
}
final Directory documentsDirectory =
await getApplicationDocumentsDirectory();
final String path = join(documentsDirectory.path, _databaseName);
@@ -152,7 +163,7 @@ class OfflineAuthenticatorDB {
batch.delete(entityTable, where: whereID, whereArgs: [id]);
}
}
await batch.commit();
final _ = await batch.commit();
debugPrint("Done");
}

View File

@@ -204,6 +204,7 @@ const Color _warning700 = Color.fromRGBO(234, 63, 63, 1);
const Color _warning500 = Color.fromRGBO(255, 101, 101, 1);
const Color _warning800 = Color(0xFFF53434);
const Color warning500 = Color.fromRGBO(255, 101, 101, 1);
// ignore: unused_element
const Color _warning400 = Color.fromRGBO(255, 111, 111, 1);
const Color _caution500 = Color.fromRGBO(255, 194, 71, 1);

View File

@@ -5,7 +5,7 @@ import 'package:ente_auth/utils/email_util.dart';
import 'package:flutter/material.dart';
class ChangeEmailDialog extends StatefulWidget {
const ChangeEmailDialog({Key? key}) : super(key: key);
const ChangeEmailDialog({super.key});
@override
State<ChangeEmailDialog> createState() => _ChangeEmailDialogState();

View File

@@ -7,15 +7,15 @@ import 'package:ente_auth/services/local_authentication_service.dart';
import 'package:ente_auth/services/user_service.dart';
import 'package:ente_auth/ui/common/dialogs.dart';
import 'package:ente_auth/ui/common/gradient_button.dart';
import 'package:ente_auth/utils/crypto_util.dart';
import 'package:ente_auth/utils/email_util.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter/material.dart';
import 'package:flutter_sodium/flutter_sodium.dart';
class DeleteAccountPage extends StatelessWidget {
const DeleteAccountPage({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {
@@ -150,6 +150,8 @@ class DeleteAccountPage extends StatelessWidget {
l10n.initiateAccountDeleteTitle,
);
await PlatformUtil.refocusWindows();
if (hasAuthenticated) {
final choice = await showChoiceDialogOld(
context,
@@ -164,8 +166,10 @@ class DeleteAccountPage extends StatelessWidget {
return;
}
final decryptChallenge = CryptoUtil.openSealSync(
Sodium.base642bin(response.encryptedChallenge),
Sodium.base642bin(Configuration.instance.getKeyAttributes()!.publicKey),
CryptoUtil.base642bin(response.encryptedChallenge),
CryptoUtil.base642bin(
Configuration.instance.getKeyAttributes()!.publicKey,
),
Configuration.instance.getSecretKey()!,
);
final challengeResponseStr = utf8.decode(decryptChallenge);

Some files were not shown because too many files have changed in this diff Show More