From d2e8f4444fb1ada6df943d653a64e1ccb8fdd93d Mon Sep 17 00:00:00 2001 From: Eddy de Vink Date: Sat, 27 Jun 2026 22:58:27 +0200 Subject: [PATCH] feat: pre-fill WebDAV URL, add password visibility toggle --- src/screens/SettingsScreen.tsx | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/screens/SettingsScreen.tsx b/src/screens/SettingsScreen.tsx index 2467cc5..930d3ac 100644 --- a/src/screens/SettingsScreen.tsx +++ b/src/screens/SettingsScreen.tsx @@ -27,9 +27,10 @@ export async function getWebDAVConfig(): Promise { } export default function SettingsScreen() { - const [url, setUrl] = useState('') + const [url, setUrl] = useState('https://nextcloud.eddydevink.nl') const [username, setUsername] = useState('') const [password, setPassword] = useState('') + const [showPassword, setShowPassword] = useState(false) const [syncing, setSyncing] = useState(false) useEffect(() => { @@ -77,7 +78,7 @@ export default function SettingsScreen() { style={styles.input} value={url} onChangeText={setUrl} - placeholder="https://nextcloud.example.nl/remote.php/dav/files/gebruiker/" + placeholder="https://nextcloud.eddydevink.nl/remote.php/dav/files/gebruiker/" autoCapitalize="none" autoCorrect={false} /> @@ -92,12 +93,18 @@ export default function SettingsScreen() { /> Wachtwoord - + + + setShowPassword(!showPassword)}> + {showPassword ? '👁' : '👁‍🗨'} + + Instellingen opslaan @@ -124,6 +131,10 @@ const styles = StyleSheet.create({ sectionTitle: { fontSize: 18, fontWeight: '700', marginBottom: 16 }, label: { fontSize: 14, fontWeight: '600', color: '#333', marginBottom: 4, marginTop: 12 }, input: { backgroundColor: '#fff', borderRadius: 8, padding: 12, fontSize: 16, borderWidth: 1, borderColor: '#ddd' }, + passwordRow: { flexDirection: 'row', alignItems: 'center', backgroundColor: '#fff', borderRadius: 8, borderWidth: 1, borderColor: '#ddd' }, + passwordInput: { flex: 1, padding: 12, fontSize: 16 }, + eyeButton: { padding: 12 }, + eyeIcon: { fontSize: 20 }, saveButton: { backgroundColor: '#4CAF50', padding: 14, borderRadius: 8, alignItems: 'center', marginTop: 24 }, clearButton: { padding: 14, alignItems: 'center', marginTop: 8 }, clearButtonText: { color: '#e53935', fontSize: 14 },