mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
updating seal modal
This commit is contained in:
parent
55f8519ef7
commit
1d3f4caf55
@ -211,12 +211,18 @@ export function Settings() {
|
||||
<View style={styles.modalInput}>
|
||||
<TextInput style={styles.inputText} value={state.sealPassword} onChangeText={actions.setSealPassword}
|
||||
autoCapitalize={'none'} secureTextEntry={state.hidePassword} placeholder={state.strings.password}
|
||||
placeholderTextColor={Colors.placeholderText} />
|
||||
placeholderTextColor={Colors.inputPlaceholder} />
|
||||
<TouchableOpacity style={styles.inputVisibility} activeOpacity={1} onPress={actions.showPassword}>
|
||||
<MatIcons name="eye-outline" size={16} color={Colors.inputPlaceholder} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<View style={styles.modalInput}>
|
||||
<TextInput style={styles.inputText} value={state.sealConfirm} onChangeText={actions.setSealConfirm}
|
||||
autoCapitalize={'none'} secureTextEntry={state.hideConfirm} placeholder={state.strings.confirmPassword}
|
||||
placeholderTextColor={Colors.placeholderText} />
|
||||
placeholderTextColor={Colors.inputPlaceholder} />
|
||||
<TouchableOpacity style={styles.inputVisibility} activeOpacity={1} onPress={actions.showConfirm}>
|
||||
<MatIcons name="eye-outline" size={16} color={Colors.inputPlaceholder} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
{ state.sealPassword === state.sealConfirm && state.sealPassword && (
|
||||
<TouchableOpacity style={styles.enabledButton} activeOpacity={1} onPress={actions.generateKey}>
|
||||
|
@ -151,20 +151,27 @@ export const styles = StyleSheet.create({
|
||||
paddingBottom: 16,
|
||||
},
|
||||
modalInput: {
|
||||
width: '100%',
|
||||
paddingRight: 32,
|
||||
paddingLeft: 32,
|
||||
marginRight: 32,
|
||||
marginLeft: 32,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'row',
|
||||
},
|
||||
inputText: {
|
||||
width: '100%',
|
||||
flex: 1,
|
||||
paddingLeft: 8,
|
||||
paddingRight: 8,
|
||||
paddingTop: 4,
|
||||
paddingBottom: 4,
|
||||
borderRadius: 4,
|
||||
marginTop: 8,
|
||||
margin: 4,
|
||||
backgroundColor: Colors.inputBase,
|
||||
},
|
||||
inputVisibility: {
|
||||
position: 'absolute',
|
||||
right: 16,
|
||||
},
|
||||
enabledButton: {
|
||||
marginTop: 32,
|
||||
marginBottom: 16,
|
||||
|
@ -73,7 +73,7 @@ export function useSettings() {
|
||||
await profile.actions.setMonthLast(flag);
|
||||
},
|
||||
showEditSeal: () => {
|
||||
updateState({ editSeal: true });
|
||||
updateState({ editSeal: true, sealPassword: null, sealConfirm: null });
|
||||
},
|
||||
hideEditSeal: () => {
|
||||
updateState({ editSeal: false });
|
||||
@ -84,6 +84,18 @@ export function useSettings() {
|
||||
setSealConfirm: (sealConfirm) => {
|
||||
updateState({ sealConfirm });
|
||||
},
|
||||
showPassword: () => {
|
||||
updateState({ hidePassword: false });
|
||||
},
|
||||
hidePassword: () => {
|
||||
updateState({ hidePassword: true });
|
||||
},
|
||||
showConfirm: () => {
|
||||
updateState({ hideConfirm: false });
|
||||
},
|
||||
hideConfirm: () => {
|
||||
updateState({ hideConfirm: true });
|
||||
},
|
||||
generateKey: () => {
|
||||
console.log("GENERATE KEY");
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user