ux(quick-connect): hint users to Advanced for custom server username (#23) (#25)

Quick Connect now shows a one-line hint under the password field stating
that username defaults to 'opencode' and pointing to Advanced options for
servers using a custom OPENCODE_SERVER_USERNAME. Tap-target to switch
modes is included.

Closes #23

Co-authored-by: dzianisv <dzianis.varabyou@gmail.com>
This commit is contained in:
Den
2026-06-09 03:31:46 -07:00
committed by GitHub
parent 3bdeeb6bef
commit a9822048e4

View File

@@ -209,6 +209,13 @@ export default function AddConnectionScreen() {
onChangeText={setPassword} onChangeText={setPassword}
secureTextEntry secureTextEntry
/> />
<Text style={[styles.usernameHint, isDark && styles.hintDark]}>
Username defaults to <Text style={styles.code}>opencode</Text>. Custom username? Use{" "}
<Text style={styles.usernameHintLink} onPress={() => setMode("advanced")}>
Advanced options
</Text>
.
</Text>
{/* Connect button */} {/* Connect button */}
<TouchableOpacity <TouchableOpacity
@@ -524,6 +531,17 @@ const styles = StyleSheet.create({
paddingHorizontal: 4, paddingHorizontal: 4,
borderRadius: 4, borderRadius: 4,
}, },
usernameHint: {
fontSize: 12,
color: "#666666",
marginTop: 6,
marginBottom: 4,
lineHeight: 18,
},
usernameHintLink: {
color: "#6366f1",
fontWeight: "600",
},
advancedLink: { advancedLink: {
flexDirection: "row", flexDirection: "row",
alignItems: "center", alignItems: "center",