Commit graph

27 commits

Author SHA1 Message Date
Utku fd8c0f87b3
[ENG-1067] Update phosphor to new package & update sort imports (#1330)
* ianvs > trivago

* @phosphor-icons/react > phosphor-react
2023-09-11 15:26:44 +00:00
Oscar Beaumont f821bb9a0f
Stop App Freezing (#1257)
* Drop Tauri custom URI handler
Me no likely but it has to be done.

* fix app startup with location

* fix "Add Location" button on web

* Serve correct content range

* Backport changes from 08ba4f91

* none of my homies like panics

* minor fixes

* fmt with new Rust version
2023-08-31 06:54:40 +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
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
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
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
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
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
Brendan Allan 06de379169
[ENG-816, ENG-821] Re-implement reveal in finder + ContextMenu overhaul (#1029)
* mostly there

* native opening working

* more

* cleanup

* reorganise

* remove unnecessary import

* uncomment some stuff

* spacing

* store quickview ref inside provider

* fix linting

* clippy

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
2023-06-27 15:34:53 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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