@stoker-platform/web-app 0.5.114 → 0.5.116
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 +10 -8
- 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.116
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: prevent file thumbnail layout shift
|
|
8
|
+
|
|
9
|
+
## 0.5.115
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- feat: dismiss navigation sidebar on collection selection
|
|
14
|
+
|
|
3
15
|
## 0.5.114
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
package/src/Files.tsx
CHANGED
|
@@ -138,14 +138,16 @@ const FileImageThumbnail = ({ storage, fullPath, fileName, pathPrefix }: FileIma
|
|
|
138
138
|
return <File className="h-5 w-5 shrink-0 text-gray-500" aria-hidden />
|
|
139
139
|
}
|
|
140
140
|
return (
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
<div className="h-12 w-12 shrink-0 rounded-md flex items-center justify-center">
|
|
142
|
+
<img
|
|
143
|
+
src={url}
|
|
144
|
+
alt={`Thumbnail for ${fileName}`}
|
|
145
|
+
className="rounded-md max-h-12 max-w-12 object-contain"
|
|
146
|
+
loading="lazy"
|
|
147
|
+
decoding="async"
|
|
148
|
+
onError={() => setPhase("fallback")}
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
149
151
|
)
|
|
150
152
|
}
|
|
151
153
|
|
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]
|