@stoker-platform/web-app 0.5.113 → 0.5.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/Files.tsx +5 -5
- package/src/Tenant.tsx +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.115
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: dismiss navigation sidebar on collection selection
|
|
8
|
+
|
|
9
|
+
## 0.5.114
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fix: hide file name dialog on upload
|
|
14
|
+
|
|
3
15
|
## 0.5.113
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
package/src/Files.tsx
CHANGED
|
@@ -520,7 +520,7 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
|
|
|
520
520
|
[uploadFiles, shouldSkipPermissionsDialog, getDefaultPermissions],
|
|
521
521
|
)
|
|
522
522
|
|
|
523
|
-
const handleConfirmFilename = useCallback(
|
|
523
|
+
const handleConfirmFilename = useCallback(() => {
|
|
524
524
|
if (!pendingUploadFile) return
|
|
525
525
|
const trimmedName = editingFilename.trim()
|
|
526
526
|
const validationError = validateStorageName(trimmedName)
|
|
@@ -531,12 +531,12 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
|
|
|
531
531
|
if (shouldSkipPermissionsDialog()) {
|
|
532
532
|
if (uploadLockRef.current) return
|
|
533
533
|
uploadLockRef.current = true
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
} finally {
|
|
534
|
+
setShowFilenameDialog(false)
|
|
535
|
+
uploadFiles([pendingUploadFile], getDefaultPermissions(), trimmedName).finally(() => {
|
|
537
536
|
uploadLockRef.current = false
|
|
538
|
-
}
|
|
537
|
+
})
|
|
539
538
|
} else {
|
|
539
|
+
setShowFilenameDialog(false)
|
|
540
540
|
setShowPermissionsDialog(true)
|
|
541
541
|
}
|
|
542
542
|
}, [pendingUploadFile, editingFilename, shouldSkipPermissionsDialog, uploadFiles, getDefaultPermissions])
|
package/src/Tenant.tsx
CHANGED
|
@@ -102,6 +102,7 @@ function Tenant() {
|
|
|
102
102
|
const [search, setSearch] = useState<string>("")
|
|
103
103
|
const [searchFocused, setSearchFocused] = useState(false)
|
|
104
104
|
const [background, setBackground] = useState<Background | undefined>(undefined)
|
|
105
|
+
const [sidebarOpen, setSidebarOpen] = useState(false)
|
|
105
106
|
|
|
106
107
|
const { unsubscribe } = useCache()
|
|
107
108
|
|
|
@@ -644,7 +645,7 @@ function Tenant() {
|
|
|
644
645
|
</button>
|
|
645
646
|
</div>
|
|
646
647
|
|
|
647
|
-
<Sheet>
|
|
648
|
+
<Sheet open={sidebarOpen} onOpenChange={setSidebarOpen}>
|
|
648
649
|
<SheetTrigger asChild>
|
|
649
650
|
<Button size="icon" variant="outline" className="absolute left-4 lg:hidden dark">
|
|
650
651
|
<PanelLeft className="h-5 w-5 text-primary" />
|
|
@@ -677,11 +678,12 @@ function Tenant() {
|
|
|
677
678
|
? cn(className, "text-foreground")
|
|
678
679
|
: cn(className, "text-muted-foreground hover:text-foreground")
|
|
679
680
|
}
|
|
680
|
-
onClick={() =>
|
|
681
|
+
onClick={() => {
|
|
682
|
+
setSidebarOpen(false)
|
|
681
683
|
runViewTransition(() =>
|
|
682
684
|
navigate(`/${group.collections[0].toLowerCase()}`),
|
|
683
685
|
)
|
|
684
|
-
}
|
|
686
|
+
}}
|
|
685
687
|
>
|
|
686
688
|
{/* eslint-disable security/detect-object-injection */}
|
|
687
689
|
{iconNames[group.collections[0]]
|
|
@@ -707,11 +709,12 @@ function Tenant() {
|
|
|
707
709
|
"text-muted-foreground hover:text-foreground",
|
|
708
710
|
)
|
|
709
711
|
}
|
|
710
|
-
onClick={() =>
|
|
712
|
+
onClick={() => {
|
|
713
|
+
setSidebarOpen(false)
|
|
711
714
|
runViewTransition(() =>
|
|
712
715
|
navigate(`/${collection.toLowerCase()}`),
|
|
713
716
|
)
|
|
714
|
-
}
|
|
717
|
+
}}
|
|
715
718
|
>
|
|
716
719
|
{/* eslint-disable security/detect-object-injection */}
|
|
717
720
|
{iconNames[collection]
|