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