Commit graph

982 commits

Author SHA1 Message Date
jake e2a0878e7a
[ENG-1068] Plus codes / Open Location Code support (#1324)
* bring in rand deps

* SUPER crude pluscode attempt

* working pluscodes!

* some cleanup

* `encodeURIComponent` for URL escaping

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-09-11 04:34:24 +00:00
jake d435141496
[ENG-1084] Correctly format Orientation EXIF data in the UI (#1313)
* impl `Display` and a custom serde serializer

* remove the + as rust already shortens coords to 8SF

* remove manual serde impl and string conversion

* add `formatOrientation` to the `MediaData` part of the inspector

* make requested changes

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-09-08 12:21:32 +00:00
Brendan Allan 4b60ff2e08
[ENG-1023] Change location path from settings page (#1301)
* update location path in db

* remove + add location watcher if path is changed

---------

Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-09-08 11:46:16 +00:00
nikec 99ccb8f8c7
[ENG-972] quick view improvements (#1233)
* quick preview improvements

* fix ts

* improvements

* fix merge

* non-indexed support

* Update index.tsx

* Update pnpm-lock.yaml

* update quick preview

* sidebar icon weight

* fix thumb

* ts

* fix focus

* remove usePortal

* quick preview store

* Update index.tsx

* Update index.tsx

* cleanup

* add tooltip to name

* hide nav buttons and match explorer nav buttons

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-09-08 11:45:37 +00:00
Oscar Beaumont 3d0ca4ff1a
Improve Location Formatting in UI (#1315)
make it betterer
2023-09-08 05:36:40 +00:00
jake d8ae7ac66f
fix: remove the git submodule for test-files (#1311)
remove the git submodule for test-files
2023-09-07 14:13:01 +00:00
ameer2468 cafa022f2f
[ENG-1079] Toggle focus styling update (#1309)
updated focus styling
2023-09-07 11:29:36 +00:00
Ericson "Fogo" Soares f8033d1842
[ENG-941] Jobs running in another library do not appear in the job manager (#1306)
* Fetching job reports from all libraries
Some clippy warnings
pnpm format

* Reverting expects to unwraps
2023-09-07 04:15:31 +00:00
Oscar Beaumont 5a0d0396d0
[ENG-566] Stream files through P2P (#1282)
* Add range to `SpaceblockRequest`

* Determine if file should be served from P2P

* Feature flag serveFromP2P + fix `ServeFrom` logic

* wip: yeet files over P2P

* Just work, argh

* restore backend feature flags after restart

* cleanup
2023-09-06 07:22:04 +00:00
Brendan Allan 2d1ce9af03
[ENG-1078] Fix pagination (#1299)
* fix 'load more' breaking

* paginate all paginated queries by model id

* arrays start at 0 stupid
2023-09-05 08:11:04 +00:00
ameer2468 ad8814351f
[ENG-1044] Focus buttons styling + storybook (#1295)
* focus buttons styling improved + storybook

* Update Button.stories.tsx

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-09-04 16:59:43 +00:00
Brendan Allan e7fbdb479c
[ENG-999] Order aware pagination (#1283)
* correct types

* remove optional override

* handle group_directories properly

* throw errors if is_dir is null

* disable size ordering

* usePathsInfiniteQuery

* implement for objects too

* cleanup
2023-09-04 12:38:09 +00:00
Brendan Allan ae0f5c744e
[ENG-1072] Connect sentry with sourcemaps (#1293)
add sourcemaps
2023-09-04 11:20:29 +00:00
ameer2468 53828ce4d0
[ENG-1070] Dialog form button submit disabled if form is not valid (#1292)
* Feedback dialog cleanup, disable submit button of dialog if form not valid

* ts

* Update FeedbackDialog.tsx
2023-09-04 11:17:16 +00:00
Ericson "Fogo" Soares 3b8541ef54
[ENG-1028] Media data for ephemeral locations (#1287)
Introducing new getEphemeralMediaData
Fixing some minor stuff
Running pnpm format

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-09-04 08:28:45 +00:00
Ericson "Fogo" Soares 7ace99cf1c
[ENG-1063] Actually regenerate thumbnails on Regen Thumbnails button (#1288)
Done

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-09-02 23:15:41 +00:00
nikec e9acb3881c
[ENG-1038] toast improvements (#1285)
* toast improvements

* improved toast message

* fix types

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-09-01 17:14:28 +00:00
jake 3d344ce088
Fix dialog entry (#1284)
remove if valid `if` statement
2023-09-01 04:33:31 +00:00
ameer2468 0d5264a7c9
[ENG-809] Enter key submits dialog (#1279)
* enter key submit dialog

* code test

* input focus fix + dialog closes only if form is valid

* Update CreateDialog.tsx
2023-08-31 13:22:24 +00:00
nikec 87725d4b71
[ENG-991] copy location path indicator (#1276)
copy location path indicator
2023-08-30 14:36:36 +00:00
Oscar Beaumont e591516aff
[ENG-401] Spacedrop betterer (#1273)
* Spacedrop progress on `useP2PEvents`

* Spacedrop Tauri file picker for saving

* Prompt for save location when closing dialog

* quick maths

* Spacedrop progress

* Spacedrop cancellation

* Move accept/cancel dialog to toast

* Toast when rejecting transfer

* yeet

* `useEffect` more like `useBug`
2023-08-30 08:07:23 +00:00
Vítor Vasconcellos b2299ecee5
[ENG-1029] Fix pnpm assets gen not working with Prettier 3.0 (#1272)
Fix assets generation breaking due to prettier update to 3.0
 - Make assets generation async
 - Update prettier and babel deps
2023-08-30 03:44:02 +00:00
Vítor Vasconcellos cb6a356287
[ENG-1027] Fix build on Windows (#1271)
* Fix Vite relativeAliasResolver on Windows
 - Add Strawberry Perl installation to setup-system.ps1 (stop rust-analyzer from crashing on Windows)
 - Remove unused imports from desktop windows crate
 - Add todo for missing sync test match cases

* Use path.join instead of doing string concatenation with path.sep by hand
2023-08-30 03:26:13 +00:00
Utku c25823c5b5
Fix media processor job text (#1269)
fix
2023-08-29 18:16:16 +00:00
Oscar Beaumont d758977d82
Improve Sync + P2P Integration (#1265)
* Big bruh moment

* whoops

* Less stackoverflowy debug

* stuff

* Fix flawed P2P mDNS instance advertisements

* do sync when connecting with peer

* Sync after pairing

* resync_part2 all the time

* Invalidate all the things

* Invalidate whole React Query on sync event

* emit_messages_flag

* emit_messages_flag

* Backend feature flags + "emitSyncEvents" feature

* Patch `confirm` type cause Tauri cringe

* clippy

* idk but plz work

* bruh

* Fix ComLink bug

* remove log

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-29 17:54:58 +00:00
jake c674b7107a
[ENG-288, ENG-601] Media data (image) extraction, thumbnail orientation fix (#1099)
* basic layout

* lock

* add codec to image

* very messy wip

* rm that

* lock and toml

* working perfect exif extraction

* formatting

* migration and formatting

* mostly working

* fix

* set date created properly

* fix tsc

* working media data creation

* fix bad main merge? sorry brendan

* schema, migrations, bindings

* working exif data extraction

* why won't it work

* update migrations

* fix bad merge

* final cleanup

* cleanup migrations

* remove test (that was purely used for testing my code)

* working media data pulling, correct thumbnail orientation

* slightly optimise thumbnail rotation

* rename location to prevent specta clashes

* further improvements (location parsing is still broken)

* fix coordinate parsing i think

* rspc add some todos regarding final cleanup

* further thoughts

* major upgrades

* Some improved handling of errors and async calls

* accordion component

* heavily wip flash refactor

* fix builds all because of a (terrible) merge/move

* annoying missing newline

* i really hate exif

* remove dead code

* further flash progress :D

* docs(media-data): clarification

* minor cleanup

* cleanup and some async removal

* fix location parsing

* remove async (will do proper impl for async eventually) and major cleanup

* big W

* clippy and `FlashMode::Unknown` instead of `Invalid`

* add `NIKON` gps ref support

* comments about gps refs

* commit the submodule -_-

* major cleanup & composite image support

* remove old test image

* major cleanup and easier to use API

* remove old consts

* move `ExifReader` to dedicated module

* Media Data Extractor job and shallow job

* Extracting media data on watcher

* report no exif data on file gracefully

* cleanup errors and doctests

* Merging thumbnailer and media data extractor

* Job name and some strings in UI

* remove reliance on `sd-prisma` within the media data crate

* rename query to be more specific

* custom serializer for `MediaTime`

* tweak to format utc -> naive correctly

* generate migrations

* comment out duration in mobile

* delete test-assets folder

* all optional fields

* fix migrations again

* make requested name changes

* make further requested changes

* remove erroneous files from another wip branch

* updates procedures

* use strings where appropriate

* regen pnpm-lock

* add base layouts for video and audio media data

* use appropriate data types in schema and add audio media data framework

* make requested changes

* general cleanup and renaming of enum

* cleanup media data api

* rename media metadata type

* finishing touches

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-29 17:02:55 +00:00
Brendan Allan 795bb18d18
[ENG-1007] Per-page onboarding forms (#1256)
* useMultiZodForm

* fix imports

* handle obStore.data undefined

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-29 10:58:39 +00:00
Brendan Allan 5a8c5af964
[ENG-1009] Fetch item count to increase scrollbar size in explorer (#1258)
* search.objectsCount

* provide count to useExplorer and react-table

* use row count if custom count not provided

* remove placeholder items from list view
2023-08-28 08:28:52 +00:00
Oscar Beaumont 7bf0c0ae4a
[ENG-994] Minor P2P fixes (#1238)
* mdns advertisement on detection

* fix bug in P2P discovery

* Add `P2PEvent::ExpirePeer`

* React properly

* Consistent tracing versions

* better logger config

* Reduce excessive logging from P2P

* Fix panic log hook

* Remove `dbg`

* Fix bug in thumbnailer remover

* wip: Connected peers in UI

* `Sync` is large pain

* init services after library load

* improve error handling of logger

* Sync protocol shutdown

* Add "updater" feature

* fix commands bindings

* nlm state debug query

* nlm debug status

* Make TS happy

* Add `RemoteIdentity` to libraries debug info

* Improve debug data presentation

* Among us level sus

* minor fix panic hook

* Fix EOF issue

* fix instance not being added on pairing

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-08-27 06:41:26 +00:00
Brendan Allan 09857de4c8
[ENG-1004] Add offset pagination to search queries (#1255)
fix undefined cursors
2023-08-27 04:45:29 +00:00
Jamie Pine 0def8fb048
Revert "[ENG-1004] Add offset pagination capability to search queries… (#1254)
Revert "[ENG-1004] Add offset pagination capability to search queries (#1251)"

This reverts commit a5a25b1439.
2023-08-26 21:19:01 +00:00
Brendan Allan a5a25b1439
[ENG-1004] Add offset pagination capability to search queries (#1251)
Add offset pagination capability to search queries
2023-08-26 17:03:22 +00:00
Utku e2f30715e3
[MOB-2] Job Manager (#1114)
* add job manager modal and button

* cleanup directories and add card to debug screen

* expo sdk 49

* update pods

* updated native android files

* updated native ios files

* pods being cringe

* update hermes

* podfile

* big update packages

* fix and upgrade animations to reanimated 3

* nice types moti

* clean imports

* upgrade react-hook-form (fix type)

* move stuff to sd/client and some organization

* camel case

* i liek switch

* Merge iconImg & circleIcon props

* wip

* copy changes to mobile

* move job context and job progress to client and also use it on mobile

* pnpm-lock

* (wip) - make job swipeable + styling

* job progress bar and more style tweaks

* no spring animation on progress bar pls

* new loading animation

* padding and pnpm lock

* indeterminate progress bar

* cleanup & update packages etc

* leave some todos for future

* fix types

* monorepo types :)

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-08-25 21:40:07 +00:00
nikec 17de35baec
[ENG-1002] update executable icon (#1249)
update executable icon

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-08-25 20:24:48 +00:00
Jamie Pine b8a9d91d8a
[ENG-1001] Config Kind (#1248)
* config

* cleanup

* cleanup

* clsx
2023-08-25 16:27:54 +00:00
Brendan Allan f387f2f076
[ENG-992] Add search.pathsCount route (#1244)
search.pathsCount route

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-08-24 21:04:50 +00:00
Vítor Vasconcellos 7a7d01307e
Formatting (Prettier + Rustfmt 1.72) (#1246)
Formatting
2023-08-24 20:34:52 +00:00
Ericson "Fogo" Soares 28d106a2d5
[ENG-862, ENG-921] Ephemeral locations (#1092)
* Some initial drafts

* Finising the first draft on non-indexed locations

* Minor tweaks

* Fix warnings

* Adding date_created and date_modified to non indexed path entries

* Add id and path properties to NonIndexedPathItem

* Working ephemeral location (hardcoded home for now)

* Fix UI for ephemeral locations

* Fix windows

* Passing ephemeral thumbnails to thumbnails remover

* Indexing rules for ephemeral paths walking

* Animate Location button when path text overflow it's size

* Fix Linux not showing all volumes

* Fix Linux
 - Add some missing no_os_protected rules for macOS
 - Improve ephemeral location names

* Remove unecessary import

* Fix Mobile

* Improve resizing behaviour for ephemeral location topbar path button
 - Improve Search View (Replace custom empty component with Explorer's emptyNotice )
 - Improve how TopBar children positioning

* Hide EphemeralSection if there is no volume or home
 - Disable Ephemeral topbar path button animation when text is not overflowing

* minor fixes

* Introducing ordering for ephemeral paths

* TS Format

* Ephemeral locations UI fixes
 - Fix indexed Locations having no metadata
 - Remove date indexed/accessed options for sorting Ephemeral locations
 - Remove empty three dots from SideBar element when no settings is linked

* Add tooltip to add location button in ephemeral locations

* Fix indexed Locations selecting other folder/files in Ephemeral location

* Minor fixes

* Fix app breaking due to wrong logic to get item full path in Explorer

* Revert some recent changes to Thumb.tsx

* Fix original not loading for overview items
 - Fix QuickPreview name broken for overview items

* Improve imports

* Revert replace useEffect with useLayoutEffect for locked logic in ListView
It was causing the component to full reload when clicking a header to sort per column

* Changes from feedback

* Hide some unused Inspector metadata fields on NonIndexedPaths
 - Merge formatDate functions while retaining original behaviour

* Use tauri api for getting user home

* Change ThumbType to a string enum to allow for string comparisons

* Improve ObjectKind typing

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-08-23 17:26:07 +00:00
Utku 47af1a9080
Fix PDF icon and clean some svgs (#1239)
* clean icons

* few more

* Re-run generate script to remove references to non-existing asset files

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-08-23 12:46:56 +00:00
nikec 48adb2c732
[ENG-556] New toast component (#1235)
* toast

* remove useToasts

* toast improvements
2023-08-23 10:07:16 +00:00
jake 6acc47ef09
[ENG-980] Barebones, essential telemetry (#1237)
* rename everything to "full" telemetry and re-word onboarding

* impl the `ping` event every 4.5 mins, or on path change

* fix debug popover

* update mobile

* remove callback (and cargo lock update?)

* add to mobile, remove eslint ignore, remove console log

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-23 06:28:25 +00:00
Aditya e4b03619d2
[ENG-971] More File Icons (code extensions) (#1217)
* added bearded icons

* implemented bearded icons

* Made separate `LayeredFileIcon` component

* Delete index.tsx

* Update LayeredFileIcon.tsx

* Update LayeredFileIcon.tsx

* Update Thumb.tsx

* modified `generate.mjs` file

modified `generate.mjs` file to automatically generate index file for our icons

* Automatically generated by `generate.mjs` script

auto generate files are also included in code, so i also included it

* `bearded-icons` in `ext` folder

* Update LayeredFileIcon.tsx

* Update LayeredFileIcon.tsx

* formatted LayeredFileIcon.tsx

* Update Thumb.tsx

* added more icons to utilize

* made seperate file for `IconMapping`

* fixed typescript error by `Record<string, React.ReactElement>`

* More fixes in typescript

BTW, I am still learning TypeScript, but I know at least how much is required to get my work complete.

* moved icons to `assets/svgs/ext`

* added `kind !== 'Code'`

* Update Thumb.tsx

* Enable LayeredFileIcon for any file icon
 - Change IconMapping to define layered icons by kind/extension, instead of just extensions
 - Always render LayeredFileIcon component and determine whether the layered icon should or not be rendered internally
 - Format code

* Using our own name conventions

* `getLayeredIcon` implementation

* using our own directory structure

* directory structure

* fix 1

* fixed relative import

* `getLayeredIcon` utility implementation

* for our `kind`/`extention`.svg folder structure

* improvements in `getLayeredIcon`

* added icons in `Code`

* Delete IconMapping.tsx

* fixed imports

* fix typescript, mobile svg handling etc

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-22 14:45:31 +00:00
ameer2468 fe51d54075
[ENG-607] Explorer persist options (#1189)
* Structs for views

* hook up new preferences types to preferences system

* wip - draft

* laters useEffect, hi explorer context :D

* fix types

* wip

* hm

* preferences wip

* tweaks

* use search::SortOrder

* Refactor explorer settings to use useExplorer and useExplorerSettings (#1226)

refactor to use useExplorer and useExplorerSettings

* preferences

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-08-18 08:19:54 +00:00
Oscar Beaumont bcbbe58141
[ENG-974] DB Backup prototype (#1216)
* DB Backup prototype

* Put backups behind feature flag

* Warning for data folder

* nit

* Clippy

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-08-17 05:37:10 +00:00
Ericson "Fogo" Soares e0b72c41da
[ENG-876] Show folders first in explorer (#1223)
Grouping directories before files
2023-08-16 20:49:02 +00:00
ameer2468 5b6394ee54
[ENG-967] Reset confirmation for db sd reset (#1221)
Reset confirmation for db sd reset
2023-08-16 07:16:18 +00:00
nikec 9c0aec8167
[ENG-300] Explorer multi-select (#1197)
* grid

* Improved multi-select, grid list & view offset. Added gap option & app frame.

* List view multi-select

* Include multi-select in overview, fix page ref type

* Add gap to options panel

* Fix drag

* Update categories z-index

* going pretty well

* fix a couple bugs

* fix another bug :)

* minor improvements

* Separate grid activeItem

* extra comments

* um akshully don't ref during render

* show thumbnails yay

* cleanup

* Clean up

* Fix ranges

* here it is

* fix cols drag

* don't enforce selecto context

* explorer view selectable

* Update index.tsx

* Context menu support for multi-select (#1187)

* here it is

* stopPropagation

* cut copy multiple

---------

Co-authored-by: nikec <nikec.job@gmail.com>

* explorer view selectable

* Update index.tsx

* items Map

* fix renamable

* Update inspector

* Hide tag assign if empty

* fix merge

* cleanup

* fix un-rendered drag select

* fix double click quick preview

* update thumbnail

* mostly handle multiple select in keybindings

* fix ts

* remove another todo

* move useItemAs hooks to @sd/client

* fix thumb controls

* multi-select double click

* cleaner?

* smaller gap

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-08-15 08:23:41 +00:00
Jamie Pine a253431d0f
[ENG-887] Category empty screens (#1056)
* begin

* default category ui + schema

* yes

* better light icons

* new text icon

* fix schema

* fix merge error

* fix optional

* re-export icons

* tweaks

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-08-12 16:30:03 +00:00
Brendan Allan c3a4cdaeca
Move onboarding form handling logic to Layout (#1206)
* move onboarding form handling logic to Layout

* better default handling + progress tracker

* relative routes >>>

* wait for libraries to load

* move screen unlocks to Progress
2023-08-12 09:14:02 +00:00
Brendan Allan 160b5e0cf8
[ENG-968] Cache job progress events (#1203)
* cache job report events in context

* hoist report state to JobManager

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-08-12 07:41:18 +00:00
jake 2134570e01
Update test-files submodule within the core (#1196)
chore: update `test files` submodule

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-11 06:45:49 +00:00
Tim baf032883f
fix error when project path contains "src" (#1185) (#1194)
fix error when project path contains src (#1185)

Co-authored-by: Tim Havlicek <t.havlicek@s-v.de>
2023-08-10 09:07:35 +00:00
Brendan Allan 1d5be75828
Fix remove from recents (#1179)
* allow adding custom items to explorer context menu

* provide extra fn to all cms

* fix type errors

* disable ban-types eslint rule
2023-08-05 12:02:00 +00:00
Aditya ac5d7eb4f8
[ENG-848] Implemented "Copy as Path" functionality (#1139)
* #1119 Issue: Implemented "Copy as Path" functionality

I addressed issue #1119 by successfully implementing the "Copy as Path" functionality within the "More Actions" section of the Context Menu. This feature enhances user experience and offers a convenient way to copy file paths. While considering the valuable suggestion of potentially associating this option with the "Alt" key in the future, I opted to make it accessible through the "More Actions" section for now. All tests have passed smoothly

* Extend "Copy as Path" functionality to Overview, Search, and tags explorer

This commit extends the "Copy as Path" functionality to three additional screens in the SpaceDrive application: Overview (under categories), Search, and tags explorer. Users can now conveniently copy file paths from these screens, enhancing their overall experience with the application. The implementation has undergone thorough testing and is ready for review and integration into the project.

* Enhanced File Path Retrieval with RSPC Integration

The code now uses rspc to obtain the filePath, and we simply call it using useLibraryQuery from the frontend to retrieve the filePath. This RSPC-powered approach has successfully replaced the previous, less efficient method of file path retrieval. As a result, the entire process has become streamlined and optimized.

* Merge branch 'eng-848-feature-copy-as-path' of https://github.com/Raghav-45/spacedrive into eng-848-feature-copy-as-path

* Enhanced File Path Retrieval with RSPC Integration

The code now uses RSPC to obtain the file path, and we simply call it using useLibraryQuery from the frontend to retrieve the filePath. This RSPC-powered approach has successfully replaced the previous, less efficient method of file path retrieval. As a result, the entire process has become streamlined and optimized.

In the previous file path retrieval method, we relied on different file access techniques, which often led to slower & non-optimal responses

* Formatted coder with Prettier

* Refactor: Update file paths to '@sd/client'

* doing things with useLibraryMutation instead of useLibraryQuery

doing things with useLibraryMutation instead of useLibraryQuery, so that we only fetch file path only when needed

* Replace locationIdToPath api route with getPath
 - Resolve full file object path on the backend instead of the front-end
 - Use a query instead of a mutation
 - Export rspc queryClients to allow non-reactive usage
 - Error handling
 - Formatting

* Update Object's context menu to use  query

* Move onClick logic inside the CopyAsPath Element

* Improved a Little

- removed unused imports
- formatted document with prettier config which is present in code files `.prettierrc.js`
-

* Update Items.tsx

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: nikec <nikec.job@gmail.com>
2023-08-04 10:26:34 +00:00
Aditya d8bd3075ab
Removed Browsers AutoSuggestions from inputs (#1156)
I modified it from UI because every text input was suggesting autoComplete
2023-08-02 18:21:20 +00:00
Oscar Beaumont 6c9e08540f
Networked sync (#1133)
* temp remove discriminator from tunnel

* i'm lost :(

* Working `Tunnel` + move sync stuff back into p2p

* sync module

* `NetworkedSyncManager`

* Move sync stuff off `P2PManager`

* Test `SyncMessage`

* Library edit + delete hooks

* stable `identity` column

* fix

* plz work

* p2p is hard

* sync identities post pairing

* Remove `p384`

* a couple improvements

* comment out ReqRes

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-02 11:49:50 +00:00
Utku 528657bd19
[MOB-31] Separate analytics for mobile (#1132)
* 1 line change pr damn

* more lines
2023-07-26 08:59:35 +00:00
Ericson "Fogo" Soares 9283e74d85
[ENG-875] Re-index & Re-thumb should be smart (#1130)
* New sub_path rescan rspc route

* Changing some rescan call sites to use new route
2023-07-25 12:47:56 +00:00
Brendan Allan 043b607ad4
CRDTOperation receiving (#1122)
* operation receive + compare

* cleanup + deduplication

* operation receive + compare

* cleanup + deduplication

* sync route + operation grouping

* tag assign sync

* proper relation support in sync debug page

* migration

* separate core-sync + utils crates

* separate p2p event loop from manager

* cleanup library handling

* clippy

* feature gate sync messages properly

* make migration not add required field
2023-07-24 15:26:00 +00:00
Oscar Beaumont 53ab3178c2
[ENG-906] Initial library sync (#1095)
* ffs

* typo

* yeet library data over p2p

* fix a bunch of edge cases

* report complete status on responder

* better log

* fix types

* mobile debug screen

* mobile + P2P is a mess

* feature flag mobile p2p pairing

* wrong one

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-07-17 11:53:25 +00:00
Utku 20eae57e75
[MOB-34] Update thumb logic (#1100)
update thumb logic
2023-07-17 11:47:57 +00:00
Brendan Allan 0a1d721e58
Use codegen for ModelSyncType exec (#1098)
* use codegen for ModelSyncType exec

* folder client format

* hande create operation properly
2023-07-15 04:22:04 +00:00
Oscar Beaumont 1a5d2898c2
[ENG-537] Notification system (#805)
* `Notification` struct

* Manage dem notifications

* a dash of rspc

* `read` field

* `handle_notification_callback`

* some Prisma

* TS-centric notifications backend

* `useNotifications` hook

* Notification test buttons
2023-07-12 07:43:27 +00:00
Oscar Beaumont cf39f8dbcc
[ENG-759] P2P Cleanup (#1062)
* less stupid name

* yeet

* awaiting futures is kinda important lol

* no-async

* more proto stuff

* cleanup

* move it round

* None of my homies like broadcast

* minor

* do the shuffle

* restore after force push

* reusing `sysinfo::System` as intended

* fix lol

* remove `node_id` from `Volume`

* Remove `node_local_id` from `Library`

* Remove `Job` to `Node` relation

* feature flags be like

* press save 4head

* remove `Location` -> `Node` relation

* `volume.rs` to `volume/mod.rs`

* yes

* add `Instance` model and deprecate `Node` model

* pairing is better now

* Pretty code

* thinking in code

* wip

* What if Observables but in Rust?!

* Observables aren't it + `useP2PEvents` hook

* more around some jsx

* Trade offer: bad code for working pairing?

* Unit test pairing protocol

* fix everything up

* corrections

* Have you got a moment for our lord and saviour Clippy

* tsc --fixMyCode

* Prisma being wacky

* Config files being f'ed up

* broken config after migrating

* Zed being Zed

* Argh

* cliipzy

* rewind

* Fix truncate logic

* wip: instances in peer metadata

* Rethink instance ids

* fix

* whoops

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-07-12 06:23:30 +00:00
Brendan Allan 07c00a8b7f
[ENG-846] Preferences (#1047)
* preferences table + trait

* cleaner implementation

* router + ts type

* preference test

* per-column list view preferences

* preference read + write

* add some docs

* migration + docs

* remove ts expect error
2023-07-12 04:32:53 +00:00
nikec 33e8f2188d
[ENG-889] Display options based on selected view (#1079)
* Update slider color

* Update tooltip color

* Display options based on view
2023-07-07 10:57:25 +00:00
nikec 9d800eec31
[ENG-885] Move online locations to lib store (#1074)
* Enable trace logging for invalidate query

* Fixing quick rescan on explorer
And annotating wrong quick rescan usage on top bar reload button

* Move online locations to lib store

* Fix topbar reload path

* fix mobile

* Remove unused imports + format
 - Adjust `arraysEqual` arguments type

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-07-05 22:27:38 +00:00
Vítor Vasconcellos f83f29c720
[ENG-765] Reported Total capacity and Free space are wrong (#1066)
* Attempt at fixing stats

* Fix macOS disk stats retrieve logic
 - Ignore mounted dmgs when calculation disk total/free size
 - Only take into account disk mounted by macOS

* macos only import

* Fix Linux

* Replace byte-size with a custom implementation that supports BigInt

* Fix NaN in Statistics

* clippy

* fmt

* Move linux get_volumes to a specilized function
 - Fix ZFS handling
 - Improve handling of disk symlinks and multiple mounts

* Fix macOS
2023-07-05 18:22:56 +00:00
Jamie Pine 1af516a57f
[ENG-869] Fix identifier missing comma (#1060)
* fix, untested

* formatNumber util

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-07-04 15:34:37 +00:00
nikec 99651ed18d
[ENG-879] File rename improvements (#1067)
File rename improvements
2023-07-03 11:45:15 +00:00
ameer2468 a04da012ed
[ENG-760] Overview draggable categories (#1064)
* Draggable categories

* Update Categories.tsx

* fix storybook

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-30 10:37:54 +00:00
Brendan Allan a41d5df60c
[ENG-858] Source analytics paths from router rather than regex replacement (#1053)
* no more regex replacing in interface

* fix location create event

* onSuccess is crine

* documentation

* typescript

---------

Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
2023-06-29 08:10:26 +00:00
Ericson "Fogo" Soares dcd071d229
[ENG-850] Wrongly labelled .ts files (as video) (#1052)
* Fixing conflits of mts code files showing as video

* Introducing a reidentify_objects param on fullRescan

* Fix job output metadata in case of completed with errors
2023-06-29 02:58:33 +00:00
jake 7bb107d840
[ENG-857] Fix telemetry regex (#1050)
* fix regex

* change back to `replace`
2023-06-29 02:56:14 +00:00
Brendan Allan d8210f13f6
Rename field components + asyncify onSubmits (#1046)
rename field components + asyncify onSubmits
2023-06-28 09:44:40 +00:00
Brendan Allan 444a6d23c0
[ENG-806] Better library name handling (#1043)
better library name handling
2023-06-28 09:11:24 +00:00
Oscar Beaumont f86b6c8b52
[ENG-823] Fix some stuff (#1024)
* SQLite journal bug

* Remove "job.report" indexes thing

* resume button - job not found?

* panic hook with logging

* it did

* large pain

* fix `check_nested_location`

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-27 05:12:04 +00:00
ameer2468 1079171e44
[ENG-804, ENG-802, ENG-800] Minor UI Fixes (#1016)
* Minor UI Fixes

* adjustments

* show file name and extension only if truncated and with tooltip

* name

* oops

* truncate lib name

* cleanup

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-25 16:27:03 +00:00
Ericson "Fogo" Soares 697dfffe37
[ENG-670 / ENG-774] Resumable and Pausable jobs / Queued jobs don't show in the job manager (#961)
* Fixing some warnings

* Optimizing job workers

* Removing the delay from getting job reports

* remove some commented out stuff

* Trying to optimize job report route

* fix thread 'tokio-runtime-worker' panicked at 'attempt to subtract with overflow'

* fix progress bar

* Now pause works from the UI

* Fix

* Now the worker set job report to paused

* show errors for job pause/resume

* bunch 'o ui fixes

* order location in the sidebar

* fix some text

* fix clear all jobs

* fix clear jobs & job group ui

* show queued jobs

* object validator job text

* make cancel button work

* better executable logo

* Now cancel button works instantly

* disable resume button

* remove disabled props from pause/resume buttons

* remove large comments

* show paused progress

---------

Co-authored-by: James Pine <ijamespine@me.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-06-24 07:23:30 +00:00
Vítor Vasconcellos 4dcd0fbd6a
[ENG-791] Open location directory in native file explorer (#1007)
Open folder in native file explorer
 - Remove verbose console.log
2023-06-23 16:40:31 +00:00
Vítor Vasconcellos bffa22681d
Revert some schema changes from #992 (#1003)
- Revert useExplorerSearchParams removal
 - Move schemas to a rout-schemas file
 - Formatting
2023-06-23 05:57:19 +00:00
nikec 14ee1d481e
Fix tooltip overflow (#1002) 2023-06-23 02:28:13 +00:00
Ericson "Fogo" Soares 187ec933f4
[ENG-770 / ENG-773] Copy/paste / Explorer context menu duplicate (#992)
* Fixing copy, cut and paste

* Bug on duplicating files without extensions

* Fix paste only ignoring the location origin when validating relative paths
 - Add Error handling to all context menu actions
 - Hide FS actions in Overview and MediaView
 - Remove redundant useExplorerSearchParams
 - Add default schema to the Zod param hooks

* Hide FS actions in all Explorers but location ones
 - Fix react warnings in RenameTextBox
 - Fix ReactTextBox not selecting the whole file name, instead of just up to file extension
 - Fix react warning due to inputing missing onChange

* basic show jobs for cut, copy and delete in job manager

* tweaks

* Fixing some warnings and minor tweaks

* Rust fmt

* Fix cut between locations on Linux

* Change how routes retrieve route params
 - Replace useZodRouteParams with useLoader
 - Define all schemas in the router file instead of in the route Component
 - Parse schema in loader to avoid requiring the route Components having to import the schema from the router file

* Remove default argument from useZodRouteParams

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: James Pine <ijamespine@me.com>
2023-06-22 23:41:29 +00:00
Jamie Pine 9fa49fe1e5
[ENG-785] Location online indicator fix + UI fixes (#995)
* new icons, location online indicator UI, etc

* hol up

* tag n ball

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-06-22 15:27:13 +00:00
Oscar Beaumont 7198775ea7
[ENG-783] rename node (#993)
rename node + hide some stuff
2023-06-22 08:35:09 +00:00
Vítor Vasconcellos a73b6f325e
[ENG-764] Fix macOS shortcuts showing on all OSes (#990)
* WIP

* Add keybind utility

* Fix Ctrl instead of Cmd in macOS

* Fix keyboard shortcuts for search
 - Implement keyboard shortcut for inspector

* Minor fix for setup script

* Implement shortcut for new tag and for opening files
 - Change quickpreview shortcut logic to follow others
 - Fix OpenFilePath not reporting error

* fix types

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-22 07:03:17 +00:00
Jamie Pine e8d3ad6005
[ENG-779] Finalize UI (#986)
* [ENG-779] Finalize UI
This is one branch with a variety of UI changes

add tag select mode bar without functionality 

fix group job status 

add notice icon with info to stat icons

add WIP notice to media view 

add modal before add location with greyed out clouds

remove disappearing add location button

add WIP spacedrop page 

bring back limited key manager UI 

add options bar on search page without functionality 

Add greyed out encrypt library button or setting

See more button on locations

Show locations on node screen

Fix overview category left padding

* key manager placeholder

* stat info

* nodes screen

* location click yay

* fix size in bytes

Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>

* small ui improvements

* sh*tty see more button

* last touches

* fix merge boo boo

* Fix mobile
 - Move `getItemObject`, `getItemFilePath`, `getItemLocation`, `getExplorerItemData` to @sd/core to allow mobile to use them

* Formatting

* Normalize displayed file size between all screens
 - Replace every use of internal formatBytes with byte-size dep

---------

Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-06-22 06:34:45 +00:00
nikec 80f44ec6a1
[ENG-721] Disable context menu items and categories (#980)
* Disable context menu items

* disable categories

* Enable recents
2023-06-20 22:16:17 +00:00
Marques Scripps 021a5de4f7
feat: Updated the background on the landing page to use react-three-f… (#966)
* feat: Updated the background on the landing page to use react-three-fiber to generate the backgrounds

* fix types & lint & pnpm-lock file

* fix popover import

* reverted the blue glow

* added back the blue glow

* feat: Fixed the issue where it was not displaying the image. + some optional UI changes

* feat: Updated based on feedback

---------

Co-authored-by: Marques Scripps <marques@rcracecontrol.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-20 15:06:56 +00:00
nikec b103c82b39
[ENG-761] Fix light theme colours & add light theme alpha bg (#974)
Fix light theme colors
2023-06-19 16:02:40 +00:00
Brendan Allan 5df37d3a2d
Do all category logic on server (#972)
* do all category logic on server

* cleanup
2023-06-19 12:21:32 +00:00
Brendan Allan fdda0dd280
Fix categories queries (#971)
* more stringent hidden filter check

* add missing migration case

* don't do sync stuff when sync disabled

* remove old stuff
2023-06-19 11:28:07 +00:00
Oscar Beaumont 0f7a669e5a
[ENG-732] Pairing by library (#943)
* library keypair

* allow opening stream to non-connected node + more

* library identity

* fix types

* fix maybe undefined

* don't forgor migrations file

* library manager inside p2p manager

* rename

* `NodeInformation` struct

* node info exchange

* fill in info

* streamify tunnel

* use tunnel for p2p events

* libp2p is annoying + stop leaking private key's

* Clippy cleanup
2023-06-19 05:13:30 +00:00
Brendan Allan d683d22c82
Remove owned sync (#967)
* remove owned sync + cleanup

* no more atomic records

* byebye owned

* remove owned ops from schema
2023-06-18 23:45:06 +00:00
Brendan Allan 2d703f2648
Make indexer rules optional (#965)
* optional indexer rules

* lockfile
2023-06-18 22:13:55 +00:00
Oscar Beaumont fd1afd8500
[ENG-568] Spacedrop Progress (#956)
* `Transfer` struct

* progress moment

* fixes
2023-06-18 08:40:51 +00:00
Vítor Vasconcellos 4078c360b4
[ENG-594] Open With Windows + fixes (#945)
* Windows `Open With` WIP
 - Listing applications capable of hanling a file type is working
 - Openning a file with a selected application is failing with unspecified error HRESULT(0x80004005) for some reason

* Fix file not opening due to COM not being initialized
 - Fix `no apps available` style

* Remove unwrap

* Fix `Open With` due to changes in main

* Fix macOS `Open With`

* Fix Windows `Open With` due to changes in main
 - Sort linux `Open With` entries, to ensure consistent app order

* Fix macOS again

* Update core.ts

* Fix windows CI being rate limited

* Clippy

* Fix CoUninitialize not being called

* minor formatting

* Implement feedback
 - Improve performance of listing apps that can handle a certain file type in Linux

* Fix broken feedback change
 - Small perf improvement to windows crate

* Some improvements to windows crate
2023-06-17 05:23:45 +00:00
Brendan Allan 019459194d
Make Job table all optional (#958)
optional time
2023-06-16 09:20:53 +00:00
Oscar Beaumont af23ef69d3
[ENG-745] App Startup Issue (#957)
* theoretically

* just please don't fail man

* bruh

* go away serde

* fix migrations

* squash migrations

* plz for the love of all that is good work

* disable some node fields

* fix core types

* remove unused stuff

* regenerate migrations

* Fix error boundry

* undo stuff

* migration

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: James Pine <ijamespine@me.com>
2023-06-16 07:53:21 +00:00
Jamie Pine dd464a2953
[ENG-686, ENG-670, ENG-669] Improved Job Manager (#907)
* refactor job manager ui

* huge improvements to job ui api

* improve indexer errors

* minor improvements

* make icon bigger + improve styling

* Update useJobInfo.tsx

better

* improve job status reporting

* fix job indexer backend for ui responsiveness

* attempt at debugging job.getRunning slow invalidation during indexer's walk phase

* remove progress debounce, invalidate has its own throttle layer

* hotfix ghost jobs

* basic pause/resume

* pause functionality immaculate

* pause resume working for first job in group, testable on indexer phase two

* WIP
- refactored job manager
- added better job api

* fix merge issues

* add throttle to job update events and correct index

* improve front end job data handling

* move subscription to job

* wip active job indicator

* minor tweak

* Isolated subscriptions for job events + cleanup

Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>

* mutable ctx

* plz let me build rspc typesafe errors Jamie

* fix merge

* working job reporting

* fix thumbnail text

* faster tick speed

* fix error

---------

Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-06-16 03:49:02 +00:00
Brendan Allan 9a25373a94
Optional filepath + object fields (#947)
* rust changes

* fix ts

* formatting

* linter's a little baby

* mere

* address review comments
2023-06-16 00:22:11 +00:00
ameer2468 4bccd35092
[ENG-739] remove welcome screen from onboarding (#953)
* remove welcome screen from onboarding

* lint/types/unused stuff

* organize imports

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-15 14:50:43 +00:00
Brendan Allan 0725000017
Optional Tag fields (#949)
* optional tag fields

* update comment
2023-06-15 00:29:29 +00:00
Ericson "Fogo" Soares e693c7a542
[ENG-381] Update context menufs actions to support multiple source (#927)
* Generalizing filesystem jobs to accept multiple files at once

* Some small changes and fixing front

* Enable rename route to replicate Finder's behavior

* Assign tag to multiple objects at once

* Remove from recents accepting multiple files

* Fixing some warnings

* Adding multiple files feature to Open and Open With

* Conditional stuff for macos

* Generating commands.ts and other minor warnings

* Rust fmt

* TS typecheck

* Rust format and TS typecheck

* Requested changes

* Requested changes

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-06-14 23:00:28 +00:00
ameer2468 aeb4306d19
[ENG-690] Context menus for locations and tags (#940)
* Context menus for locations and tags

* Update TagsContextMenu.tsx

* tweaks

* reverse back to border accent

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-06-14 12:50:43 +00:00
Utku dc50ce6fd3
Metro is metro (#944)
metro being metro as usual
2023-06-14 05:24:33 +00:00
Oscar Beaumont 1889a767e8
[ENG-723] Feature flags on frontend (#941)
* fixes

* refactor client

* feature flag store

* move `locations.online` subscription into context

* `useDiscoveredPeers` hook

* remove it

* bruh

* Valtio is cringe

* mount p2p events provider
2023-06-14 00:48:54 +00:00
Oscar Beaumont 923a0ceee1
[ENG-698] Stop leaking pk (#934)
stop leaking pk

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-06-12 18:03:12 +00:00
Brendan Allan 7148209343
[ENG 709] Make all location fields optional (#930)
* in progress

* make all location fields optional

* generate migration

* fix formatting

* formatting
2023-06-12 17:52:51 +00:00
ameer2468 b61798b3a9
[ENG-718] checkbox bg color accent + delete file dialog tweak (#936)
checkbox bg color accent + delete file dialog tweak
2023-06-12 15:16:50 +00:00
ameer2468 b12e954f4f
[ENG-640, ENG-695, ENG-705, ENG-693] Categories arrow buttons + others (#851)
* Overview categories arrow buttons

* Hide indexer rules in location + category arrow buttons

* Added masking on left and right of categories

* Expose lock_app_theme function to frontend

* Allow lockAppTheme to reset back to auto theme

* Fixes, progress bar color, useTheme update, shrink-0 for arrow button

* Only show fadeout if scrolled, onboarding css tweaks

* Framer hook unstable, motion divs to handle last category entry is much better

* Fix color picker closing

* Remove ref that is no longer needed

* Fix swift theme updating

* cleanup

* Overview categories arrow buttons and fixes

Added masking on left and right of categories

[HOTFIX] Remove placeholder nodes (#913)

Update LibrarySection.tsx

[ENG-694] Remove Spacedrop (#914)

* goodbye Spacedrop

* fix startup error escaping

* fix error fallback being cringe with long error

* backwards compatibility for early adopters

[ENG-697] Fix rename library (#916)

* random stuff

* How have we had a deadlock for 2 months lol

[ENG-701] Add explorer top bar options to tags (#918)

Add top bar options

[ENG-679] Reserve ids for built in indexer rules (#909)

* indexer rules pub ids

* should work?

* better migrator

* errors

* debugging

* maybe?

* double migrate

* please

* maybe fix?

* update lockfile

* SD_ACCEPT_DATA_LOSS message

* put tracing back

* dumb

* fix system indexer rule ui

fix(interface): quick preview not closing with SPACE (#921)

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>

[ENG-700] Add empty notice to tags (#922)

Add empty notice to tags

[ENG-707] Fix list item bg color (#924)

Fix list item bg color

[ENG-706] Add deselect explorer view items (#923)

Add deselect

Expose lock_app_theme function to frontend

Allow lockAppTheme to reset back to auto theme

Fixes, progress bar color, useTheme update, shrink-0 for arrow button

Only show fadeout if scrolled, onboarding css tweaks

Framer hook unstable, motion divs to handle last category entry is much better

Fix color picker closing

Remove ref that is no longer needed

Fix swift theme updating

* cleanup

* Update pnpm-lock.yaml

* fix types & upgrade typescript version to 5.0.4

* fix folder icon

* remove rust comment

* remove mask

* masking tweak

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: nikec <nikec.job@gmail.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-10 12:25:46 +00:00
jake 277f9ce6cb
[ENG-691] Comment/remove crypto code from main (#932)
* comment out a bunch

* re-comment encrypt and decryot

* no more crypto in main

* remove keys settings icon

* add `disabled` to sidebar link

* bingo
2023-06-10 12:14:50 +00:00
Utku cc8d6a3d24
[MOB-3] Small fixes and improvements (#813)
* add location button

* add tag button

* library manager arrow points right when open

* wip create lib modal

* handle .spacedrive file in location

* fix location screen title

* remove create lib dialog and use a modal instead

* clean tsconfig.tsbuildinfo too

* update some packages

* modal paddings

* fix onboarding animations
2023-06-08 16:06:17 +00:00
Jamie Pine 8938ae6802
[ENG-708] Thumbnail sharding (#925)
* first phase, basic sharding

* improved API for sharding using a "thumbnailKey"

* clean up param handling for custom_uri

* added version manager with migrations for the thumbnail directory

* remove redundant hash of a hash, silly

* fix mobile

* fix clippy

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-08 07:13:45 +00:00
Brendan Allan fd236a1b57
[ENG-679] Reserve ids for built in indexer rules (#909)
* indexer rules pub ids

* should work?

* better migrator

* errors

* debugging

* maybe?

* double migrate

* please

* maybe fix?

* update lockfile

* SD_ACCEPT_DATA_LOSS message

* put tracing back

* dumb

* fix system indexer rule ui
2023-06-06 14:42:52 +00:00
nikec ff9515bdb4
[ENG 655] Explorer restructure (#858)
* wip

* wip 2

* Grid list single selection

* core & pnpm-lock

* Merge branch 'main'

Conflicts:
	interface/app/$libraryId/Explorer/index.tsx

* missing import from merge

* fix total_orphan_paths bug

* add top bar context

* missing pieces of merge

* missing pieces of merge

* missing divs

* Fill fallback value - was causing null error of page

* spelling fixes

* notice light theme, list view update, other explorer updates

* Update pnpm-lock

* Remove procedure

* fix light menu ink color

* fix list view scrolled state

* Change layout default

* Remove unused imports

* remove keys

* empty notice & context menu overview

* Fix prevent selection while context menu is up

* Fix scroll with keys

* Empty notice icon

* Add light icons

* Context menu and fixed list view scroll

* Fix name column sizing

* top/bottom scroll position

* Tag assign only when objectData

* Fix list view locked state

* fix ci

* shamefully ignore eslint

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-06 06:55:56 +00:00
ameer2468 57e1440c96
[ENG-534] Themes UI & appearance (#896)
* Themes UI & appearance

* Theme switching + theme hooks + de-select emoji on feedback ui

* un-necessary for now

* hue slider

* tweaks

* ui tweaks

* ui tweaks

* ui tweak

* tweak

* opacity

* change to themeStore instead of get

* cleanup

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-06-06 04:41:32 +00:00
Jamie Pine ef979e59e7
[ENG-682] Update ink styles (#898)
correct ink
2023-06-01 04:52:16 +00:00
Brendan Allan d173cbcfaf
[ENG-678] Hidden object filtering (#895)
object hidden filter
2023-05-31 10:56:36 +00:00
Oscar Beaumont 049966d848
[ENG-674] fix invalidation (#891)
* reenable the invalidate requests system

* a tester for the invalidate system

* watch locations in Library::load

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-05-31 08:55:46 +00:00
Brendan Allan e70fd4eba5
[ENG-662] Don't use job system for shallow operations (#886)
* make it work

* use functions instead of jobs for shallow stuff

* use generalised AbortOnDrop

* simplify naming

* error stuff + alphabetical rspc types

* log errors

* don't run CI on push

* remove ephemeral

* private Worker::new

* remove comments
2023-05-30 17:07:41 +00:00
Oscar Beaumont 5f71e0c1f6
[ENG-546] Improve error handling (#802)
* log to disk

* remove some unwraps

* panicless

* some p2p error handling

* clippy moment

* Fix `<ErrorBoundary />`

* open logs button

* 39 to 0

* fix types

* update deps and comment out broken tests

* clippy

* more clippy

* upgrade rimraf - https://github.com/isaacs/rimraf/issues/259

* regen broken lockfile

* update `notify` and update `commands.ts`

* more clippy (pls work)

* allow deprecated for p2p (hopefully temporary)

* a

* upgrade deps for p2p

* do betterer

* do it correctly

* remove unused import

* improve core startup error + bc keypair

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
2023-05-30 09:24:05 +00:00
Brendan Allan 8226d5e9f0
[ENG-588] Fix total capacity on macOS (#882)
* correct macos root volume handling

* DiskType enum
2023-05-30 06:25:35 +00:00
Oscar Beaumont a20f6262fd
[ENG-659] Spacedrive On Jamie's NAS (#866)
* serve dem

* 0% chance of working

* With a side of Vite plz

* no CI for now

* Clippy plz work

* undo

* bruh

* plz work
2023-05-29 10:47:59 +00:00
ameer2468 7dff20cbde
[ENG-650] - Blacklist/whitelist each rule (#872)
* Blacklist/whitelist each rule

* update tooltip wording

* tweaks

* get rid of 'magic string' value
2023-05-26 21:13:04 +00:00
Utku 1b4ec50519
[ENG-660] Remove react-simple-icons & use png instead of svg for icons (#870)
* use image instead of svg (mobile)

* use image instead of svg (desktop)

* remove unused svgs

* add brand svgs

* use brand svgs on landing

* use on desktop
2023-05-26 15:57:56 +00:00
Ericson "Fogo" Soares b86a30ae8a
[ENG-613] Indexer rule whitelist/blacklist per rule (#847)
* Introducing many rules on a single indexer rule

* Rust fmt

* Some doc fixes and small stuff

* Small warnings

* Making front typecheks

* Migration fix

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-05-25 19:27:31 +00:00
ameer2468 4a0ee40ba4
[ENG-626] - Feedback (#864)
* Feedback dialog

* tweaks
2023-05-25 18:10:33 +00:00
Utku cc8f14c6af
fix icon & run pnpm format and lint fix (#859)
* fix icon & run pnpm format and lint fix

* format
2023-05-25 14:49:54 +00:00
Brendan Allan b9b481b02e
[ENG-576] Debounce location.create dry-runs (#862)
* debounce location create dialog + handleSubmit everywhere

* run ci on merge groups
2023-05-25 09:09:36 +00:00
Jamie Pine ea46e7736a
[ENG-635] Job time estimation (#842)
* fix extension case sensitivity

* job time estimation wip

* update schema

* use `DateTime` to handle estimated completion time

* use a date with `dayjs`

* remove old migrations

* update migrations

* remove dead code

* Quick tweaks

* unused import

---------

Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2023-05-23 22:21:52 +00:00
Brendan Allan da2e78dc61
Use search.objects for recents query (#850)
* separate search + filter + ordering

* typesafe categories

* make ordering great again

* fix ts

* eslint
2023-05-23 12:58:45 +00:00
ameer2468 40beeb2a20
[ENG-623] - List view obstruction fix (#839)
* Obstruction fix

* add location_id as type

* PR tweaks

* Update core.ts
2023-05-22 04:25:53 +00:00
Utku dbec988147
[ENG-362, ENG-476, ENG-503] Next.js (#817)
* update landing packages & tailwind

* move images

* refactor to nextjs

* doc stuff

* rename markdown to mdx

* working docs

* Add math

* fix pnpm-lock

* Code highlighting

* fix types

* fix more stuff

* Notice component and removed slot

* delete editorconfig eslint rule

* pnpm-lock

* some fixes

* fixed types (pls)

* bump ui's typescript too

* commit next-env.d.ts

* fix doc links

* Use next/head instead of react-helmet & rehype-external-links

* fixes

* fix unsub from list

* add trim() to docs.excerpt

* trim doc title too

* fix titles

* replace <a> to Link

* hide .contentlayer & .next from vscode search
2023-05-21 13:11:03 +00:00
Brendan Allan 9448413048
update pcr (#843) 2023-05-21 07:19:26 +00:00
Jamie Pine d55df77455
[ENG-631] TopBar improvements & misc fixes (#837)
* fix things

* added back/forward buttons to settings

* split top bar context into left and right

* hook up path

* fix background jobs hidden from job manager

* core

* fix type + quick preview transition

* fix selected item color contrast

* fix close button on quick preview

* clean up job ui for light theme

* Improve media view overscan

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-05-21 00:17:27 +00:00
Brendan Allan b0e95fc59f
Replace getRecent with search.paths (#832)
replace getRecent with search.paths

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-05-20 22:11:43 +00:00
Vítor Vasconcellos b169538716
Some misc fixes (#836)
* Fix setup-system breaking in macOS due to unavailable envvar
 - Remove unused docker build-arg from ffmpeg workflow
 - Fix Overview Explorer extending below inspector
 - Fix some left behind formatting problems

* Some more formatting
2023-05-20 04:36:35 +00:00
Vítor Vasconcellos b4dad087e4
[ENG-591] - Fix some funky behaviors (#827)
* WIP

* Some minor fixes for light theme
 - Fix `useIsDark` not reading the initial theme value (only reacting to theme changes)
 - Fix `Inspector` always showing a dark image when no item was selected
 - Fix `Thumb` video extension using black text on light theme

* Improve form error messages
 - Fix `addLocationDialog` not registering the path input
 - Remove `@hookform/error-message`

* Fix Dialog not respecting max-width
 - Fix ErrorMessage animation jumping

* A lot of misc fixes
 - Implement an `useExplorerItemData` (cleaner fix for thumbnail flicker)
 - Fix broken image showing for `Thumb` due a rece condition when props are updated
 - Implement an `ExternalObject` component that hacks an alternative for `onLoad` and `onError` events for <object>
 - Fix `Overview` broken layout when `Inspector` is open and window is small
 - Improve `IndexerRuleEditor` UX in `AddLocationDialog`
 - Improve the way `IndexerRuleEditor` handles rules deletion
 - Fix `IndexerRuleEditor` closing the the new rule form even when the rule creation fails
 - Add an editable prop to `IndexerRuleEditor` to disable all editable functions
 - Fix `getIcon` fallbacking to Document instead of the dark version of an icon if it exists
 - Add some missing colors to white theme

* Format

* Fix Backup restore key dialog not resetting after error

* Feedback

* Format

* Normalize imports

* Fix ColorPicker export

* Fix Thumb video ext not showing in MediaView with show square thumbnails
 - Fix AddLocationDialog Error resetting when changing IndexRules
2023-05-20 03:11:10 +00:00
Jamie Pine 3880428596
[ENG-624] Explorer order by (#831)
added order by + fixed explorer padding situation
2023-05-19 15:51:17 +00:00
ameer2468 c3e4ed8ad7
[ENG-619] - Alpha release onboarding screen (#829)
Alpha release onboarding screen
2023-05-18 14:47:50 +00:00
ameer2468 50910283dd
[ENG-577 + ENG 608] - Index Rules UI Editor + Job Manager small tweaks (#822)
* Index rule updater upgrade

wip

Index Rules editor UI update

prettier/ts

'tasks' to 'items'

better error message

fix type

Update Select.tsx

previous type causes various other errors - band aid solution for now.

* PR feedback

* Fix RuleInput validation regex
 - Fix inverted Whitelist/Blacklist
 - Some minor async fix
 - Lint/Format

* UI tweaks

* Index rules UI adjustments

* format

* tweaks

---------

Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-05-18 04:48:23 +00:00
Vítor Vasconcellos 30e7c9d709
[ENG-528] QuickPreview isn't correctly handling errors for video/audio playback (#815)
* Centralize the file preview logic in `Thumb.tsx`

* Fix useEffect

* Fix Inspector thumb keeping internal state from previous selected files
 - Change video border to follow video aspect-ratio, just like Finder

* Restore memo to Thumb
 - Only add borders to video thumb, not the video itself

* Simplify and improve Thumb logic
 - Add A internal Thumbnail component
 - Rename main component to FileThumb to match mobile naming
 - Move getIcon utility function to assets/icons

* Add new `useCallbackToWatchResize` hook
 - Replace `ResizeObserver` with new resize hook in `Thumb`
 - Simplify and improve `useIsDark` hook by replacing `react-responsive` with direct usage of WebAPI `matchMedia`
 - Fix `Thumb` src not updating correctly
 - Fix video extension incorrectly showing when size <= 80 in `Thumb`

* Fix `Inspector` not updating thumb type
 - Remove superfluous `newThumb` from `getExplorerItemData`

* Remove superfluous `ThumSize`

* Forgot a `?`

* Fix incorrect className check in `Thumb`
 - Updated changed files to use the hooks root import

* Format

* Fix PDF preview compleatly breaking the application
 - Allow Linux to access both the spacedrive:// custom protocol and the workaround webserver
 - On Linux only use the webserver for audio and video, which don't work when requested through a custom protocol
 - Configure tauri IPC to allow API access to the spacedrive://localhost domain, to avoid PDF previews from breaking the security scope and rendering the application unusable
 - Configure CSP to allow the pdf plugin custom protocol used by webkit
 - Fix race condition between Thumb error handler and thumbType useEffect, by using replacing it with a useLayoutEffect
 - Improve Thumb's error handling
2023-05-18 03:31:15 +00:00
Jamie Pine fb2a4b0137
[ENG-662] Overview infinite scroll (#826)
* overview infinite scroll, quick preview position fix, movie icon

* fix name

* gen assets
2023-05-17 23:11:33 +00:00
Jamie Pine e8895c1a05
[ENG-581, ENG-597, ENG-600] Overview categories (#779)
* added base UI for categories on overview

* update core

* cleanup ui

* Inspector default view if nothing is selected, explorer takes child components, hidden menu tweak if no items are sm:flex

* wip

* somewhat functional

* scroll

* category fixes

* clean category bar

* added config store + made toolbar available on all explorer screens

* clean up overview.tsx

* added counts

* fix inspector bug

* add support for favorites
+ add book extension support

* refactor into smaller components

* Some small rust nitpicks

* fix camel case location_type

* Rust fmt

* fix typescript CI

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: nikec <nikec.job@gmail.com>
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-05-17 20:34:05 +00:00
Ericson "Fogo" Soares dda7516980
[ENG-536] Improve indexer for huge locations (#781)
* WIP materialized_path abstraction revamp

* Optimizing indexer rules loading

* Using a better serialize impl for indexer rules

* New interruptable and faster Walker

* WIP new indexer

* WIP first success compiling after breaking the world

* Fixing some warnings

* Handling some lifetime issues in the walker

* New job completed with errors feature

* Introducing completed with errors to indexer
Removing IOError variant from JobError and using FileIOError instead

* Rust fmt

* Adding missing job status

* Better ergonomics to IsolatedFilePathData
Conversions from db's file_path kinds
Keeping original's relative path data to better conversion to OS's path
First unit tests

* Testing and fixing parent method

* Some error handling

* Rust fmt

* Some small fixes

* Fixing indexer rules decoding

* Bunch of small fixes

* Rust fmt

* Fixing indexer rules

* Updating frontend to new materialized_path format

* Trying to fix windows CI

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-05-16 14:15:51 +00:00
Brendan Allan 04deb621e9
Replace locations.getExplorerData with search.paths (#812)
* retire locations.getExplorerData from interface

* regen core.ts

* replace tags.getExplorerData with search.objects

* types out the wazooo

* better optional halding

* ternary-ify

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
2023-05-16 08:43:59 +00:00
Brendan Allan 9c27f5d2cf
fix landing deploys (#816)
* fix react-spring issue

* tsconfck

* revert tsconfck

* use href not onClick
2023-05-13 09:22:03 +00:00
jake 54010345af
[ENG-609] Remove file from recent files (#811)
allow removing a file from recents
2023-05-12 19:14:31 +00:00
Brendan Allan 61bc92de6e
remove unnecessary select styles and configure storybook (#807)
* remove unnecessary select styles and configure storybook

* fix eslint

* fix clippy
2023-05-09 15:36:24 +00:00
ameer2468 0a4c1f41e7
Job Manager improvement & refactor (#783)
* d

* wip

* Nit: margin and padding tweak

* UI design tweaks

* Update Job.tsx

* Improve UI

* [WIP] - Refactor job manager

* remove invalidate explorer event on thumb generation. the event above performs atomic updates on the front end when new thumbnails are generated, now just need to make that work

* prettier formatting + removed unused imports

* UI tweaks

* progress bar width adjustment

* tweaks

* fix em

* fix thumbnail generation

* fix progress bar

* fix time

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-05-08 22:31:49 +00:00
Brendan Allan 05ff5ed800
Eng 510 open with in context menu (#803)
* somewhat

* proper macos support

* formatting
2023-05-08 09:22:24 +00:00
Oscar Beaumont 29f922ce18
Fix subscriptions (#799)
* fix em

* more fixes
2023-05-06 05:45:33 +00:00
jake 4f327db611
source has_thumbnail correctly for the recent file query (#797)
* source `has_thumbnail` correctly

* correctly check if thumbnail exists in watcher

* regen bindings

* add helper fn for getting thumbnail directory and cleanup old thumbnails if the watcher creates a new one
2023-05-05 22:01:34 +00:00
nikec 0f2a50b885
Fix dropdown & topbar button (#793) 2023-05-05 16:35:48 +00:00
Oscar Beaumont 0d9c1b8329
Fix some stuff (#794)
* Update Tauri

* fix

* fix the entire damn app
2 times in two weeks lol
2023-05-05 16:08:00 +00:00
Utku 51d1cb0618
ban useParams hook (#789)
* ban useParams hook

* useSearchParams is illegal too
2023-05-05 05:23:59 +00:00
nikec a5b59b7684
[ENG-575] Infinite scroll (#785)
Infinite scroll
2023-05-04 19:08:38 +00:00
Utku 417a2c532c
Hide Notice and some tweaks (#782)
* Hide notice on overview and
- Removed prettier/recommended from eslint
- Optimized imports

* move overview check to parent

* don't show recents if there is none

* use useMatch
2023-05-04 13:56:24 +00:00
Utku 62f2c77a52
[MOB-1] Theme support for Mobile (#755)
* revert rspc changes and some theme stuff

* Run onboarding test first

* test adding a tag

* handle keyboard on Create Tag Modal

* listen system theme changes

* fix delete tag button

* wait add tag mutation

* remove duplicate assert

* fix edit location setting screen

* select theme & fix add tag test

* add how to run web app to contributing

* add note about how to use stores correctly

* use theme colors

* system theme

* remove metro-minify-terser

* final tweaks

* cleanup

* cleanup

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-05-04 08:10:31 +00:00
Oscar Beaumont 2571e3b275
Upgrade rspc TS (#775)
* finally

* should be working?

* fix types

* fix types

* Wouldn't it be nice if Metro would just work

* idk

* try harder Metro

* potentially fix bundling issues

* idk, maybe fix it?

* fix metro

* update podfile.lock

* bruh

* bruhz

* tailwind is drunk again

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-05-04 06:21:42 +00:00
ameer2468 1db757c115
ENG-287: Overview recent files (#780)
* experimental recent file querying

* working recent files

* fix querying and make amount returned customisable

* experimental recent file querying

* working recent files

* fix querying and make amount returned customisable

* return `FilePath`s from `files.getRecent`

* return `ExplorerItem` from `files.getRecent`

* Overview recents

* commands.ts

* cleanup

---------

Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
2023-05-03 17:06:09 +00:00
nikec d69440faff
[ENG-533] Update navigation (#769)
* move tooltip into portal

* Update navigation

* Switch to useMatch

* browser router

* routing

* Hide nav buttons on web

* Include traffic lights and change icon
2023-05-03 05:47:54 +00:00
Jamie Pine dbe3697f30
Update Icons 2023-05-02 13:08:02 -07:00
ameer2468 d658f7ca80
[ENG-551] - Jobs grouping and UI improvements (#771)
* Job manager - grouping and UI improvements

* type

* convert to component

* remove unused code

* Improved code

* Job manager - grouping and UI improvements

type

convert to component

remove unused code

Improved code

* forgot to update comment

* feedback

* feedback #2

* remove import
2023-05-01 13:12:03 +00:00
Brendan Allan b620e1e174
paginated location explorer (#774)
* paginated location explorer

* remove props from GridView

* formatting
2023-05-01 09:45:25 +00:00
Brendan Allan 7cee2b2651
update prisma (#773)
* update prisma

* idk
2023-04-30 23:03:23 -07:00
Vítor Vasconcellos 90a3509469
[ENG-471, ENG-472] Add dry_run parameter to some API routes and related UI changes (#750)
* Add dry_run for `location.create` and `location.addLibrary`

* Add dry_run to IndexerRuleCreateArgs
- Add invalidate_query to create and edit api method of the location route
- Adjust some code to use the new dry_run property

* `AddLocationDialog` and `IndexerRuleEditor` now validate with backend without user interaction
 - Create `useCallbackToWatchForm` to make it easier to watch form changes with an async function that also executes during component mount
 - `method` is now part of the `addLocationDialog` form schema, and a hidden input
 - Add an `index.ts` for hooks and components

* Fix mobile

* Remove redundant type definition

* Add `useCallbackToWatchForm` as an additional hook to `react-hooks/exhaustive-deps`
 - Improve `useCallbackToWatchForm` argument handling, to avoid duplicated references to form

* Fix unnecessary form value updates in `addLocationDialog`
 - Move reset `method` on `path` change logic from the superfluous `useEffect` to `useCallbackToWatchForm` in `addLocationDialog`
 - Improve core API debug logs for `dry_run`
 - Fix incorrect file name for `useCallbackToWatchForm` hook
 - Improve the documentation for `useCallbackToWatchForm`
 - Fix `useCallbackToWatchForm` not ignoring callback errors
 - Fix `useCallbackToWatchForm` ignoring returned Promise from `onWatch`
 - Add basic validation for the `form` argument in `useCallbackToWatchForm`

* Remove superflous if checks
 - generate new core.ts

* Remove DryRunError

* Remove unused import

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-04-29 10:49:51 +00:00
Brendan Allan 3570c5f3d8
File Opening (#762)
* file opening

* eslint disable in gererated commands

* bruh?

* Fixing materialized_path joining and some warnings

* no unwraps

* formatting

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-04-28 06:55:00 -07:00
Vítor Vasconcellos c7d182e12b
Fix Windows CI + format (#767)
* Attempt to fix Windows CI:
- Ensure version 15 of LLVM is installed in Windows CI (due to` ffmpeg-sys-next`)
- Use `GITHUB_TOKEN` in setup-system.ps1 to avoid rate-limiting by github api in Windows CI
- Add `yaml` settings to `.editorconfig`
- Create a symbolic link from `.prettierignore` to `.eslintignore`
- Move `eslint` root to package root config
- Enable `fileNesting` to reduce dotfile clutter in vscode
- Pass `--strict` to apps/releases `lint` command to avoid making interactive queries and hanging `pnpm lint`
- Format with `prettier` and `eslint`
- Remove empty interface/hooks/useMediaQuery.ts

* Replace unmaintained `actions-rs/toolchain` with `dtolnay/rust-toolchain`
 - Change setup-system.ps1 to avoid installing pnpm in CI
 - Change `pnpm/action-setup` to lock only o major versions of the action
2023-04-27 07:32:15 +00:00
Oscar Beaumont 3c440783b3
Spacedrop (#761)
* A hint of file drop

* backport from #671

* accept/reject Spacedrop working

* final cleanup

* Rename spacedrop.tsx to Spacedrop.tsx

* Update index.tsx
2023-04-27 04:41:33 +00:00
nikec 7115a2d346
[ENG-553] Fix popover open state (#766)
fix popover open state
2023-04-26 16:07:16 +00:00
Brendan Allan 58e0542d8e
Give file paths pub_id and use it primarily (#754)
* give file paths pub_id and use it primarily

* fix object indexing

* file path location + sync

* remove future plan

* use id instead of pub_id for more indexer queries

* use chain_optional_iter

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-04-25 16:53:36 +00:00
Oscar Beaumont 9c62df9947 fix type exporting 2023-04-25 23:51:48 +08:00
Oscar Beaumont 85d0ddf6d3
rspc 0.1.3 prep (#756)
* Upgrade rspc + Specta + PCR

* fix jsonrpc executor

* fix invalidate excessive logging

* fix `Protected` type

* fix mobile

* clippy

* lol
2023-04-25 15:14:52 +08:00
jake 37b8d64642
[ENG-490] Add support for late key manager setup (#740)
* support for late key manager setup and remove password from onboarding

* mobile

* delete master-password.tsx

* remove secure temp keystore

* remove more km_config artifacts

* fix builds

* Fix most of the UI, there still some minor bugs

* Workaround portalled closing Popovers

* Restore search in core/src/api/mod.rs

* Fix Password eye icon closing Popover on click

* Fix keymanager setup submit button spinner not centered
 - Fix keymanager setup missing logic for disabling form
 - Adjust keymanager tab roundness to match app style

* Restore .gitignore

* Restore .prettierignore

* fixerino tests

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-04-22 09:10:21 +00:00
Vítor Vasconcellos b49d215145
[ENG-489] FileThumb has incorrect dimensions for some thumbnails (#731)
* WIP Fix thumb incorrect size

* Fix sidebar thumb incorrect size
 - Fix ext pill incorrect positioning on first load

* Improve `Thumb` overall style behavior
- Fix incorrect position of the video extension pill
- Simplify `MediaView`'s `Thumb` usage by internalizing the `mediaAspectSquare` style
- Change `QuickPreview` to use `cover` and size 0 for `Thumb`

* Remove unused import

* Allow modifing the internal img className

* lint

* Apply PR feedback
- Remove superfluous true value in component property
- Rename ObjectKinds to ObjectKindKey

* Fix video ext pill not being properly positioned in MediaView(non square thumbnail) in prod build

* Fix video ext pill incorrect position (now for sure)
 - Replace img size logic with ResizeObserver
 - Add error handling when thumbnails fails to load

* Shorten variable names

* Fix IndexerRuleEditor isKeyOf

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-04-22 06:43:08 +00:00
Ericson "Fogo" Soares fa5671f614
[Eng 495] Better job report fields (#726)
* Changing action column on job table

* Introducing action and is_background info

* Requested changes
2023-04-22 06:17:50 +00:00
Vítor Vasconcellos 24a3aedd7b
[ENG-384] Indexer rules editor (#723)
* WIP Create Indexer Rule UI + Backend api fix

* Complete IndexerEditor UI for creating new rules
- WIP testing to ensure all rules are parsed correctly
- Add utilities to satisfy the TypeScript typechecker
- Introduce a utility function to facilitate extracting information from an RSPCError
- Modify AddLocationDialog to utilize the aforementioned utility function

* Validation and submit logic is now functional
- Reorganize UI for improved user flow
- Implement validation and error messaging, replace some bare inputs with form inputs, and fix styling issues
- Resolve issues with post-processing of rules during submission
- Wrap editable portion of component in a `FormProvider` due to the `Form` being in a `Portal`
- Add specialized `ErrorMessage` component to `@sd/ui` library
- Update `AddLocationDialog` and `FormField` to utilize the new `ErrorMessage` component

* Fix submit not waiting for confirmation from backend
 - Reset form after submit
 - Disable form while submiting
 - Update form related dependencies

* Implement deleting an indexer rule
 - Modify indexer rule api route to disallow deleting default rules

* Fix form reset on error
 - Minor style adjustments
2023-04-22 04:30:11 +00:00
ameer2468 ee531a81fb
[ENG-473] - Job Manager UI Improvements (#745)
* add support for deleting a specific job

* wip

* Update JobManager.tsx

* Job manager design tweaks + popover open state ignore prop

* tweaks

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-04-21 17:08:32 -07:00
Brendan Allan 469a3831dc
Explorer search (#738)
* basic file path search

* cleanup

* render explorer in search page

* update materialized path docs
2023-04-21 14:49:46 +00:00
Vítor Vasconcellos 7b6dbe4fe3
[ENG-492] Onboarding "set password" feels kinda clunky (#734)
* Minor improvements to some onboarding screens
 - Add transitions to the password form
 - Fix tab order in the Password form
 - Remove unimplemented `import Library` button
 - Some minor style changes to button focus and form validation error messages

* password eye tabindex
2023-04-21 14:18:16 +00:00
Vítor Vasconcellos baf11cfa49
Misc UI fixes (#725)
* Misc UI fixes
 - Solve React dev warning due to not using ref in a fowardRef
 - Show title in alertDialog

* Partial revert "Misc UI fixes"

* Remove console.log from 'OptionsPanel.tsx'
- Replace invalidateQuery with refresh for `locations.list` in `AddLocationDialog`

* Format `Select.tsx`
 - Update turbo to fix https://github.com/vercel/turbo/issues/3598
2023-04-21 13:13:03 +00:00
Jamie Pine e0b813e054
UI tweaks*
- Switched default Media View to squares
- Removed Media View item rounded
- Removed debug sidebar item
- Grey'd out non-functional empty
screens (I'd like to add)
- Removed junk on Overview
- Removed ring effect on buttons
2023-04-21 00:58:50 -07:00
nikec a97145348e
[ENG-295] Explorer media view (#730)
* remove unused onScroll

* Add open media file with double click

* Hide file thumb in inspector

* Enable media layout

* Add media layout options

* Add media view

* Fix vertical images

* Fix vertical square aspect

* query

* Update Location.tsx

* Some optimizations on explorer data query

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-04-21 02:15:22 +00:00
nikec efa28f3ee5
[ENG-497] Fix dialog overflow (#727)
Fix overflow
2023-04-20 14:34:36 +00:00
ameer2468 2fe523d9e9
[ENG-468]: Toggle Popover off on window resize (#713)
* Updated Popover so it toggles off on window resize

* un-necessary dependancy
2023-04-19 14:20:18 +00:00
nikec a7db52478c
[ENG 485] Improve create library dialog (#712)
* Move dialogs into router

* Prevent tab focus on show password button

* Add className props to radio group

* Add password strength meter to password input

* Add steps to dialog

* Update create library dialog

* Update select component

* Add select form field

* Add advanced options to create lib dialog

* Remove spacing

* Update checkbox styles

* Revert to single page, add checkbox & accordion, remove privacy

* Revert "Add className props to radio group"

This reverts commit e53e53cbdf.

* Move schema, switch to camel case

* Revert "Add steps to dialog"

This reverts commit e672e1c472.

* Revert "Prevent tab focus on show password button"

This reverts commit d42e4dc988.

* Add margin

* add debounce to password strength

* Update select
2023-04-19 07:54:55 +00:00
Oscar Beaumont daadbf592a
Eng 488 fix app migrations system (#719)
* improve app level migration system

* basic unit tests for app migrator
We kinda don't want this going wrong so extra barrier is good.

* fix migrator tests
2023-04-18 08:51:01 +00:00
Vítor Vasconcellos 80fe8f98f1
[ENG-286] Set default indexer rules for location (#690)
* Implement multiple Glob matches in the same indexer rule
 - Replace matching logic to use GlobSet instead of simple Glob
 - Add `No OS protected` indexer rule to avoid indexing OS protected files
 - Enable `No OS protected` indexer rule by default

* Rust fmt

* Reduce `No OS protected` rule Glob list by using OR matches

* Add globs for android and ios files in `No OS protected` rule

* Add some more unix special path to be ignored

* Add a new property to IndexerRule to enable it by default when adding a new location:
- Modify the Prisma schema to add the default property to the IndexerRule model.
- Adjust the IndexerRule struct's create and save logic to consider the new property.
- Adjust AddLocationDialog to properly load the default indexer rules from the backend.
- Minorly improve IndexerRuleEditor to avoid adding duplicate entries to its assigned form field.
- Add editorconfig entries for SQL and Prisma types.

* rust fmt

* Add Windows users special folders and files to `No OS protected` rule

* Construct `No OS protected` globs from string vec
 - Don't repeat windows globs that require both a root and C: version

* Apply review feedback and add error handling for `IndexerRuleEditor`
- Revert manual changes made to init migration
- Create external migration that adds a `default` prop in `IndexerRule` model
- Remove redundant `useMemo`
- Replace destructuring of `useQuery`
- Provide feedback to user when a error occurs while querying indexer rules

* useMemo only for `indexerRulesIds` and not the whole `defaultValues` object
 - Remove logic to accpet unix root path for windows indexer `No OS protected` rule
2023-04-18 06:25:57 +00:00
Oscar Beaumont 8ea6a1c329
Automatic job progress (#717)
Remove time tracker task + sender level debouncing
2023-04-18 06:24:06 +00:00
Oscar Beaumont 2dd3d6f921
Job system improvements v2 (#707)
* Add `JobInitData` trait + change `StatefulJob::name` to a constant

* `StatefulJob::new`

* Move `invalidate_query` into `StatefulJob::finalize`

* Cleanup `spawn_job` signature

* Remove `queue_job` and run jobs from the `StatefulJob::finalize` method

* `StatefulJob::queue_jobs`

* `JobManager::ingest` return `Result`

* Remove `jobs.isRunning`

* Invalidation system direct push + batching invalidate

* Look ma, only a single clippy warning!!!!

* Error handling for JobManager

* Rust fmt

* Introducing Job hierarchy to enable job enqueuing

* Rust fmt again 🙄

* core.ts

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-04-15 14:43:04 +08:00
Vítor Vasconcellos 03eb27e91d
[ENG-469] Make Prettier and ESLint work together (#706)
* Make Prettier and ESLint work together
- Resolve conflicts between Prettier and ESLint regarding indentation and Tailwind rules order
- Add `.editorconfig` to standardize basic formatting options across tools and editors
- Add `.gitattributes` to hide `pnpm-lock.yaml` in `git diff` output
- Include EditorConfig in the recommended extensions for VSCode
- Replace some instances of `pnpm exec <command>` with `pnpm <command>`
- Remove superfluous Tauri config for Linux

* Revert Prettier changes (it was working correctly before)
 - Update ESLint to read Tailwind config from absolute path
 - Remove redundant Prettier dependency from subprojects
 - Specify the source folder for the lint script in subprojects

* use mobile's tailwind config with eslint

* pnpm format + pnpm lint:fix

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-04-14 21:21:21 +00:00
ameer2468 3e0ac9372b
[ENG-458] - Top Bar Responsiveness (#705)
* Topbar responsiveness

remove duplicate code

Searchbar: remove form hook and replace with a regular state.

onblur

* Applied feedback + added back in top bar blur
2023-04-14 03:54:55 -07:00
Brendan Allan 8a525f6cc8 Revert "Give FilePath a pub_id (#691)"
This reverts commit 3c494ea96e.
2023-04-14 10:50:37 +08:00
ameer2468 cbcfe5adba
[ENG-450] TopBar revamp and restructure (#701)
* TopBar revamp and restructure

* file tweaks

* Update package.json

* Typecheck missed

* TopBar revamp and restructure

file tweaks

Update package.json

Typecheck missed

* Removed search icon and layout change

* move framer to interface/package.json

* Increase spacing

* fixes & tweaks

* Update TopBar.tsx

* typecheck tweak
2023-04-13 09:33:13 +00:00
Brendan Allan 3c494ea96e
Give FilePath a pub_id (#691)
* checkpoint - indexer parent ids need fixing

* use pub_id for file paths

* Removing LastFilePathIdManager and fixing some loose ends

---------

Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-04-12 21:58:23 -07:00
Jamie Pine 60c1c9ba5d
regen icons + update app ui screenshot for docs 2023-04-11 21:25:39 -07:00
Vítor Vasconcellos e03bb02c81
[ENG-291] Location settings (#689)
* Implement indexer rule editing for locations
- Partially implement IndexerRuleEditor (missing indexer rule creation)
- Update AddLocationDialog to use IndexerRuleEditor instead of checkboxes
- Enable IndexerRuleEditor on the Location settings page
- Improve error handling on the Location settings page

* Change location data retrieve logic on settings page
 - Improve error handling on settings page (don't send NaN to backend)
 - Add disabled prop to Form component
 - Wait for data before allowing edits on location settings page
 - Change some snake_case object properties to camelCase
 - Fix a small error in rspc client that transformed any falsy argument value to null

* Remove console.log

* Fix issue with errors only being handled during the first load of the location settings page
2023-04-11 20:47:51 -07:00
nikec 04c8a96943
[Desktop] Renamable files (#675)
* Add rename file option

* make Ericson's changes

* Prevent arrow selecting when renaming, start renaming with Enter option

* fix rename

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Jamie Pine <ijamespine@me.com>
2023-04-11 20:43:19 -07:00
ameer2468 734a4e82e4
ENG-449 - Keyboard support for Search & Component Extraction (#683)
* Extracted components within TopBar to their own files as components. Added support for for cmd/ctrl + f and Esc for keyboard searchbar.

* Fixed misplaced event prevent default
2023-04-07 23:45:16 +00:00
Jamie Pine d081dd042f
[Fix] Spacedrop demo UI 2023-04-06 21:37:29 -07:00
Jamie Pine cee435938e
[Fix] Add location button went ugly 2023-04-05 19:55:57 -07:00
Utku 63afacbc54
Mobile Analytics and some changes (#667)
* update contributing & environment-setup

* fix pods deployment target to 13.0

* Track app screen changes with plausible

* Don't track onboarding

* remove platformType from usePlausibleEvent

* submit custom plausible events
2023-04-04 05:41:09 +00:00
Utku 86c47dde4a
Prettier & Format (#668)
* format

* fix lint issues
2023-04-04 05:39:07 +00:00
Brendan Allan 3aac6254bb
standardise vite configs (#662)
* standardise vite configs

* remove storybook from @sd/ui

* update pnpm lock
2023-03-31 04:08:22 -07:00
nikec fc830ff922
[Desktop] Add label & error to form field (#659)
* Add label and error to form field

* Add error styling

* Update other form fields

* Update FormField.tsx

* Update Input.tsx

* Move field state to hook

* remove required
2023-03-31 10:34:52 +00:00
Brendan Allan 5782af36eb
fix ts (#661)
* fix ts

* eslint
2023-03-31 00:22:54 -07:00
Ericson "Fogo" Soares b346e7ac52
Eng 372 location awareness improvements (#612)
* Complying with a pedantic Clippy

* Solving duplicated directories events
When creating a directory through MacOS's Finder, for some reason
FSEvents receives 2 Create Folder events that we have to handle

* Handling moving to trash bin and restoring on Mac
Still missing the feature to restore a directory and its children

* Now handling creation of empty files on MacOS

* Enabling restore of directories and its children

* Now working: moving a directory to another
inside the same location

* Now Indexer also remove file_paths not on fs

* Enabling multiple file moves on location watcher

* Fix Windows conditional compilation issues

* Fixing cas_id generation and bumping some deps

* Many Windows specific improvs and some refactors

* Rust fmt

* Using conditional compilation on extract inode function

* Linux fixes and some MaterializedPath improvements

* Rust fmt again

* Introducing tick behavior on location watchers

* Making LastFilePathIdManager more atomic

* Some vscode launch configs for lldb debugger

* Simplifying some lifetimes

* Making all watchers more consistent
2023-03-31 04:59:33 +00:00
nikec 7d996a10cc
[Desktop] Menu tag assignment (#647)
* [Desktop] Improve explorer item context menu tags

* [Desktop] Add tag assignment to file inspector

* clean up

* Update tags/CreateDialog.tsx

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-30 03:11:21 +00:00
nikec 04542a367c
[Desktop] Fix popover props (#653)
* clean up, add fade in animation

* Update DebugPopover.tsx
2023-03-30 03:09:01 +00:00
nikec afb2cea12d
[Desktop] Fix input right buttons (#651)
* update color picker

* fix position and ref

* style hex input

* update input field

* add Icon type option

* Update input

* change right padding on lg size

* update other inputs

* update color picker input

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-30 03:08:04 +00:00
nikec 5377f1b012
[Desktop] Fix color picker ref forwarding, add hex input and styles (#649)
* update color picker

* fix position and ref

* style hex input
2023-03-30 02:49:19 +00:00
Brendan Allan b2455f9e8c fix typescript 2023-03-29 18:58:41 +08:00
nikec 8f3d135caa
[Desktop] Fix menu colors and arrow highlighting (#639)
* [Desktop] Context Menu cleanup

* [Desktop] Update dropdown with new menu changes

* [UI] Change dark menu line color

* [Desktop] remove menu animate prop and make it a default

* Remove duplicate classes
2023-03-29 10:54:02 +00:00
Brendan Allan faefab2bd6
storybook v7 (#645)
storybook b7
2023-03-29 03:06:19 -07:00
Oscar Beaumont c2666f7f63
Sync over p2p (#606)
* sync no networkey

* sync technically wired up

* fix p2p endianness for sync payload

* some sync debug stuff

* feature gate message production

* bump lockfile

* execute queries when sync messages disabled

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-21 06:03:08 -07:00
nikec 29f0dfb338
[Desktop, UI] Fix library dropdown overflow & navigation (#619)
* add radix dropdown menu

* [desktop] Improve Libraries Dropdown

* rename alignToParent prop and fix sizing

* Update pnpm-lock.yaml

* Revert "Update pnpm-lock.yaml"

This reverts commit 6113361c51.

* fix pnpm lock
2023-03-21 05:01:48 +00:00
Vítor Vasconcellos a6a57bbd50
Fix pnpm format command failing with some files (#622)
* Fix `pnpm format` command failure
 - Update prettier and plugins dependencies
 - Add auto-install-peers to .npmrc
 - Fix formating of previously failing files
 - Some basic security mitigations (`pnpm audit --fix`)

* setup-system.sh: Don't do a full system update on ArchLinux

* Revert "Some basic security mitigations (`pnpm audit --fix`)"
2023-03-19 16:47:10 +00:00
Utku 902a3b5ba1
Onboarding, Spacedrop & Location Settings Screen & Styled API (#596)
* fix wrong current lib logic

* add delete lib dialog to LibraryGeneralSettings

* add delete lib to mobile LibraryGeneralSettings too

* onboarding screens

* move zxcvbn to @sd/client

* get started screen and bloom

* merge fix

* move generatePassword back to interface

* add useZodForm to mobile and match react-hook-form versions

* new lib screen

* Implement styled api

* create lib screen and some tweaks

* password input

* fix password meter comp

* new library style tweaks

* Fix remove password bug (interface)

* master password screen

* privacy screen

* creating lib screen

* hexagons are cool

* Expo 48

* keyboard handling

* fix P2P on IOS

* fix types

* asset script

* new icons

* Spacedrop screen

* Fix mobile asset imports

* fix import cycle warning

* Edit Location Settings screen and style changes on other setting screens

* fix library creating bug? hopefully lol

* move PasswordMeter to interface

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-03-17 02:00:02 +00:00
Jamie Pine 3b4248c836
[ENG-441] Explorer size toggle (#611)
explorer size toggle + light theme icons start + radix checkbox
2023-03-16 18:59:06 -07:00
Brendan Allan 145f87cdab
Data Router (#609)
* data router time

* update pnpm.lock
2023-03-15 16:11:47 +00:00
Utku 5b6c8c9165
Assets Export Script (#608)
* asset script

* Add commonjs vite plugin

* Use the index file and rename some images

* Delete unsued files and imports

* Change require to import

* Remove @ts-nocheck bcs why not
2023-03-15 11:15:59 +00:00
Ericson "Fogo" Soares 4a6b057872
[ENG-371] Subpath shallow re indexing (#599)
* Introducing sub path indexing for IndexerJob

* Introducing shallow indexer job

* Some feature flags to avoid warnings at pnpm prep

* Many fixes at shallow indexer job

* Changing how we implement the bookkeeping for file_path ids
Now we're account for independent locations, and also integrating
better with the LibraryContext, instead of using a static global

* Making indexer job reentrant

* Introducing shallow file identifier job
And a bunch of minor refactors

* Rust fmt

* Removing light scan from getExplorerData query
Light scan is a mutation, so we can call it on useEffect function from
the Explorer component in the frontend, when a location_id or the explorer
path changes

* Handling job early finish on init for identifier

* Only invalidate query if we have orphan paths

* Introducing ShalowThumbnailerJob

* Clippy warnings about `into_iter()`

* Naming scheme for Prisma's selects and includes

* Invalidating getExplorerData at thumbnailer

* Small mistakes lol

* Some nitpicks with pnpm prep

* Rust fmt

* Changing indexer's walk log to `trace!`

* Not deleting all file_paths on location fullRescan

* TS typecheck

* Removing `file_path` selection just with id
2023-03-10 16:25:58 +00:00
Oscar Beaumont 7c5f760fbd
Basic Spacedrop working with rspc! (#601) 2023-03-09 06:23:17 -08:00
Jamie Pine f98d7ad6e0
[ENG-408] Dynamic Object icons (#600)
* improved object icons

* remove redundant control flow

* added support for base icon overrides by extension
+ deleted old icons folder and moved official icons into there

* fixed folder icon error

* removed temp nodes example

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-09 11:08:10 +00:00
Oscar Beaumont 66fe8d1814
[ENG-227] Desktop app and landing page telemetry using Plausible Analytics (#583)
* add Plausible analytics to landing page

* proxy plausible through vercel

* fix typo & add other options

* add plausible to `sd/client`

* add telemetry sharing option into library config

* add telemetry config option to lib creation dialog

* revert error message change but keep the typo fix

* add telemetry sharing & error handling to client context

* add important note about requiring the tracker component in root/base layouts

* add the `PlausibleTracker`

* grammatical tweaks

* some TS cleanup

* disable analytics in debug mode

* further component improvements and use custom event props

* more cleanup

* remove tracking from onboarding (no telemetry sharing config option)

* update comment

* add fancy new plausible hooks/tracking

* add `pageview` monitoring hook to `$libraryId` layout

* add library creation events to onboarding and creation dialog

* revert `useCurrentLibraryId()` error handling & add important comment

* minor comment tweaks

* replace `usage` with `telemetry`

* add missing newline

* add location create & delete events

* add tag create & delete events

* add/update library create & delete events

* add fn for getting telemetry settings for library by uuid

* add more events + fix a few bugs

* update generics

* add `telemetryState` `valtio` store

* use new telemetry state

* remove old artifacts from `ClientContext`

* Revert "add telemetry sharing option into library config"

This reverts commit afb9f892ab.

* update events, docs & generics

* add `tagAssign` event

* light comment updates

* const names, comments, etc

* add additional info to props and update comment

* add telemetry sharing to debug state (for sharing telemetry in debug mode)

* update `debugState` item name

* change how `Switch` updates the store in privacy settings

* remove `getTelemetryState` from `telemetryState`

* cleanup library creation event handling/telemetry config updating

* add `DebugPopover` to onboarding in debug mode

* improve code quality/comments

* remove useless comment

* rename `ob_store` and `shareTelemetryDataWithDevelopers`

* fix typo

* add `telemetryLogger` and prevent multiple of the same events from firing consecutively

* add more unique path matching and fix an issue with events

* rename `telemetryLogger` -> `telemetryLogging`

---------

Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
2023-03-09 08:37:57 +00:00
Oscar Beaumont f746530289
P2P Core (#597)
* implement space time

* I love it when my code works
2023-03-09 03:18:33 +08:00
Brendan Allan d89240d9e2
Colocate native code + reorganise (#589)
colocate native code + all rust in crates/
2023-03-03 09:22:22 +00:00
Ericson "Fogo" Soares fe215566d6
Fix unique constraint on file path table (#585)
* Complying with a pedantic Clippy

* Some task runners for vscode

* Solving duplicated directories events
When creating a directory through MacOS's Finder, for some reason
FSEvents receives 2 Create Folder events that we have to handle

* Damn rustfmt
2023-03-02 02:36:49 +00:00
Brendan Allan c65d92ee4c
[ENG-380] Interface code structure improvement (#581)
* beginnings of app directory

* settings mostly good

* colocate way more components

* flatten components folder

* reexport QueryClientProvider from client

* move CodeBlock back to interface

* colocate Explorer, KeyManager + more

* goddamn captialisation

* get toasts out of components

* please eslint

* no more src directory

* $ instead of :

* added back RowHeader component

* fix settings modal padding

* more spacing, less margin

* fix sidebar locations button

* fix tags sidebar link

* clean up back button

* added margin to explorer context menu to prevent contact with edge of viewport

* don't export QueryClientProvider from @sd/client

* basic guidelines

* import interface correctly

* remove old demo data

* fix onboarding layout

* fix onboarding navigation

* fix key manager settings button

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
2023-02-27 21:29:48 -08:00
Oscar Beaumont faeb0473cf
UI testing (#565)
* store demo data in React Query

* Playwright for UI screenshots

* use path based routing on web

* Fix Typescript error
2023-02-27 13:15:47 +08:00
Oscar Beaumont 7192ead2c2
core startup error handling (#579)
* core startup error handling

* lazy load `PasswordMeter` so that the huge `@zxcvbn-ts` isn't in the core bundle

* please clippy

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-25 13:50:22 +00:00
Jamie Pine 9aa2832530
[BUGFIX] Only show list view header on list view 2023-02-24 22:26:59 -08:00
Jamie Pine 677e1b63e9
[ENG-379] Explorer item resizer (#580)
* added item resizer
fixed explorer store bug
refactored file image component

* better sizing for videos

* fixed inspector width issue

* remove console.log

* added column titles to list view + extra details

* moved util

* remove imports

* Update packages/interface/src/components/explorer/FileColumns.tsx

Co-authored-by: Brendan Allan <brendonovich@outlook.com>

* address issues

* fix extension in file list name

* Update packages/interface/src/components/explorer/FileColumns.tsx

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-25 06:16:57 +00:00
Jamie Pine 0b9005fdef
[BUG] fix broken explorer 2023-02-24 14:32:59 -08:00
Jamie Pine 3f44d6f521
[ENG-363] Spacedrop UI + Misc Improvements (#568)
* begin spacedrop ui + misc ui improvements

* better 404 xox

* Update extensions.rs

I think I prefer Container

* added DragRegion component,  ot tested cuz im on my fone

* Update DragRegion.tsx

fix import

* added dummy drop items

* better dummy data

* added clouds & search bar

* added action buttons to spacedrop items

* customize subtle button

* added support for apng, thanks luka big pants

* use relative path in sidebar

* use BYTES const

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-24 08:12:21 +00:00
Utku 7b739d0b33
Mobile Strict Mode and Types (#578)
* better compiler options

* fix types

* fix more types
2023-02-24 08:11:48 +00:00
Brendan Allan 32ffd5f820 check if any libraries in AppLayout 2023-02-23 18:08:56 +08:00
Brendan Allan bfc3ca0f9b
Another routing overhaul (#577)
* whole lotta routing

* remove stats refreshing

* start integrating new contexts on mobile

* update mobile to please typescript

* fix mobile

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-02-23 09:56:32 +00:00
Utku 810b5161dc
Fix Mobile & opacity/x syntax (#576)
* fix mobile

* fix opacity/xx (it doesn't exist)

* Add opacity-60 back to job manager
2023-02-21 17:57:08 +00:00
jake ac2f7a2cd2
[ENG-343] Navigate to / when library is switched (#574)
navigate to `/` when library is switched
2023-02-20 06:10:53 +00:00
jake 4cc582e08c
[ENG-134] OSS Licenses and Projects (#575)
* add `deps-generator` crate

* move `clap` types to separate file

* idiomatic filtering

* experimentally update ci

* add *really* basic dependency page

* remove `license_id` from `License`

* add bare minimum JSON files

* Revert "experimentally update ci"

This reverts commit c04897d902.

* re-insert comments

* Using reqwest blocking feature to avoid asyncness

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-02-20 05:58:55 +00:00
Utku e9e8d2286c
Mobile Actions & File Info Modal (#573)
* better drawer

* fix build?

* style changes

* fix subfolder navigation

* bigger icons and drawer style tweaks

* Disable Menu animation

* more subfolder navigation & title stuff

* move tag dialogs to modal

* cleanup

* Fix text input sizing

* Improve modal component

* Hide modal close button & fix position

* update packages

* style create tag / update tag modals.

* move dialogs to modal & new modal component

* move IsPath and isObject to client + small fixes

* fix FileModal

* move kind to client

* move everything to components + cleanup

* move format bytes, info pills, work on fileinfo and actions modal, update packages, rename xcode build step

* Update Device.tsx

remove placeholder data

* small fixes

* actions modal header and some styling

* fav button

* actions item, divider and container components

* file actions

* file info modal

* remove bg-green from Inspector

* Add more info to fileinfo modal

* Delete unused Device component

* fix merge stuff

* linting + changed how we export tw + rename tw.style to twStyle
2023-02-20 05:24:59 +00:00
Brendan Allan fd39dc3a3d
Replace Location.local_path with path (#571)
* replace Location.local_path with path

* Using more references to avoid unneeded moves and removing unneeded errors variants

* remove unnecessary stuff

* location id checks

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-02-20 05:14:47 +00:00
Utku b856f15b22
Tailwind Prettier Plugin (#557)
* add tailwind prettier plugin + run prettier

* add eslint tailwind plugin and eslint fix to turbo

* Ran eslint fix + fixed every other lint issues

* twStyle and lint stuff

* remove auto lint as it's buggy

* update eslint & add twStyle to tailwind regex

* Fix auto lint + config inconsistencies

* Add tailwind config to prettier config

* run lint:fix

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-16 07:04:19 +00:00
Oscar Beaumont a9fceae819
improvements to spacedrive:// custom URI protocol (#550)
* fix `spacedrive://` custom protocol on Windows
(hopefully)

* custom protocol using `http::Response` + fix broken web

* import patches before App on web

* use `http::Request` for input to `handle_custom_uri`

* break  into dedicated file + error handling

* serving files via custom protocol

* cargo fmt because vscode did cringe

* lru cache to reduce video chunk request time

* add  helper to JS

* clippy be like

* remove duplicate Open buttons in context menu

* fix Linux 🙏

* no shot

* fix Windows custom URI passing (hopefully)

* better fix for custom uri on Linux

* upgrade Tauri for  feature

* switch url replacement order

* prevent React dev tools script being added in prod to desktop

* remove React devtools from html

* upgrade Tauri; required upgrading rspc, Axum, PCR

* pass typecheck + less cringe bigint

* clippy is love, clippy is life

* Typecheck plz

* fix bigint to number conversion

* use httpz + localhost server for Linux

* clippy be right

* Remove console.log

* [wip] proper auth

* fix Linux sidebar padding

* Secure Axum server with random

* Extracting app setup specific to linux to a different file

* remove outdated comment

* Some tweaks on cursom_uri.rs

* file_path_with_location doesn't need to be a named include

* fix typo

* factually wrong comment

* Change `unwrap` to `expect`

* bruh

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-02-14 13:27:11 +08:00
Jamie Pine f47a2d58e5
[ENG 239] Onboarding Flow & Location Settings (#529)
* begin better onboarding

* added input and altered text

* better router & text + database icon

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>

* work on privacy screen + radio buttons

* fix video extension bug and alter screens

* add pending schema and location manager helper

* functional onboarding

* added secure temp store and started creating library loading screen

* fix secure temp keystore + api

* better onboarding

* added location settings and some overview concept, all WIP

* fix switch

* prep

* fix location router

* added backend settings

* attempted to fix form

* begin indexer rules editor, plus tweaks

* indexer rules coming soon

* fix onboarding img size

* cleanup

* clone is needed here, but clippy no like

* sike

* whole bunch of fixes

* clippy + ts

* Removing some TODOs from api/libraries.rs and fixing db size calculation

* moved object kind to client, added half functionality for appearance settings

* fix RadioGroup helper

* fix type issues

* cargo fmt

* fix creating library error handling + invalidate location list on update

* forgot to switch back to onError

* Invalidating getStatistics query on library creation and introducing the concept of waiting for a job on FileCopierJob

* F* cargo fmt

* fix RadioGroup interactivity

* wipe all migrations

* put back COLLATE NOCASE on extension columns

* update core.ts

* remove unused device component

* fix typeerror in mobile

---------

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-02-10 14:08:13 -08:00
Brendan Allan 808bc9f33a
Merge pull request #566 from JulesGuesnon/fix/file-unhighlighting 2023-02-10 12:03:15 +08:00
JulesGuesnon 4db0116bad refactor(Explorer): Removed long check by a stopPropagation 2023-02-10 11:59:31 +09:00