1
1
"use client" ;
2
2
3
3
import React , { useEffect , useRef } from "react" ;
4
+ import styles from "./token-encoder.module.scss"
4
5
import { EncodedJwtOutputComponent } from "@/features/encoder/components/encoded-jwt-output.component" ;
5
6
import { TokenEncoderInputComponent } from "@/features/encoder/components/token-encoder-input.component" ;
6
7
import { useEncoderStore } from "@/features/encoder/services/encoder.store" ;
@@ -10,6 +11,7 @@ import { SigningAlgCategoryValues } from "@/features/common/values/signing-alg-c
10
11
import { WidgetComponent } from "@/features/common/components/widget/widget/widget.component" ;
11
12
import { dataTestidDictionary } from "@/libs/testing/data-testid.dictionary" ;
12
13
import { DebuggerWidgetValues } from "@/features/common/values/debugger-widget.values" ;
14
+ import { WidgetAlgPickerComponent } from "@/features/debugger/components/debugger-alg-picker/debugger-alg-picker.component" ;
13
15
14
16
interface TokenEncoderComponentProps {
15
17
languageCode : string ;
@@ -99,27 +101,37 @@ export const TokenEncoderComponent: React.FC<TokenEncoderComponentProps> = ({
99
101
} , [ encoderInputs$ , loadEncoderInputs , headlineConfig . isVisible ] ) ;
100
102
101
103
return (
102
- < WidgetComponent
103
- id = { dataTestidDictionary . encoder . id }
104
- widget = { DebuggerWidgetValues . ENCODER }
105
- languageCode = { languageCode }
106
- headlineConfig = { headlineConfig }
107
- title = { dictionary . title }
108
- description = { dictionary . description }
109
- exampleGenerator = { dictionary . exampleGenerator }
110
- contentInput = {
111
- < TokenEncoderInputComponent
104
+ < >
105
+ < div className = { styles . input__description } >
106
+ < span > { dictionary . description } </ span >
107
+ < WidgetAlgPickerComponent
108
+ label = { dictionary . exampleGenerator . label }
112
109
languageCode = { languageCode }
113
- dictionary = { dictionary }
110
+ widget = { DebuggerWidgetValues . ENCODER }
114
111
/>
115
- }
116
- contentOutput = {
117
- < EncodedJwtOutputComponent
118
- languageCode = { languageCode }
119
- dictionary = { dictionary . encodedJwt }
120
- />
121
- }
122
- warnings = { encodingWarnings$ }
123
- />
112
+ </ div >
113
+ < WidgetComponent
114
+ id = { dataTestidDictionary . encoder . id }
115
+ widget = { DebuggerWidgetValues . ENCODER }
116
+ languageCode = { languageCode }
117
+ headlineConfig = { headlineConfig }
118
+ title = { dictionary . title }
119
+ description = { dictionary . description }
120
+ exampleGenerator = { dictionary . exampleGenerator }
121
+ contentInput = {
122
+ < TokenEncoderInputComponent
123
+ languageCode = { languageCode }
124
+ dictionary = { dictionary }
125
+ />
126
+ }
127
+ contentOutput = {
128
+ < EncodedJwtOutputComponent
129
+ languageCode = { languageCode }
130
+ dictionary = { dictionary . encodedJwt }
131
+ />
132
+ }
133
+ warnings = { encodingWarnings$ }
134
+ />
135
+ </ >
124
136
) ;
125
137
} ;
0 commit comments