Commit graph

1920 commits

Author SHA1 Message Date
Ericson "Fogo" Soares 4a3acfa1c8
[ENG-835] Duplicating an empty directory doesn't duplicate nested empty directories (#1213)
* Bunch of warnings

* Solving the issue

* sd_core_sync::New

* dumb

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-13 18:34:46 +00:00
Brendan Allan a74e9aa341
Store portal elements as state instead of refs (#1212)
i ❤️ dan abramov
2023-08-13 17:27:42 +00:00
Vítor Vasconcellos c86a728a1a
Update server Dockerfile due to crate name change (#1211)
* Update server Dockerfile due to crate name change

* Forgot that the bin name changed too
2023-08-12 21:00:16 +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
ameer2468 54466d2a03
update landing page image (#1199)
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-11 09:30:21 +00:00
Brendan Allan 8f1afbf164
Isolate sync p2p logic (#1198)
* remove p2p from sd-core-sync and isolate p2p handling

* re-enable tests and stop being silly

* move sync protocol to modules

* don't emit messages

* cleanup

* formatting
2023-08-11 08:32:20 +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
Aditya 9ed2ceb14b
[ENG-954] Quick Preview for text file (#1184)
* Quick Preview for text file

Implemented a Quick Preview feature using an iframe to display the content of text files in the browser, enhancing the user experience with easy access to file information.

* made corners rounded

* desabled scroller in inspector

* Text Viewer's Implementation

Implemented a TEXT Viewer like PDF Viewer, which shows content of text files

* Dark Scrollbar & Padding Enhancements

Implemented dark scrollbar to match theme and added horizontal padding for improved text preview.

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-10 18:52:57 +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
Jamie Pine cc1bd64a56
Better readme image (#1193)
update img
2023-08-10 08:30:52 +00:00
Jamie Pine 03a6f20463
Readme update (#1192)
* update

* compress img

* add gradient
2023-08-10 08:16:09 +00:00
Tim 7d8282b7b1
[ENG-960] pause inspector thumbnail while quick preview is open (#1186)
* pause inspector thumbnail while quick preview is open

* rename prop paused to pauseVideo

* move video thumb into its own component (#1177)

---------

Co-authored-by: Tim Havlicek <t.havlicek@s-v.de>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-09 08:48:56 +00:00
Aditya 7708ba5850
Update command to run server (#1188)
* Update command to run server

I encountered an issue where the cargo run -p server command was not functioning properly. It took me nearly an hour to pinpoint the problem, which turned out to be related to a modification in the Cargo.toml file. This change was made by @Brendonovich during their work on issue #1181, which pertained to *syncing ingestion*.

Initially, I believed that re-cloning the repository from GitHub would resolve the issue. However, after attempting this solution exactly 5 times, I realized my assumption was incorrect. Despite the time and effort spent, I was able to successfully identify and rectify the problem.

* Mention pnpm dev:web in CONTRIBUTING.md

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-08 15:02:41 +00:00
Brendan Allan 98f763134e
lock libheif-sys version (#1183) 2023-08-07 10:12:20 +00:00
Brendan Allan 9883a191a4
bruh (#1182) 2023-08-07 09:45:40 +00:00
Oscar Beaumont ae3d4c1c37
Library "states" continuation (#1180)
* Remove `NodeServices`

* minor

* fix

* cleanup services

* do the shuffle

* `LoadedLibrary` -> `Library`
Yeah this is probs better

* fixes

* bruh

* lol

* get_all_libraries -> get_all

* job::manager::Actor

* `ctx` to `node` for consistency

* _

* cleanup

* do arc higher up

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-08-07 09:26:10 +00:00
Brendan Allan 00e4aa9e8f
Sync ingesting (#1181)
* sync + ingest refactor

* fix Event enum description

* actually do sync over network

* re-enable heif

* remove comment
2023-08-07 07:52:43 +00:00
Oscar Beaumont 9e919f9909
Library "state" (#1160)
* `Library` -> `LoadedLibrary`

* Move `ThumbnailRemoverActor` onto `NodeServices`
It should either be on `Library` or `NodeServices` none of this in-between stuff.

* small > big files

* prune imports

* isolate cringe

* it helps to test the code

* `Vec` -> `HashMap` - faster lookups

* mpscrr

* minor fixes

* fix language

* `!Sync` :(

* lets goooooo

* removed a comma

* fixes

* fix desktop

* lol, no one uses it

* Clippy
2023-08-05 14:42:21 +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 aae650f37a
[ENG-847] implement Display Full Path in inspector (#1155)
* #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

* 🎉 [ENG-847] Add Full Path to inspector 🔎 📁 

Implemented full path display in the inspector window.

This commit adds the necessary code to show the full path of files in the inspector.

* Fixed Some Problems

now no need to use `import { useLibraryQuery } from '../../../../../../packages/client/src'` because this was functionality for Copy As Path not for Inspector Full Path display

* #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.

* 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

* 🎉 [ENG-847] Add Full Path to inspector 🔎 📁 

Implemented full path display in the inspector window.

This commit adds the necessary code to show the full path of files in the inspector.

* Fixed Some Problems

now no need to use `import { useLibraryQuery } from '../../../../../../packages/client/src'` because this was functionality for Copy As Path not for Inspector Full Path display

* Update Items.tsx

* Different and little bit optimized appraoch

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-08-04 11:34:29 +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
Oscar Beaumont 13a3fbe486
Cleanup core (#1140)
* `NodeContext` -> `SharedContext`

* Cleanup context init

* Goodbye `Arc`'s

* Cleanup context

* rename

* minor

* abstract `Platform` into it's own file

* More `Arc`'s go goodbye

* parallelise `categories.list`

* parallelise `categories.list`

* Unused code in `libraries.rs`

* whoops

* a cheeky rename

* bruh

* :-(
2023-08-02 08:06:54 +00:00
John Smith 58b7a96860
fix: unknown feature proc_macro_span_shrink (#1143)
fix: https://github.com/rust-lang/rust/issues/113152
2023-08-02 06:02:06 +00:00
jake c2da6ef1dd
Include openssl and clang-devel in the Fedora dependencies (#1141)
* openssl is sometimes missing from fresh installs?

* add `clang-devel`

* rearrange order of installs
2023-07-31 20:08:53 +00:00
Ericson "Fogo" Soares 26e3b53b21
Small fix due to how sharding works (#1138) 2023-07-28 03:46:44 +00:00
Ericson "Fogo" Soares aec0c94d62
[ENG-794] Library deletion hangs (#1137)
Solving deadlock on library deletion
Also improving some minor stuff on thumbnails remover actor
2023-07-27 23:18:45 +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
jake 7215e40a3b
[ENG-926] Prevent thumbnail destruction and fix the remover (#1127)
* fix(core): thumbnail removal

* chore(core): add todo

* New actor on steroids

* Improving thumbnail remover actor

* Ignoring errors from files that doesn't exist

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-07-25 14:21:50 +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
Vítor Vasconcellos 7e4ed2b547
[ENG-767, ENG-916] Improvements and fixes for Open/Open With (#1082)
* Normalize PATH and XDG envvars on Linux

* Fix normalize_xdg_environment

* Replace custom Desktop file parsers with Glib

* Fix AppImage env influencing external apps
 - Normalize GStream plugin path

* Fix macos pulling linux deps

* Attempt to fix gnome apps failing to launch
 - Fix incorrect logic in `normalize_pathlist`

* Ensure empty envvars are not set

* Revert AppImage ovewritten GTK specific variables
 - `normalize_pathlist` now prefers entries with less priority when dealing with repeated entries, this is not compatible with the default behavior, but it is a more sane approach IMHO

* Remove 32-bit libs from release CI build host

* Remove 32-bit from github runner 2 attempt
 - Remove deprecated vscode config

* Remove libc6-i386

* [ENG-916] Implement `Open With` logic compatible with macOS < 12

* Add some missing gstreamer deps in Linux

* Replace opener with Glib API

* Fix reveal opening file instead of dir
 - Improve Open With logic in Windows
 - Expose functions to test if app is in a flatpak, snap or appimage

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-07-24 17:36:00 +00:00
Brendan Allan 447069388b
Push libraries into vec after loading (#1129)
push libraries into vec after loading
2023-07-24 17:17:02 +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 23b0c403be
[ENG-925] - Arc<Library>/Arc<NodeContext> (#1124)
* `Arc<Library>` + `Arc<NodeContext>`

* fix specta version

* remove unneccessary derefs

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-07-24 10:59:57 +00:00
Ericson "Fogo" Soares 03e71e98a4
[ENG-778] Location clean up job (#1123)
* Introducing thumbnail remover actor
Also tweaking the orphan remover actor

* Rust fmt
2023-07-20 15:17:54 +00:00
Vítor Vasconcellos 8d6a060343
[ENG-914] Fix compilation in Linux arm64 (#1104)
Remove unecessary casts in movie_decoder that were breaking compilation in linux arm64

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-07-17 17:08:09 +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
Brendan Allan f9b32f5a4a
SQLite connection limit (#1111)
connection_limit=1
2023-07-15 03:56:00 +00:00
Vítor Vasconcellos 1ebe91acba
Fix server CI (#1091)
* Fix typo making server CI fail

* Use redhat buildah and push action to handle the server docker image creating and publishing

* Dumb typo

* Update buildah

* Forgot sudo

* Replace env with github action output
2023-07-14 02:35:54 +00:00
nikec 4642808bd2
[ENG-913] Fix quick preview showing wrong file (#1096)
Fix quick preview
2023-07-13 12:34:52 +00:00
Willem-Jaap 1b966b72c4
fix(landing): correct aspect ratio on images of teammembers which makes sure they are not stretched (#1094)
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-07-12 13:16:31 +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
Utku e31b03c248
[MOB-19] Search (#1085)
* search wip

* hook up search
2023-07-12 07:38:59 +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
Niklas Wojtkowiak c877c03b63
Add functionality to some Overview Catrgories (#1090)
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-07-12 06:01:30 +00:00