KI-AGENT: Persistente App-Sessions mit Refresh-Tokens ergänzen
This commit is contained in:
@@ -33,6 +33,7 @@ export default function LoginScreen() {
|
||||
|
||||
const [email, setEmail] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
||||
const [apiBaseUrl, setApiBaseUrl] = useState(getApiBaseUrlSync());
|
||||
const [serverInput, setServerInput] = useState(getApiBaseUrlSync());
|
||||
const [showServerModal, setShowServerModal] = useState(false);
|
||||
@@ -141,14 +142,23 @@ export default function LoginScreen() {
|
||||
/>
|
||||
|
||||
<Text style={styles.label}>Passwort</Text>
|
||||
<TextInput
|
||||
secureTextEntry
|
||||
placeholder="••••••••"
|
||||
placeholderTextColor="#9ca3af"
|
||||
style={styles.input}
|
||||
value={password}
|
||||
onChangeText={setPassword}
|
||||
/>
|
||||
<View style={styles.passwordRow}>
|
||||
<TextInput
|
||||
secureTextEntry={!isPasswordVisible}
|
||||
placeholder="••••••••"
|
||||
placeholderTextColor="#9ca3af"
|
||||
style={styles.passwordInput}
|
||||
value={password}
|
||||
onChangeText={setPassword}
|
||||
/>
|
||||
<Pressable
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={isPasswordVisible ? 'Passwort ausblenden' : 'Passwort einblenden'}
|
||||
style={styles.passwordToggle}
|
||||
onPress={() => setIsPasswordVisible((visible) => !visible)}>
|
||||
<Text style={styles.passwordToggleText}>{isPasswordVisible ? 'Ausblenden' : 'Anzeigen'}</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
|
||||
{error ? <Text style={styles.error}>{error}</Text> : null}
|
||||
|
||||
@@ -251,6 +261,30 @@ const styles = StyleSheet.create({
|
||||
fontSize: 16,
|
||||
color: '#111827',
|
||||
},
|
||||
passwordRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
borderWidth: 1,
|
||||
borderColor: '#d1d5db',
|
||||
borderRadius: 10,
|
||||
},
|
||||
passwordInput: {
|
||||
flex: 1,
|
||||
paddingHorizontal: 12,
|
||||
paddingVertical: 10,
|
||||
fontSize: 16,
|
||||
color: '#111827',
|
||||
},
|
||||
passwordToggle: {
|
||||
alignSelf: 'stretch',
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 12,
|
||||
},
|
||||
passwordToggleText: {
|
||||
color: PRIMARY,
|
||||
fontSize: 13,
|
||||
fontWeight: '600',
|
||||
},
|
||||
button: {
|
||||
marginTop: 6,
|
||||
backgroundColor: PRIMARY,
|
||||
|
||||
Reference in New Issue
Block a user