File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
authorizations/components/redesigned Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,16 @@ type ReduxProps = ConnectedProps<typeof connector>
25
25
type Props = ReduxProps
26
26
27
27
const DisplayTokenOverlay : FC < Props > = props => {
28
- const { onClose} = useContext ( OverlayContext )
28
+ const { onClose, overlayID } = useContext ( OverlayContext )
29
29
30
30
return (
31
31
< Overlay . Container maxWidth = { 750 } >
32
32
< Overlay . Header
33
- title = "You've successfully created an API token"
33
+ title = {
34
+ overlayID === 'access-token'
35
+ ? "You've successfully created an API Token"
36
+ : "You've successfully cloned an API Token"
37
+ }
34
38
onDismiss = { onClose }
35
39
wrapText = { true }
36
40
/>
Original file line number Diff line number Diff line change @@ -156,7 +156,9 @@ class TokensRow extends PureComponent<Props> {
156
156
description : incrementCloneName ( allTokenDescriptions , description ) ,
157
157
} )
158
158
event ( 'token.clone.success' , { id : this . props . auth . id , name : description } )
159
- this . props . showOverlay ( 'access-token' , null , ( ) => dismissOverlay ( ) )
159
+ this . props . showOverlay ( 'access-cloned-token' , null , ( ) =>
160
+ dismissOverlay ( )
161
+ )
160
162
} catch {
161
163
event ( 'token.clone.failure' , { id : this . props . auth . id , name : description } )
162
164
}
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ export const OverlayController: FunctionComponent = () => {
64
64
useMemo ( ( ) => {
65
65
switch ( overlayID ) {
66
66
case 'add-note' :
67
+ activeOverlay . current = < NoteEditorOverlay onClose = { onClose } />
68
+ break
67
69
case 'edit-note' :
68
70
activeOverlay . current = < NoteEditorOverlay onClose = { onClose } />
69
71
break
@@ -73,6 +75,9 @@ export const OverlayController: FunctionComponent = () => {
73
75
case 'add-custom-token' :
74
76
activeOverlay . current = < CustomApiTokenOverlay onClose = { onClose } />
75
77
break
78
+ case 'access-cloned-token' :
79
+ activeOverlay . current = < DisplayTokenOverlay />
80
+ break
76
81
case 'access-token' :
77
82
activeOverlay . current = < DisplayTokenOverlay />
78
83
break
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export type OverlayID =
10
10
| 'edit-note'
11
11
| 'add-master-token'
12
12
| 'access-token'
13
+ | 'access-cloned-token'
13
14
| 'add-custom-token'
14
15
| 'add-token'
15
16
| 'telegraf-config'
You can’t perform that action at this time.
0 commit comments