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}>
|
<View style={styles.modalInput}>
|
||||||
<TextInput style={styles.inputText} value={state.sealPassword} onChangeText={actions.setSealPassword}
|
<TextInput style={styles.inputText} value={state.sealPassword} onChangeText={actions.setSealPassword}
|
||||||
autoCapitalize={'none'} secureTextEntry={state.hidePassword} placeholder={state.strings.password}
|
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>
|
||||||
<View style={styles.modalInput}>
|
<View style={styles.modalInput}>
|
||||||
<TextInput style={styles.inputText} value={state.sealConfirm} onChangeText={actions.setSealConfirm}
|
<TextInput style={styles.inputText} value={state.sealConfirm} onChangeText={actions.setSealConfirm}
|
||||||
autoCapitalize={'none'} secureTextEntry={state.hideConfirm} placeholder={state.strings.confirmPassword}
|
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>
|
</View>
|
||||||
{ state.sealPassword === state.sealConfirm && state.sealPassword && (
|
{ state.sealPassword === state.sealConfirm && state.sealPassword && (
|
||||||
<TouchableOpacity style={styles.enabledButton} activeOpacity={1} onPress={actions.generateKey}>
|
<TouchableOpacity style={styles.enabledButton} activeOpacity={1} onPress={actions.generateKey}>
|
||||||
|
@ -151,20 +151,27 @@ export const styles = StyleSheet.create({
|
|||||||
paddingBottom: 16,
|
paddingBottom: 16,
|
||||||
},
|
},
|
||||||
modalInput: {
|
modalInput: {
|
||||||
width: '100%',
|
marginRight: 32,
|
||||||
paddingRight: 32,
|
marginLeft: 32,
|
||||||
paddingLeft: 32,
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
inputText: {
|
inputText: {
|
||||||
width: '100%',
|
flex: 1,
|
||||||
paddingLeft: 8,
|
paddingLeft: 8,
|
||||||
paddingRight: 8,
|
paddingRight: 8,
|
||||||
paddingTop: 4,
|
paddingTop: 4,
|
||||||
paddingBottom: 4,
|
paddingBottom: 4,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
marginTop: 8,
|
margin: 4,
|
||||||
backgroundColor: Colors.inputBase,
|
backgroundColor: Colors.inputBase,
|
||||||
},
|
},
|
||||||
|
inputVisibility: {
|
||||||
|
position: 'absolute',
|
||||||
|
right: 16,
|
||||||
|
},
|
||||||
enabledButton: {
|
enabledButton: {
|
||||||
marginTop: 32,
|
marginTop: 32,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
|
@ -73,7 +73,7 @@ export function useSettings() {
|
|||||||
await profile.actions.setMonthLast(flag);
|
await profile.actions.setMonthLast(flag);
|
||||||
},
|
},
|
||||||
showEditSeal: () => {
|
showEditSeal: () => {
|
||||||
updateState({ editSeal: true });
|
updateState({ editSeal: true, sealPassword: null, sealConfirm: null });
|
||||||
},
|
},
|
||||||
hideEditSeal: () => {
|
hideEditSeal: () => {
|
||||||
updateState({ editSeal: false });
|
updateState({ editSeal: false });
|
||||||
@ -84,6 +84,18 @@ export function useSettings() {
|
|||||||
setSealConfirm: (sealConfirm) => {
|
setSealConfirm: (sealConfirm) => {
|
||||||
updateState({ sealConfirm });
|
updateState({ sealConfirm });
|
||||||
},
|
},
|
||||||
|
showPassword: () => {
|
||||||
|
updateState({ hidePassword: false });
|
||||||
|
},
|
||||||
|
hidePassword: () => {
|
||||||
|
updateState({ hidePassword: true });
|
||||||
|
},
|
||||||
|
showConfirm: () => {
|
||||||
|
updateState({ hideConfirm: false });
|
||||||
|
},
|
||||||
|
hideConfirm: () => {
|
||||||
|
updateState({ hideConfirm: true });
|
||||||
|
},
|
||||||
generateKey: () => {
|
generateKey: () => {
|
||||||
console.log("GENERATE KEY");
|
console.log("GENERATE KEY");
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user