3
3
Button ,
4
4
Divider ,
5
5
H5 ,
6
+ H6 ,
6
7
InputGroup ,
7
8
Intent ,
8
9
} from '@blueprintjs/core'
@@ -11,7 +12,6 @@ import { useAtom } from 'jotai'
11
12
import { isEqual , omit } from 'lodash-es'
12
13
import { useMemo , useState } from 'react'
13
14
import { UseFieldArrayRemove , UseFormSetError } from 'react-hook-form'
14
- import { useEvent } from 'react-use'
15
15
16
16
import { AppToaster } from 'components/Toaster'
17
17
import { CopilotDocV1 } from 'models/copilot.schema'
@@ -200,16 +200,34 @@ const SheetGroup = ({
200
200
[ coverGroup ?. name ] ,
201
201
)
202
202
203
+ const GroupCount = useMemo (
204
+ ( ) => (
205
+ < H6 className = "my-2 text-center" >
206
+ 已显示全部 { existedGroups . length } 个干员组
207
+ </ H6 >
208
+ ) ,
209
+ [ existedGroups . length ] ,
210
+ )
211
+
203
212
return (
204
213
< >
205
214
{ FavCoverAlert }
206
215
< div className = "flex px-1" >
207
- < div className = "flex-1 sticky top-0 max-h-screen flex flex-col" >
208
- < div className = "grow h-full overflow-y-auto py-1" >
209
- < SheetContainerSkeleton title = "已设置的分组" icon = "cog" mini >
216
+ < div className = "flex-1 sticky top-0 h-screen flex flex-col" >
217
+ < div className = "grow overflow-y-auto" >
218
+ < SheetContainerSkeleton
219
+ title = "添加干员组"
220
+ icon = "add"
221
+ mini
222
+ className = "sticky top-0 z-10 backdrop-blur-lg py-1"
223
+ >
224
+ < EditorGroupName { ...{ eventHandleProxy } } />
225
+ </ SheetContainerSkeleton >
226
+ < SheetContainerSkeleton title = "已设置的干员组" icon = "cog" mini >
210
227
< div >
211
- { existedGroups . length
212
- ? existedGroups . map ( ( item ) => (
228
+ { existedGroups . length ? (
229
+ < >
230
+ { existedGroups . map ( ( item ) => (
213
231
< GroupItem
214
232
key = { item . name }
215
233
existedGroup = { existedGroups }
@@ -220,14 +238,15 @@ const SheetGroup = ({
220
238
pinned = { checkGroupPinned ( item ) }
221
239
eventHandleProxy = { eventHandleProxy }
222
240
/>
223
- ) )
224
- : GroupNoData }
241
+ ) ) }
242
+ { GroupCount }
243
+ </ >
244
+ ) : (
245
+ GroupNoData
246
+ ) }
225
247
</ div >
226
248
</ SheetContainerSkeleton >
227
249
</ div >
228
- < SheetContainerSkeleton title = "添加干员组" icon = "add" mini >
229
- < EditorGroupName { ...{ eventHandleProxy } } />
230
- </ SheetContainerSkeleton >
231
250
</ div >
232
251
< Divider />
233
252
< div className = "flex-1" >
0 commit comments