From 30b5bd176d781ba3714315ff1bd12b9169e62a2a Mon Sep 17 00:00:00 2001
From: Ivan <8611739+IRBorisov@users.noreply.github.com>
Date: Wed, 18 Jun 2025 22:31:23 +0300
Subject: [PATCH] F: Rework location picker
---
.../pick-location/pick-location.tsx | 22 +++++++++----------
.../pick-location/select-location-context.tsx | 4 ++--
.../components/select-location-head.tsx | 2 +-
.../pages/library-page/toolbar-search.tsx | 4 ++--
.../library-page/use-library-columns.tsx | 2 +-
.../pages/library-page/view-side-location.tsx | 2 +-
6 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/rsconcept/frontend/src/features/library/components/pick-location/pick-location.tsx b/rsconcept/frontend/src/features/library/components/pick-location/pick-location.tsx
index f6d97137..377ea23d 100644
--- a/rsconcept/frontend/src/features/library/components/pick-location/pick-location.tsx
+++ b/rsconcept/frontend/src/features/library/components/pick-location/pick-location.tsx
@@ -5,7 +5,7 @@ import clsx from 'clsx';
import { useAuthSuspense } from '@/features/auth';
-import { Label, TextArea } from '@/components/input';
+import { TextArea } from '@/components/input';
import { type Styling } from '@/components/props';
import { LocationHead } from '../../models/library';
@@ -35,18 +35,16 @@ export function PickLocation({
const { user } = useAuthSuspense();
return (
-
-
-
- onChange(combineLocation(newValue, value.substring(3)))}
- excluded={!user.is_staff ? [LocationHead.LIBRARY] : []}
- />
-
+
+
onChange(combineLocation(newValue, value.substring(3)))}
+ excluded={!user.is_staff ? [LocationHead.LIBRARY] : []}
+ />
onChange(combineLocation(value.substring(0, 2), event.target.value))}
diff --git a/rsconcept/frontend/src/features/library/components/pick-location/select-location-context.tsx b/rsconcept/frontend/src/features/library/components/pick-location/select-location-context.tsx
index 557e18f9..2ec4ffbb 100644
--- a/rsconcept/frontend/src/features/library/components/pick-location/select-location-context.tsx
+++ b/rsconcept/frontend/src/features/library/components/pick-location/select-location-context.tsx
@@ -38,13 +38,13 @@ export function SelectLocationContext({
}
+ icon={}
onClick={() => menu.toggle()}
/>
diff --git a/rsconcept/frontend/src/features/library/components/select-location-head.tsx b/rsconcept/frontend/src/features/library/components/select-location-head.tsx
index 57cf1f3e..feadf57d 100644
--- a/rsconcept/frontend/src/features/library/components/select-location-head.tsx
+++ b/rsconcept/frontend/src/features/library/components/select-location-head.tsx
@@ -48,7 +48,7 @@ export function SelectLocationHead({
onClick={menu.toggle}
/>
-
+
{Object.values(LocationHead)
.filter(head => !excluded.includes(head))
.map((head, index) => {
diff --git a/rsconcept/frontend/src/features/library/pages/library-page/toolbar-search.tsx b/rsconcept/frontend/src/features/library/pages/library-page/toolbar-search.tsx
index af1f018f..cd65da45 100644
--- a/rsconcept/frontend/src/features/library/pages/library-page/toolbar-search.tsx
+++ b/rsconcept/frontend/src/features/library/pages/library-page/toolbar-search.tsx
@@ -171,13 +171,13 @@ export function ToolbarSearch({ className, total, filtered }: ToolbarSearchProps
}
+ icon={}
onClick={handleToggleFolder}
/>
}
+ icon={}
onClick={() => handleChange(null)}
/>
{Object.values(LocationHead).map((head, index) => {
diff --git a/rsconcept/frontend/src/features/library/pages/library-page/use-library-columns.tsx b/rsconcept/frontend/src/features/library/pages/library-page/use-library-columns.tsx
index d010f964..013c188e 100644
--- a/rsconcept/frontend/src/features/library/pages/library-page/use-library-columns.tsx
+++ b/rsconcept/frontend/src/features/library/pages/library-page/use-library-columns.tsx
@@ -42,7 +42,7 @@ export function useLibraryColumns() {
noHover
className='pl-2 max-h-4 -translate-y-0.5'
onClick={handleToggleFolder}
- icon={}
+ icon={}
/>
),
size: 50,
diff --git a/rsconcept/frontend/src/features/library/pages/library-page/view-side-location.tsx b/rsconcept/frontend/src/features/library/pages/library-page/view-side-location.tsx
index 6700e9fb..13ca997c 100644
--- a/rsconcept/frontend/src/features/library/pages/library-page/view-side-location.tsx
+++ b/rsconcept/frontend/src/features/library/pages/library-page/view-side-location.tsx
@@ -88,7 +88,7 @@ export function ViewSideLocation({ isVisible, onRenameLocation }: ViewSideLocati
}
+ icon={}
onClick={toggleFolderMode}
/>