Commit graph

831 commits

Author SHA1 Message Date
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 b5dd19c8e7
Context menu quick fix (#948)
* Update LibrarySection.tsx

* remove index

* discriminated union instead of strings

* Update LibrarySection.tsx
2023-06-14 14:49:22 +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
Vítor Vasconcellos e6d0e6098c
[ENG-593] Implement Open With for Linux (#939)
* Implement `Open With` for Linux

* Fix TS typechecker failing and Rust formatting

* Take args by ref

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-06-14 00:54:43 +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
nikec f4cac23b9e
[ENG-726] Copy location path to clipboard & configure location navigation (#938)
Copy path to clipboard & location settings navigation
2023-06-13 05:09:59 +00:00
ameer2468 ba9471bc81
[ENG-719] About page updated (#937)
About page updated
2023-06-12 21:07:35 +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 553f50e6fe
[ENG-714] 'Open with' not on folders (#935)
* Update OpenWith.tsx

* Update OpenWith.tsx

* Update OpenWith.tsx
2023-06-12 16:00:37 +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
nikec 0a6d4e49da
[ENG-710] Fix explorer view context menu (#933)
* Fix context menu on overview

* Fix double click action

* fix propagation & switch to onMouseDown
2023-06-11 00:33:42 +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
nikec 0b4c42d7bf
[ENG-706] Add deselect explorer view items (#923)
Add deselect
2023-06-07 08:33:56 +00:00
nikec ebe9a628c9
[ENG-707] Fix list item bg color (#924)
Fix list item bg color
2023-06-07 08:32:14 +00:00
nikec f37c6b3600
[ENG-700] Add empty notice to tags (#922)
Add empty notice to tags
2023-06-06 16:50:34 +00:00
mooy e314943c3b
fix(interface): quick preview not closing with SPACE (#921)
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-06-06 15:52:14 +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 f3a35a9c13
[ENG-701] Add explorer top bar options to tags (#918)
Add top bar options
2023-06-06 14:26:54 +00:00
Oscar Beaumont 007e089fcf
[ENG-697] Fix rename library (#916)
* random stuff

* How have we had a deadlock for 2 months lol
2023-06-06 11:41:39 +00:00
Oscar Beaumont 41933c8b80
[ENG-694] Remove Spacedrop (#914)
* goodbye Spacedrop

* fix startup error escaping

* fix error fallback being cringe with long error

* backwards compatibility for early adopters
2023-06-06 10:56:31 +00:00
Jamie Pine a3a4efbc59
[HOTFIX] Remove placeholder nodes (#913)
Update LibrarySection.tsx
2023-06-06 09:51:46 +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
Vítor Vasconcellos 350b7e39db
[ENG-683] Fix tauri allow list (#897)
* Fix Tauri drag not working
 - Fix Mpeg videos compleatly breaking QuickPreview
 - Fix Dev build open data folder button not working
 - Fix MP4 videos freezing in QuickPreview on MacOS

* Fix React inter-component state error
2023-06-02 00:09:19 +00:00
Jamie Pine ef979e59e7
[ENG-682] Update ink styles (#898)
correct ink
2023-06-01 04:52:16 +00:00
Oscar Beaumont f08d178e3a
remove log (#894)
* Update ErrorFallback.tsx

* remove log

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2023-05-31 09:41:09 +00:00
ameer2468 f6978563a9
[ENG-677] Error button tweak for reset lib (#893)
Update ErrorFallback.tsx
2023-05-31 09:35:38 +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
ameer2468 a12720d5a8
[ENG-666] Index rules UI tweak (#885)
* props & ui tweak

* margin tweak
2023-05-30 12:47:32 +00:00
Oscar Beaumont bfe5a09204
Easily reset db if old config detected (#884)
* easily reset db if old config detected

* fix typo

* plz fix typecheck
2023-05-30 12:45:28 +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
ameer2468 cc308c349f
[ENG-661] Tooltip Topbar Bug fix (#881)
Bug fix
2023-05-29 16:34:25 +00:00
ameer2468 37e0583e1e
CSS-tweak (#880)
Update Link.tsx
2023-05-29 12:31:52 +00:00
ameer2468 0851997b00
[ENG-642] Minor UI Tweaks (#879)
* UI Tweaks

* Update Link.tsx
2023-05-29 11:54:22 +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
Brendan Allan 82f996acc3
cors is cringe (#868) 2023-05-26 09:21:16 +00:00
Brendan Allan 1ad942bc95
feedback fixes (#867) 2023-05-26 09:01:33 +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
Vítor Vasconcellos 0676c40331
[ENG-651] Fix PDF rendering breaking app on macOS (#854)
* Fix macOS PDF rendering
 - Fix app crashing due to PDF rendering receiving empty URLs
 - Attempt fix PDF rendering empty PDFs due to it not supporting range requests

* Fix dumb change from `data` to `src` in `<object>`
 - Fix QuickPreview not closing with space bar
 - Fix double-click simultaneously renaming and opening file
 - Minor improvements to QuickPreview header
 - Fix Button inside Button react error in QuickPreview
 - Don't render thumb without a valid source

* ExternalObject events must not influence the link state
 - More macOS PDF range changes

* Use `<iframe>` instead of `<embed>` or `<object>` to load pdf in macOS
 - Revert removing range support for macOS pdf type
 - Rename `ExternalObject` to `PDFViewer`
 - Fix `AddLocationDialog` sometimes requiring multiple confimations on first load

* `Accept-Ranges: none` Header response as it breaks linux video playback
 - Extract location id from from `ExplorerItemData`, to allow rendering original versions on `Overview`

* Format

* cargo fmt
2023-05-25 06:34:18 +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 a470844f85
[ENG-643] - Job indentation style fix (#846)
Job identation style fix
2023-05-22 17:26:50 +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
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
Jamie Pine 0ba5874947
[FIX] Thumbnail flicker (#830)
* [FIX] Thumbnail flicker
+ tiny fixes

* redundant
2023-05-19 02:00:41 +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
Jamie Pine c9794d4d9c
[ENG-599] Fix Quick Preview (#814)
Fix preview CSS
2023-05-12 22:39:54 +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 a3facb4598
reduce note debounce time + flush on unmount (#809) 2023-05-10 21:13:48 +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
Brendan Allan 2380993724
reduce location search debounce time (#806) 2023-05-09 11:22:09 +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
jake 818bc1ecc9
[ENG-592] Prevent libraries with blank names/no names from being created (#800)
* prevent libraries having all null or empty names

* stop onboarding continuation if name field is empty

* prevent libraries with entirely empty names from being created in TS

* remove trim from schema

* add comment explaining regex, and `.trim()`
2023-05-06 07:32:32 +00:00
Utku 66f1034587
hide toolbar when there is no recents & eng-464 (#796)
hide toolbar when there is no recents
2023-05-05 19:52:17 +00:00
Brendan Allan 9107feaed3
put ViewContext into its own file (#795) 2023-05-05 17:56:03 +00:00
nikec 0f2a50b885
Fix dropdown & topbar button (#793) 2023-05-05 16:35:48 +00:00
Brendan Allan f250e4c49d
Fix Typescript (#792)
* improve explorer typesafety

* cleanup
2023-05-05 14:03:20 +00:00
Brendan Allan c17e8b30fe
bruh (#791) 2023-05-05 07:23:36 +00:00
Brendan Allan 835de32fd6
zod-powered search params (#790)
* zod-powered search params

* fix ci

* fix context menu

* fix the *other* context menu

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-05-05 05:39:52 +00:00
Utku 51d1cb0618
ban useParams hook (#789)
* ban useParams hook

* useSearchParams is illegal too
2023-05-05 05:23:59 +00:00
nikec e43069961b
[ENG-585] Fix date-created sorting (#788)
Fix date-created sorting
2023-05-04 21:04:35 +00:00
Brendan Allan 26f46036b5
fix recursive imports and explorer params (#787)
* fix recursive imports and explorer params

* fix types

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-05-04 19:16:07 +00:00
nikec a5b59b7684
[ENG-575] Infinite scroll (#785)
Infinite scroll
2023-05-04 19:08:38 +00:00
Jamie Pine 655e6e1bd4
[Fix] Nav button alignment (#784) 2023-05-04 17:29:36 +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
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
Vítor Vasconcellos c457babff1
Fix IndexerRuleEditor using spread operator inside JSX (#777)
Fix IndexerRuleEditor using spread operator inside JSX
 - Fix rule delete button not working when clicking directly on X icon
2023-05-02 07:30:31 +00:00
ameer2468 932902ce0f
[ENG-573] - Delete on keyboard deletes file (#776)
Delete on keyboard deletes file
2023-05-01 15:20:46 +00: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
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
nikec 4b7b6b04e8
[ENG-549] Fix top bar key manager overflow (#764)
Change top bar popover width to min width

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-04-26 14:29:12 +00:00
nikec 41f5a7c315
[ENG-550] Fix checkIcon error (#763)
Fix checkIcon
2023-04-26 14:22:22 +00:00
nikec 0a252eb34b
[ENG-548] Fix top bar menu padding (#765)
Fix top bar menu padding
2023-04-26 14:22:19 +00:00
Jamie Pine 4f29fcf0a8
[ENG-524] Dismissible notices (#753)
* designed notice component

* Persist notices, fix scroll, add list and grid notice

* Add collection icon

* update descriptions

* fix format

* change to layout mode

---------

Co-authored-by: nikec <nikec.job@gmail.com>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-04-25 12:48:14 +00:00
nikec b224e2383c
[ENG-499] Search improvements (#757)
* Add bg color to layout

* Add tool options, search state

* support double click nav from search

* useTopBarOptions

* search store

* disable nav button

* search

* Update View.tsx

* rename hook

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-04-25 09:23:09 +00:00
Jamie Pine 86f387ad30
[FIX] transparency on file thumb 2023-04-24 21:32:40 -07: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
ameer2468 705f39aa2d
Job manager: remove filters (#751)
Update JobManager.tsx
2023-04-22 06:10:09 +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
nikec 91f9b1bb9c
[ENG-521] Add quick preview with space (#749)
Add inspect with space
2023-04-22 04:21:57 +00:00
jake 4315cee147
[ENG-516] Prevent copies/cuts to the same source/dest (#748)
* add basic UI protection to stop cut/copies to the same path

* add rust src/dest protections

* fix pasting logic

* fix path canonicalization

* skip paths instead of overwriting them

* Using non-blocking ops and fixing some warnings

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-04-22 02:11:59 +00:00
nikec fc99fed00d
[ENG-519] Add additional selected index reset (#747)
Selected index reset
2023-04-21 17:50:49 -07: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
nikec 761724696d
[ENG-513] Disable & comment out non-ready settings (#742)
* Comment and disable things that aren't ready

* disable node inputs

* hide debug mode in prod
2023-04-21 15:34:52 +00:00
nikec df0e24a56c
[ENG-508] Filter locations (#737)
Filter locations
2023-04-21 14:51:48 +00: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
nikec 4aef16b849
[ENG-509] Update libraries settings (#739)
Update libs settings
2023-04-21 14:42:06 +00:00
nikec d8aa70cca4
[ENG-512] Fix empty explorer view (#741)
Fix initial render
2023-04-21 14:31:05 +00:00
nikec d519af6448
[ENG-506] Disable links (#735)
* disable link

* Update Link.tsx
2023-04-21 14:22:10 +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
nikec df8cd4b4fa
[ENG-507] Set active inspector button (#736)
Set active inspector button
2023-04-21 12:01:46 +00:00
Brendan Allan aeb2d2de1f
Cleanup TopBar (#733)
cleanup
2023-04-21 03:06:34 -07:00
ameer2468 a9c970ef81
Quick fix (#732)
put back in media onclick view - also removed a hook we dont need anymore
2023-04-21 01:32:30 -07: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
ameer2468 732f9e4a30
[ENG]-487: Toolbar now uses Context API & Portal (#724)
* Toolbar now uses context api and tools can now be defined within their own route index instead of all in one place

* update

* Update index.tsx

* inline

* Updated to use portals

* lint & format

* format

* Update index.tsx

* fix requested changes

* cleanup

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-04-21 00:02:06 -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 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
Ericson "Fogo" Soares 7a792de090
[Eng 493] Job manager status showing incorrect (#722)
* Fixing path report for indexer on job manager

* Fixing warnings on migrator tests
2023-04-19 01:05:30 +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
nikec 7ebc467184
[ENG-475] Fix list view scroller (#715)
Switch to absolute rows
2023-04-18 06:23:30 +00:00
ameer2468 ec900dcc9d
[ENG-467]: Topbar improvements + show_at control (#709)
* Topbar improvements

lint

lint

Prettier formatting

* pr adjustments

* prettier

* remove forwardedRef from searchbar and use a local ref instead.

* lint

* pr adjustments

prettier

remove forwardedRef from searchbar and use a local ref instead.

lint

* date_created

* replace date_created with created_at

* fix merge

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-04-17 14:01:42 +00:00
nikec 89478204f8
[ENG-466] Fix topbar tooltip collision (#704)
Fix z-index

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-04-17 06:10:43 -07: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
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
Vítor Vasconcellos a7efbfd1f0
[ENG-463] QuickPreview fails to render when showing a thumbnail (#703)
Put QuickPreview inside the LibraryContextProvider
2023-04-13 07:22:18 +00:00
nikec d1b74cb4af
Explorer view refactor (#694)
* explorer view refactor

* remove VirtualizedList

* Add file renaming
2023-04-12 12:37:09 -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
Vítor Vasconcellos b36b4d069a
Fix QuickPreview not displaying PDFs on macOS (#682)
- Add missing Dialog.Portal to QuickPreview
 - Fix some portrait image previews extending past the display height
2023-04-11 20:44:53 -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
nikec 6e985c68b7
Fix add location button (#685) 2023-04-10 12:00:37 +00: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
ameer2468 d441d3c99c
ENG-448 - Refactor Sidebar index.tsx - separate components into their own file (#680)
Refactor Sidebar index.tsx - separate components into their own file
2023-04-06 23:40:27 +00:00
Vítor Vasconcellos 3304e8f6ce
QuickPreview Component (Needs test on MacOS) (#665)
* Add QuickPreview Component
 - Improve the handling of Range requests
 - Implement logic to answer HEAD and OPTIONS methods
 - Handle CORS pre-flight requests
 - Expand accepted file types
 - Improve error handling of invalid Range requests

* Fix linter errors
 - Add `use std::cmp::min` to custom_uri (Required on MacOS & Windows)
 - Improve logic for retrieving file information in QuickPreview.tsx

* More linter errors

* Simplify `QuickPreview` by extracting the logic for choosing the file preview tag to a `FilePreview` component
 - Fix the typo in `QuickPreview` props name
 - Remove the unused `handleMedia` ref
 - Move the remaining `QuickPreview` logic to the `transitions` callback
 - Simplify the `cors` return type in `custom_uri.rs`

* Refactor range handling in `handle_file` function
 - Move range handling logic to the initialization of the `range` variable
 - Replace `if let` with `match` to reduce code duplication
 - Don't export FilePreview
 - Export QuickPreviewProps

* Fix typo in `RangeNotSatisfiable` error message
 - Remove redundant variables

* Fixing cas_id generation on watcher
Some improvements on watcher file creation

* Rust fmt

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: Jamie Pine <ijamespine@me.com>
2023-04-05 21:15:13 -07:00
Jamie Pine 2c533c7599
[Feature] Inspector video preview 2023-04-05 21:07:20 -07:00
Jamie Pine cee435938e
[Fix] Add location button went ugly 2023-04-05 19:55:57 -07:00
Brendan Allan 071af22b42
fix syncing (#679) 2023-04-05 19:47:10 -07:00
Brendan Allan b32ea8438c
fix quick rescan loop (#678) 2023-04-05 19:21:03 -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
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
nikec 8aa1a5ff28
[Desktop] Fix edit library navigation (#658)
Fix edit lib navigation
2023-03-31 05:41:54 +00:00
nikec 8584f23b9c
[Desktop] Fix current library label (#656)
Fix current lib label
2023-03-31 05:01:13 +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
nikec 35e8b78634
[Desktop] Fix inspector tag overflow (#637)
* [Desktop] Truncate inspector tag names

* replace title with tooltip
2023-03-29 04:59:41 -07: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
Vítor Vasconcellos 20f0e7f15a
Fix adding Locations that already have a .spacedrive file (#627)
* Handle RPC errors when adding Locations
 - Add custom error codes for NeedRelink and AddLibraryToMetadata errors in backend
 - Handle errors in AddLocationDialog form
 - Show custom error message for above errors and ask user to confirm action
 - Handle user action confirmation with appropriate RPC method (`locations.relink`/`locations.addLibrary`)

* Abstract openDirectoryPickerDialog logic to a function
 - Add 'Unkown Error' when code doesn't match a know one

* Fix bugs in logic to handle `locations.create` errors
 - Fix minor issue: AddLocationButton opened the dialog in desktop even when the user cancelled the file picker
 - Replace ternary with object for custom form error messages to allow for easier expansion
 - Break onSubmit logic up into functions
 - Remove incorrect `locations.indexer_rules.delete` call
 - Fix Checkbox element state not updating on external form state changes

* Adjust AddLocationDialog style to match other Dialogs in the app
 - Reset exception code at the end of `confirmAfterError`

* Rework how backend errors are handled when adding Locations
 - Change NeedRelink and AddLibraryToMetadata errors to use 409 (Conflict) status code and a static message.
 - Only enable custom submit logic in AddLocationDialog for 409 (Conflict) errors that have a known custom error form message.
 - Differentiate previous errors based on their messages instead of status code in AddLocationDialog onSubmit.
 - Add @hookform/error-message dependency for improved form validation error rendering.

* Invalidate library.list to ensure it is shown on sidebar

* Improvements to AddLocationDialog
 - Remove uncessary scope block and make useEffect depend directly on `form`
 - Move `form.handleSubmit` from `onSubmit` call to `handleSubmit` definition
 - Change basic Checkbox to RadixCheckbox and adapt onChange logic to onCheckedChange
 - Some simple styling improvements to the error message
2023-03-28 07:09:52 +00: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 bf7d728730
[Desktop] Fix initial edit location load (#626)
[Desktop] Fix initial load
2023-03-21 05:02:16 +00: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 0fd53d1287
Improve AddLocationButton & Implement UI for indexer rules (#620)
* Improve AddLocationButton + Implement UI for indexer rules

* Minor code clean-ups
 - Remove unused variables and imports

* cleanup AddLocationDialog props

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-19 17:08: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
nikec 249d5b5534
[desktop] fix tag & location name overflow (#618) 2023-03-19 06:02: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
jake ad157f58a5
[ENG-376] Fix double libraries being created during onboarding (#582)
* ensure the library creation `useEffect` only ever fires once

* use an early return
2023-02-28 12:19:55 +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