Commit graph

601 commits

Author SHA1 Message Date
Manav Rathi 3ea4879cf0
Remove text qualifier
The type already enforces that. And it reads better and the call sites this way.
2024-04-15 12:20:41 +05:30
Manav Rathi 73ef03a5d9
Move read/write whole files into fs 2024-04-15 12:17:33 +05:30
Manav Rathi 896cf0f785
Disable full file caches for now
This is only needed for ML indexing, let us revisit this once the ML flow is
done instead of adding a premature and possibly disk-space heavy optimization.
2024-04-15 11:50:23 +05:30
Manav Rathi 95c0f53d21
Preserve parameters
This was needed for the purchase success to be relayed back.
2024-04-15 10:59:07 +05:30
Manav Rathi 8d24a489f6
[desktop] Fix payment redirect
Fixes: https://github.com/ente-io/ente/issues/1440

There were two issues:

- It was a backward incompatible change to change the scheme from ente:// to
  next://. Revert.

- We also need to setup a top level redirect when the user presses back without
  making any changes to their subscription.

**Tested by**

Running payments app and desktop app locally, and verifying that after
interactions with the payments endpoint we go back to the desktop app's actual
contents correctly.
2024-04-15 10:47:14 +05:30
Manav Rathi bcfd144ce9
[web] Use the public link origin provided by the server
When implementing https://github.com/ente-io/ente/pull/1443 it was found that
the Photos web app wasnt' using the sharedCollectionUrl prefix that is returned
by the server. Instead, it was using NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT as the
baseHost, while mobile client completely rely on the server for returning the
correct hostUrl.

**Tested by**

Running against the modified server, and verifying that changes to
apps.public-albums were being used.
2024-04-15 09:57:01 +05:30
Manav Rathi 18ac361688
Remove unused IPC method 2024-04-14 20:11:25 +05:30
Manav Rathi 87077417a2
Remove dup 2024-04-14 20:07:17 +05:30
Manav Rathi d0ac3ea9ca
Remove newly dead code 2024-04-14 20:00:59 +05:30
Manav Rathi a5f9fdd10d
Restructure selection 2024-04-14 19:59:13 +05:30
Manav Rathi 881a963fde
Inline 2024-04-14 19:46:26 +05:30
Manav Rathi f9560ec533
Inline 2024-04-14 19:43:31 +05:30
Manav Rathi 22616bb77d
Remove top level error suppressors 2024-04-14 19:42:30 +05:30
Manav Rathi 4d19c46d7c
Replace exception handling for control flow 2024-04-14 19:39:35 +05:30
Manav Rathi cc323905d5
Another 2024-04-14 19:33:49 +05:30
Manav Rathi fca4b2aca6
Use also for the image 2024-04-14 19:29:22 +05:30
Manav Rathi c4ac5e39a2
Refactor 2024-04-14 19:25:01 +05:30
Manav Rathi 28574e516d
[desktop] Fix export related IPC - Part 3/x (#1439) 2024-04-14 19:04:38 +05:30
Manav Rathi 22f221d481
Extract 2024-04-14 18:36:36 +05:30
Manav Rathi eb64a00ed2
Remove unnecessary checks
It is simpler for us to parallel the rm command than our bespoke variant.
2024-04-14 18:22:46 +05:30
Manav Rathi 59b9e3e586
Move into fs 2024-04-14 18:12:19 +05:30
daviddeepan 2a9060bd39 css-alignment-issue-page-gallery 2024-04-14 13:53:00 +05:30
Manav Rathi adb37f38e4
Shorten 2024-04-14 10:31:45 +05:30
Manav Rathi 14922b65f8
Inline 2024-04-14 10:28:27 +05:30
Manav Rathi 7438c3301e
Move mkdirIfNeeded into fs 2024-04-14 10:25:28 +05:30
Manav Rathi 0e8678715a
Remove layer 2024-04-14 10:03:16 +05:30
Manav Rathi 3824ebe91a
Remove exportService indirection 2024-04-14 09:57:58 +05:30
Manav Rathi ea34eebfc9
Remove implicit electron dependency 2024-04-14 09:53:18 +05:30
Manav Rathi eeb1952585
Use 2024-04-14 09:30:51 +05:30
Manav Rathi 72dd47fa7b
Audit rename 2024-04-14 09:27:52 +05:30
Manav Rathi 38db03c3a0
Start giving it more power 2024-04-13 21:50:56 +05:30
Manav Rathi e268b9204e
Inline 2024-04-13 21:46:34 +05:30
Manav Rathi acd50bb172
Inline 2024-04-13 21:39:36 +05:30
Manav Rathi 28d559bd84
Hoist 2024-04-13 21:35:58 +05:30
Manav Rathi e87c7ed108
Inline 2024-04-13 21:34:37 +05:30
Manav Rathi 67a81f8d86
Dedup 2024-04-13 21:31:36 +05:30
Manav Rathi 30f147ec5b
Update jsdoc 2024-04-13 21:26:00 +05:30
Manav Rathi 6829d0bf15
Remove unused 2024-04-13 21:24:52 +05:30
Manav Rathi d03b265eb4
Captialize
We've been capitalizing the name at places where we can. This name is only used
when creating new exports, and shouldn't effect existing export, so it is safe
to change.
2024-04-13 21:21:48 +05:30
Manav Rathi 297ca09535
Refactor and extract 2024-04-13 21:20:20 +05:30
Manav Rathi 82bbb1c6dd
Cleanup and document 2024-04-13 21:06:47 +05:30
Manav Rathi 4fbfbf0aa0
Cleanup 2024-04-13 20:53:35 +05:30
Manav Rathi 56d04066ea
sfn 2024-04-13 20:38:29 +05:30
Manav Rathi 7838f7484d
Make explicit 2024-04-13 20:29:17 +05:30
Manav Rathi c7757cb08e
Prune more stale overrides 2024-04-13 18:54:15 +05:30
Manav Rathi ce642e12c1
Remove stale disables 2024-04-13 18:50:12 +05:30
Manav Rathi e07559c8da
Fix oopsie 2024-04-13 18:41:47 +05:30
Manav Rathi 64231c73f1
[web] Add ESLint to enforce HMR how vite likes it
Configuration changes taken from the vite starter (react-ts).

From the vite docs (https://github.com/vitejs/vite-plugin-react-swc?tab=readme-ov-file#consistent-components-exports)

> For React refresh to work correctly, your file should only export React components.
>
> If an incompatible change in exports is found, the module will be invalidated.
> To make it easier to export simple constants alongside your component the module
> is only invalidated when their value changes.

While we're not currently using vite for our main apps, it would be worthwhile
to write code in a way that a future migration to it is painless if needed.

About the what and the why, the Gatsby docs are illuminating:
https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works

Some other refs:
- https://github.com/ArnaudBarre/eslint-plugin-react-refresh
- https://github.com/vitejs/vite/discussions/4577#discussioncomment-1161007
- https://github.com/vitejs/vite-plugin-react/issues/34
2024-04-13 18:38:24 +05:30
Manav Rathi 4f764dc77c
Consolidate constants 2024-04-13 18:27:40 +05:30
Manav Rathi 63a2ca7606
Fix lint 2024-04-13 18:24:57 +05:30
Manav Rathi eb995f4354
Split 2024-04-13 18:20:40 +05:30
Manav Rathi 37cb2aaaf9
Refactor 2024-04-13 18:09:32 +05:30
Manav Rathi 1ffa905f99
Inline 2 2024-04-13 17:00:50 +05:30
Manav Rathi 07fa5cb83d
Inline 2 2024-04-13 16:59:47 +05:30
Manav Rathi c90ba63aad
Inline 1 2024-04-13 16:57:04 +05:30
Manav Rathi 284d7920b3
Inline 2 2024-04-13 16:54:26 +05:30
Manav Rathi ca114a467d
Inline 1 2024-04-13 16:50:23 +05:30
Manav Rathi f7e961e86b
Inline 2024-04-13 16:44:55 +05:30
Manav Rathi 7deb0dca8e
Fix lint 2024-04-13 13:17:42 +05:30
Manav Rathi f2d3ec74a1
Granular migration 2024-04-13 13:12:16 +05:30
Manav Rathi 0f3b28a425
Revert "Recreate ML db"
This partially reverts commit 95a0e80c5b.
2024-04-13 12:56:21 +05:30
Manav Rathi 95a0e80c5b
Recreate ML db 2024-04-13 12:46:48 +05:30
Manav Rathi b50f8a8212
Promise 2024-04-13 10:35:20 +05:30
Manav Rathi edd9c94d73
URL => id, which is what it is 2024-04-13 10:32:40 +05:30
Manav Rathi d0dc8b1320
Dedup 2024-04-13 10:22:24 +05:30
Manav Rathi c0d95edac8
Inline 2 2024-04-13 10:19:16 +05:30
Manav Rathi f7ba28d1fb
Inline 1 2024-04-13 10:17:58 +05:30
Manav Rathi eef9bf1f26
Inline 2024-04-13 10:16:08 +05:30
Manav Rathi 75e693186a
Inline 2024-04-13 10:14:35 +05:30
Manav Rathi 02abe24213
Detect ML search status 2024-04-13 10:00:22 +05:30
Manav Rathi 5082124aa5
Cleanup 2024-04-13 09:44:06 +05:30
Manav Rathi 997c74d064
res2 2024-04-13 09:39:29 +05:30
Manav Rathi 9cf57c847e
Rely on global uncaught handler to log 2024-04-13 09:34:49 +05:30
Manav Rathi 9aaf6098b7
Use new APIs for file 2024-04-13 09:08:13 +05:30
Manav Rathi 4055f02a1d
Cleaner 2024-04-13 08:52:37 +05:30
Manav Rathi b32c13fe31
thumb2 2024-04-13 08:48:39 +05:30
Manav Rathi c52fd4383c
Nicer delete 2024-04-13 08:43:01 +05:30
Manav Rathi a86cdb1f1e
Interface 2024-04-13 08:40:08 +05:30
Manav Rathi 999f7e45c9
Remove unused param 2024-04-13 08:34:57 +05:30
Manav Rathi e8b779745d
put2 2024-04-13 08:33:13 +05:30
Manav Rathi f2aee30f7c
get 2024-04-13 08:18:11 +05:30
Manav Rathi db96a0eb1b
get 2024-04-13 08:12:38 +05:30
Manav Rathi 6d1f8b4728
Blobs it is 2024-04-13 08:04:43 +05:30
Manav Rathi acedbdbe7d
Note 2024-04-13 07:42:24 +05:30
Manav Rathi 6a3f4baed3
Enhance 2024-04-13 07:30:32 +05:30
Manav Rathi 6cd795e29c
Create alternate code path 2024-04-13 07:19:28 +05:30
Manav Rathi b5096b02da
Remove unused knob
Ref:
- https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties
2024-04-13 06:56:46 +05:30
Manav Rathi 3499e47c88
Tweak 2024-04-13 06:47:43 +05:30
Manav Rathi 5ff01c40d8
poc implementation 2024-04-12 21:29:05 +05:30
Manav Rathi 295c0aa82e
Splinter 2024-04-12 21:12:37 +05:30
Manav Rathi 871a0e83cf
Fix 2024-04-12 20:59:15 +05:30
Manav Rathi a56cf55ffa
Remove indirection 2024-04-12 20:58:00 +05:30
Manav Rathi b056cf7f56
Move to newer shared package 2024-04-12 20:55:07 +05:30
Manav Rathi a2a8be3b19
Scaffold the split 2024-04-12 20:52:33 +05:30
Manav Rathi 41472eb87d
Document and structure more 2024-04-12 20:24:48 +05:30
Manav Rathi c691ad2ac1
Document the plan 2024-04-12 20:11:44 +05:30
Manav Rathi 36f9ca2004
Remove unused param 2024-04-12 19:53:23 +05:30
Manav Rathi 65c7cd2c05
[web] Various changes, moving towards fixing desktop caching (#1424)
The overall aim was to get the caching layer trimmed down to a point
where we can plug in OPFS into it for desktop. This PR doesn't have that
specific change, but it's just me gradually changing things, working
towards that.
2024-04-12 16:28:59 +05:30
Manav Rathi b061b618e7
Tweaks 2024-04-12 16:16:02 +05:30
Manav Rathi 55632fff64
Use new method 2024-04-12 16:11:34 +05:30
Manav Rathi 401f879424
Consolidate 2024-04-12 16:08:36 +05:30
Manav Rathi b36175a779
user 2024-04-12 15:40:24 +05:30
Manav Rathi 158186290c
Inline 2024-04-12 15:03:53 +05:30
Manav Rathi 15b601b0ff
Inline and prune 2024-04-12 14:53:11 +05:30
Manav Rathi c83dc87d5d
Inline the factory 2024-04-12 14:45:03 +05:30
Manav Rathi 495ff99874
Replace enum with TS type 2024-04-12 14:41:33 +05:30
Manav Rathi cd3ff6f878
Delete is not needed outside 2024-04-12 14:32:50 +05:30
Manav Rathi b447dedf83
Cache limit is usused 2024-04-12 14:26:41 +05:30
Manav Rathi bdadc839e0
Remove firefox specific workaround
In a quick (but possibly incomplete) test I wasn't able to reproduce this in an
incognito window. Throwing the error from here has a potential for breaking
things though, I'll try to verify this as I go through the flows individually.
2024-04-12 14:23:56 +05:30
Manav Rathi a80ed32bc3
[web] New translations (#1419)
New translations from
[Crowdin](https://crowdin.com/project/ente-photos-web)
2024-04-12 13:20:52 +05:30
Manav Rathi 3e9bbacd2f
[docs] Add a FAQ for album sharing on self hosted instances 2024-04-12 11:30:35 +05:30
Crowdin Bot ac534cf163 New Crowdin translations by GitHub Action 2024-04-12 01:37:37 +00:00
Manav Rathi 7fa9e924eb
Consolidate 2024-04-11 20:57:54 +05:30
Manav Rathi 61143c9c62
Cleanup 2024-04-11 16:36:56 +05:30
Manav Rathi 33c84f7a08
Prevent undefined errors 2024-04-11 16:27:27 +05:30
Manav Rathi 320db9f8b7
Fix the putEmbeddings API calls for now 2024-04-11 16:22:38 +05:30
Manav Rathi e58e96091f
Ignore (expected) errors when trying to cache face crops 2024-04-11 16:15:08 +05:30
Manav Rathi ef4462553c
Fix incorrect typecheck that fails on undefined 2024-04-11 15:35:25 +05:30
Manav Rathi ff66a2f44c
The ML code runs in workers 2024-04-11 15:27:02 +05:30
Manav Rathi 33e3265db6
Migration for existing configs 2024-04-11 15:21:21 +05:30
Manav Rathi 52727f2255
Also move the embedding 2024-04-11 15:04:18 +05:30
Manav Rathi 9ff4989d81
Cleanup 2024-04-11 14:44:00 +05:30
Manav Rathi a1d6ef43b4
Roundtrip 2024-04-11 14:37:44 +05:30
Manav Rathi a88f551b6a
WIP IPC API 2024-04-11 13:58:52 +05:30
Manav Rathi 2bb9e77e34
Remove unused code 2024-04-11 13:46:34 +05:30
Manav Rathi 6d769773cc
tsc 2024-04-11 12:42:18 +05:30
Manav Rathi d0ffb83d90
Restore 2024-04-11 12:40:49 +05:30
Manav Rathi 6091ad9cfd
Remove search UI integration 2024-04-11 12:36:37 +05:30
Manav Rathi 4fff855070
lint-fix 2024-04-11 12:31:42 +05:30
Manav Rathi e52d17dcfc
Last tf 2024-04-11 12:30:07 +05:30
Manav Rathi 485a1e0be4
Remove unused code that required tensorflow 2024-04-11 12:29:06 +05:30
Manav Rathi da5edc610f
Remove more tf 2024-04-11 12:24:03 +05:30
Manav Rathi 1f8ebc0bca
Inline 2024-04-11 12:22:09 +05:30
Manav Rathi e57e44c139
Inline 2024-04-11 12:14:59 +05:30
Manav Rathi 6ba5852876
Prune 2024-04-11 12:10:02 +05:30
Manav Rathi 38e9e901f6
Inline 2024-04-11 12:06:50 +05:30
Manav Rathi 79a975a281
Remove various unused util methods 2024-04-11 12:05:09 +05:30
Manav Rathi ce566f522d
Prune 2024-04-11 11:59:36 +05:30
Manav Rathi d2e7925c63
Prune 2024-04-11 11:47:07 +05:30
Manav Rathi 006ea085fe
Prune 2024-04-11 11:43:05 +05:30
Manav Rathi 03df858dcc
Remove ssdMobileNetV2 2024-04-11 11:23:23 +05:30
Manav Rathi da3b58661a
Remove blazeface 2024-04-11 11:21:19 +05:30
Manav Rathi e6905577c6
Remove blazeface-back 2024-04-11 11:17:15 +05:30
Manav Rathi e7902c5d83
Remove more tf 2024-04-11 11:15:15 +05:30
Manav Rathi 3182d67ca1
Remove tf utils 2024-04-11 11:13:52 +05:30
Manav Rathi 1ad5cb83f9
Remove object detection related code 2024-04-11 11:09:32 +05:30
Manav Rathi b6e1c4d3da
Inline 2024-04-10 21:36:43 +05:30
Manav Rathi 0ee416c91b
git rm -r apps/photos/public/js/{tesseract,tfjs,tflite} 2024-04-10 21:32:22 +05:30
Manav Rathi 3e8d88caf2
git rm -r apps/photos/public/models 2024-04-10 21:31:06 +05:30
Manav Rathi 52342a23cb
Remove tensorflow packages
yarn workspace photos remove "@tensorflow-models/coco-ssd" "@tensorflow/tfjs-backend-cpu" "@tensorflow/tfjs-backend-webgl" "@tensorflow/tfjs-converter" "@tensorflow/tfjs-core" "@tensorflow/tfjs-tflite"
2024-04-10 21:29:23 +05:30