File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 36
36
"back" : " Extract to back"
37
37
},
38
38
"input_password" : " Please input share code" ,
39
- "copy_msg" : " Copy link"
39
+ "copy_msg" : " Copy link" ,
40
+ "no_permission_tip" : " To create a share, you need \" Share\" permission."
40
41
}
Original file line number Diff line number Diff line change 6
6
Tbody ,
7
7
Th ,
8
8
Thead ,
9
+ Tooltip ,
9
10
Tr ,
10
11
VStack ,
11
12
} from "@hope-ui/solid"
@@ -51,14 +52,22 @@ const Shares = () => {
51
52
>
52
53
{ t ( "global.refresh" ) }
53
54
</ Button >
54
- < Button
55
- disabled = { ! canShare }
56
- onClick = { ( ) => {
57
- to ( "/@manage/shares/add" )
58
- } }
55
+ < Show
56
+ when = { ! canShare }
57
+ fallback = {
58
+ < Button onClick = { ( ) => to ( "/@manage/shares/add" ) } >
59
+ { t ( "global.add" ) }
60
+ </ Button >
61
+ }
59
62
>
60
- { t ( "global.add" ) }
61
- </ Button >
63
+ < Tooltip
64
+ withArrow
65
+ label = { t ( "shares.no_permission_tip" ) }
66
+ placement = "right"
67
+ >
68
+ < Button disabled > { t ( "global.add" ) } </ Button >
69
+ </ Tooltip >
70
+ </ Show >
62
71
</ HStack >
63
72
< Box w = "$full" overflowX = "auto" >
64
73
< Table highlightOnHover dense >
You can’t perform that action at this time.
0 commit comments