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>
2525type Props = ReduxProps
2626
2727const DisplayTokenOverlay : FC < Props > = props => {
28- const { onClose} = useContext ( OverlayContext )
28+ const { onClose, overlayID } = useContext ( OverlayContext )
2929
3030 return (
3131 < Overlay . Container maxWidth = { 750 } >
3232 < 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+ }
3438 onDismiss = { onClose }
3539 wrapText = { true }
3640 />
Original file line number Diff line number Diff line change @@ -156,7 +156,9 @@ class TokensRow extends PureComponent<Props> {
156156 description : incrementCloneName ( allTokenDescriptions , description ) ,
157157 } )
158158 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+ )
160162 } catch {
161163 event ( 'token.clone.failure' , { id : this . props . auth . id , name : description } )
162164 }
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ export const OverlayController: FunctionComponent = () => {
6464 useMemo ( ( ) => {
6565 switch ( overlayID ) {
6666 case 'add-note' :
67+ activeOverlay . current = < NoteEditorOverlay onClose = { onClose } />
68+ break
6769 case 'edit-note' :
6870 activeOverlay . current = < NoteEditorOverlay onClose = { onClose } />
6971 break
@@ -73,6 +75,9 @@ export const OverlayController: FunctionComponent = () => {
7375 case 'add-custom-token' :
7476 activeOverlay . current = < CustomApiTokenOverlay onClose = { onClose } />
7577 break
78+ case 'access-cloned-token' :
79+ activeOverlay . current = < DisplayTokenOverlay />
80+ break
7681 case 'access-token' :
7782 activeOverlay . current = < DisplayTokenOverlay />
7883 break
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export type OverlayID =
1010 | 'edit-note'
1111 | 'add-master-token'
1212 | 'access-token'
13+ | 'access-cloned-token'
1314 | 'add-custom-token'
1415 | 'add-token'
1516 | 'telegraf-config'
You can’t perform that action at this time.
0 commit comments