mirror of
https://github.com/balzack/databag.git
synced 2025-04-23 01:55:17 +00:00
avoiding text input label on android
This commit is contained in:
parent
9fd27706bb
commit
0ba2eeab96
@ -1,5 +1,5 @@
|
||||
import React, {useState} from 'react';
|
||||
import {View, Image} from 'react-native';
|
||||
import {Platform, View, Image} from 'react-native';
|
||||
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
|
||||
import {useAccess} from './useAccess.hook';
|
||||
import {styles} from './Access.styled';
|
||||
@ -66,7 +66,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.server}
|
||||
label={Platform.OS==='ios'?state.strings.server:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.server:undefined}
|
||||
value={state.node}
|
||||
left={<TextInput.Icon style={styles.icon} icon="server" />}
|
||||
onChangeText={value => actions.setNode(value)}
|
||||
@ -77,7 +78,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.username}
|
||||
label={Platform.OS==='ios'?state.strings.username:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.username:undefined}
|
||||
value={state.username}
|
||||
left={<TextInput.Icon style={styles.icon} icon="account" />}
|
||||
onChangeText={value => actions.setUsername(value)}
|
||||
@ -89,7 +91,8 @@ export function Access() {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.password}
|
||||
label={state.strings.password}
|
||||
label={Platform.OS==='ios'?state.strings.password:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.password:undefined}
|
||||
secureTextEntry={!showPassword}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -128,7 +131,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.token}
|
||||
label={Platform.OS==='ios'?state.strings.token:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.token:undefined}
|
||||
left={<TextInput.Icon style={styles.icon} icon="ticket-account" />}
|
||||
onChangeText={value => actions.setToken(value)}
|
||||
/>
|
||||
@ -138,7 +142,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.server}
|
||||
label={Platform.OS==='ios'?state.strings.server:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.server:undefined}
|
||||
value={state.node}
|
||||
left={<TextInput.Icon style={styles.icon} icon="server" />}
|
||||
onChangeText={value => actions.setNode(value)}
|
||||
@ -165,7 +170,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.token}
|
||||
label={Platform.OS==='ios'?state.strings.token:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.token:undefined}
|
||||
left={<TextInput.Icon style={styles.icon} icon="ticket-account" />}
|
||||
onChangeText={value => actions.setToken(value)}
|
||||
/>
|
||||
@ -177,7 +183,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.server}
|
||||
label={Platform.OS==='ios'?state.strings.server:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.server:undefined}
|
||||
value={state.node}
|
||||
left={<TextInput.Icon style={styles.icon} icon="server" />}
|
||||
onChangeText={value => actions.setNode(value)}
|
||||
@ -189,7 +196,8 @@ export function Access() {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
error={state.taken}
|
||||
label={state.strings.username}
|
||||
label={Platform.OS==='ios'?state.strings.username:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.username:undefined}
|
||||
value={state.username}
|
||||
left={<TextInput.Icon style={styles.icon} icon="account" />}
|
||||
onChangeText={value => actions.setUsername(value)}
|
||||
@ -202,7 +210,8 @@ export function Access() {
|
||||
autoCorrect={false}
|
||||
textContentType={'oneTimeCode'}
|
||||
value={state.password}
|
||||
label={state.strings.password}
|
||||
label={Platform.OS==='ios'?state.strings.password:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.password:undefined}
|
||||
secureTextEntry={!showPassword}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -222,7 +231,8 @@ export function Access() {
|
||||
autoCorrect={false}
|
||||
textContentType={'oneTimeCode'}
|
||||
value={state.confirm}
|
||||
label={state.strings.confirmPassword}
|
||||
label={Platform.OS==='ios'?state.strings.confirmPassword:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.confirmPassword:undefined}
|
||||
secureTextEntry={!showConfirm}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -254,7 +264,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.server}
|
||||
label={Platform.OS==='ios'?state.strings.server:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.server:undefined}
|
||||
value={state.node}
|
||||
left={<TextInput.Icon style={styles.icon} icon="server" />}
|
||||
onChangeText={value => actions.setNode(value)}
|
||||
@ -265,7 +276,8 @@ export function Access() {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label="Password"
|
||||
label={Platform.OS==='ios'?state.strings.password:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.password:undefined}
|
||||
value={state.password}
|
||||
secureTextEntry={!showPassword}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
|
@ -239,6 +239,7 @@ export const styles = StyleSheet.create({
|
||||
labelSet: {
|
||||
fontSize: 16,
|
||||
flexGrow: 1,
|
||||
width: '10%',
|
||||
},
|
||||
allControl: {
|
||||
flexShrink: 1,
|
||||
|
@ -713,7 +713,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.sealPassword}
|
||||
label={state.strings.password}
|
||||
label={Platofrm.OS==='ios'?state.strings.password:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.password:undefined}
|
||||
secureTextEntry={!showPassword}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -732,7 +733,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.sealConfirm}
|
||||
label={state.strings.confirmPassword}
|
||||
label={Platform.OS==='ios'?state.strings.confirmPassword:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.confirmPassword:undefined}
|
||||
secureTextEntry={!showConfirm}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -764,7 +766,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.sealPassword}
|
||||
label={state.strings.password}
|
||||
label={Platform.OS==='ios'?state.strings.password:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.password:undefined}
|
||||
secureTextEntry={!showPassword}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -823,7 +826,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.sealDelete}
|
||||
label={state.strings.deleteKey}
|
||||
label={Platform.OS==='ios'?state.strings.deleteKey:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.deleteKey:undefined}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
onChangeText={value => actions.setSealDelete(value)}
|
||||
/>
|
||||
@ -845,7 +849,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.sealPassword}
|
||||
label={state.strings.password}
|
||||
label={Platform.OS==='ios'?state.strings.password:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.password:undefined}
|
||||
secureTextEntry={!showPassword}
|
||||
left={<TextInput.Icon style={styles.icon} icon="lock" />}
|
||||
right={
|
||||
@ -884,7 +889,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.name}
|
||||
label={Platform.OS==='ios'?state.strings.name:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.name:undefined}
|
||||
value={state.name}
|
||||
left={<TextInput.Icon style={styles.inputIcon} icon="account" />}
|
||||
onChangeText={value => actions.setName(value)}
|
||||
@ -895,7 +901,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.location}
|
||||
label={Platform.OS==='ios'?state.strings.location:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.location:undefined}
|
||||
value={state.location}
|
||||
left={<TextInput.Icon style={styles.inputIcon} icon="map-marker-outline" />}
|
||||
onChangeText={value => actions.setLocation(value)}
|
||||
@ -906,7 +913,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoCapitalize="none"
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
label={state.strings.description}
|
||||
label={Platform.OS==='ios'?state.strings.description:undefined}
|
||||
placeholdfer={Platform.OS!=='ios'?state.strings.description:undefined}
|
||||
value={state.description}
|
||||
left={<TextInput.Icon style={styles.inputIcon} icon="book-open-outline" />}
|
||||
onChangeText={value => actions.setDescription(value)}
|
||||
@ -1103,7 +1111,8 @@ export function Settings({showLogout}: {showLogout: boolean}) {
|
||||
autoComplete="off"
|
||||
autoCorrect={false}
|
||||
value={state.remove}
|
||||
label={state.strings.deleteKey}
|
||||
label={Platform.OS==='ios'?state.strings.deleteKey:undefined}
|
||||
placeholder={Platform.OS!=='ios'?state.strings.deleteKey:undefined}
|
||||
left={<TextInput.Icon style={styles.icon} icon="delete-outline" />}
|
||||
onChangeText={value => actions.setRemove(value)}
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user