@@ -33,9 +33,9 @@ import { SettingsKey } from '../../../../data/settings-key';
33
33
import { SessionUtilUserProfile } from '../../../../session/utils/libsession/libsession_utils_user_profile' ;
34
34
import { getPasswordHash , Storage } from '../../../../util/storage' ;
35
35
import { SpacerXS } from '../../../basic/Text' ;
36
- import { PanelWithButtonInline } from '../../../buttons/panel/PanelWithButtonInline' ;
37
36
import { displayPasswordModal } from '../../../settings/SessionSettings' ;
38
37
import { SettingsToggleBasic } from '../components/SettingsToggleBasic' ;
38
+ import { SettingsPanelButtonInlineBasic } from '../components/SettingsPanelButtonInlineBasic' ;
39
39
40
40
type WithPasswordUpdatedCb = { onPasswordUpdated : ( action : string ) => void } ;
41
41
@@ -113,34 +113,18 @@ function StaticTypingBubble({ width }: { width: string }) {
113
113
function HasPasswordSubSection ( props : WithPasswordUpdatedCb ) {
114
114
return (
115
115
< PanelButtonGroup >
116
- < PanelWithButtonInline
117
- textElement = {
118
- < PanelButtonTextWithSubText
119
- text = { tr ( 'passwordChange' ) }
120
- subText = { tr ( 'passwordChangeShortDescription' ) }
121
- textDataTestId = { 'change-password-settings-text' }
122
- subTextDataTestId = { 'change-password-settings-sub-text' }
123
- />
124
- }
125
- rowDataTestId = { 'change-password-settings-row' }
126
- buttonDataTestId = { 'change-password-settings-button' }
127
- onClick = { async ( ) => {
128
- displayPasswordModal ( 'change' , props . onPasswordUpdated ) ;
129
- } }
116
+ < SettingsPanelButtonInlineBasic
117
+ baseDataTestId = "change-password"
118
+ textToken = "passwordChange"
119
+ subTextToken = "passwordChangeShortDescription"
120
+ onClick = { async ( ) => displayPasswordModal ( 'change' , props . onPasswordUpdated ) }
130
121
buttonColor = { SessionButtonColor . Primary }
131
122
buttonText = { tr ( 'change' ) }
132
123
/>
133
- < PanelWithButtonInline
134
- textElement = {
135
- < PanelButtonTextWithSubText
136
- text = { tr ( 'passwordRemove' ) }
137
- subText = { tr ( 'passwordRemoveShortDescription' ) }
138
- textDataTestId = { 'remove-password-settings-text' }
139
- subTextDataTestId = { 'remove-password-settings-sub-text' }
140
- />
141
- }
142
- rowDataTestId = { 'remove-password-settings-row' }
143
- buttonDataTestId = { 'remove-password-settings-button' }
124
+ < SettingsPanelButtonInlineBasic
125
+ baseDataTestId = "remove-password"
126
+ textToken = "passwordRemove"
127
+ subTextToken = "passwordRemoveShortDescription"
144
128
onClick = { async ( ) => {
145
129
displayPasswordModal ( 'remove' , props . onPasswordUpdated ) ;
146
130
} }
@@ -153,17 +137,10 @@ function HasPasswordSubSection(props: WithPasswordUpdatedCb) {
153
137
function NoPasswordSubSection ( props : WithPasswordUpdatedCb ) {
154
138
return (
155
139
< PanelButtonGroup >
156
- < PanelWithButtonInline
157
- textElement = {
158
- < PanelButtonTextWithSubText
159
- text = { tr ( 'passwordSet' ) }
160
- subText = { tr ( 'passwordSetShortDescription' ) }
161
- textDataTestId = { 'set-password-settings-text' }
162
- subTextDataTestId = { 'set-password-settings-sub-text' }
163
- />
164
- }
165
- rowDataTestId = { 'set-password-settings-row' }
166
- buttonDataTestId = { 'set-password-settings-button' }
140
+ < SettingsPanelButtonInlineBasic
141
+ baseDataTestId = "set-password"
142
+ textToken = "passwordSet"
143
+ subTextToken = "passwordSetShortDescription"
167
144
onClick = { async ( ) => {
168
145
displayPasswordModal ( 'set' , props . onPasswordUpdated ) ;
169
146
} }
0 commit comments