Update files
This commit is contained in:
@@ -163,6 +163,15 @@ export function SelectField({
|
||||
[getWebKey, onPress, preventWebDefault]
|
||||
);
|
||||
|
||||
const normalizedValue = (value ?? "").trim();
|
||||
const normalizedPlaceholder = (placeholder ?? "").trim();
|
||||
const hasConcreteValue =
|
||||
normalizedValue.length > 0 &&
|
||||
(normalizedPlaceholder.length === 0 || normalizedValue !== normalizedPlaceholder);
|
||||
const displayText = hasConcreteValue
|
||||
? normalizedValue
|
||||
: (normalizedPlaceholder || "Select...");
|
||||
|
||||
return (
|
||||
<View style={styles.selectFieldContainer}>
|
||||
<Pressable
|
||||
@@ -423,6 +432,14 @@ export function FormSelectTrigger({
|
||||
},
|
||||
[getWebKey, onPress, preventWebDefault]
|
||||
);
|
||||
const normalizedValue = (value ?? "").trim();
|
||||
const normalizedPlaceholder = (placeholder ?? "").trim();
|
||||
const hasConcreteValue =
|
||||
normalizedValue.length > 0 &&
|
||||
(normalizedPlaceholder.length === 0 || normalizedValue !== normalizedPlaceholder);
|
||||
const displayText = hasConcreteValue
|
||||
? normalizedValue
|
||||
: (normalizedPlaceholder || "Select...");
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
@@ -451,11 +468,11 @@ export function FormSelectTrigger({
|
||||
<ActivityIndicator size="small" color={defaultTheme.colors.foregroundMuted} />
|
||||
) : (
|
||||
<Text
|
||||
style={value ? styles.compactSelectValue : styles.compactSelectPlaceholder}
|
||||
style={hasConcreteValue ? styles.compactSelectValue : styles.compactSelectPlaceholder}
|
||||
numberOfLines={1}
|
||||
ellipsizeMode={valueEllipsizeMode}
|
||||
>
|
||||
{value || placeholder || "Select..."}
|
||||
{displayText}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
@@ -1426,7 +1443,10 @@ const styles = StyleSheet.create((theme) => ({
|
||||
paddingVertical: theme.spacing[1],
|
||||
},
|
||||
agentConfigRow: {
|
||||
flexDirection: "row",
|
||||
flexDirection: {
|
||||
xs: "column",
|
||||
md: "row",
|
||||
},
|
||||
gap: theme.spacing[2],
|
||||
},
|
||||
agentConfigColumn: {
|
||||
|
||||
@@ -1206,7 +1206,10 @@ const stylesheet = StyleSheet.create((theme) => ({
|
||||
},
|
||||
list: {
|
||||
flex: 1,
|
||||
paddingHorizontal: theme.spacing[2],
|
||||
paddingHorizontal: {
|
||||
xs: theme.spacing[2],
|
||||
md: theme.spacing[4],
|
||||
},
|
||||
},
|
||||
streamItemWrapper: {
|
||||
width: "100%",
|
||||
|
||||
@@ -1050,24 +1050,18 @@ export function GitDiffPane({ serverId, agentId, cwd }: GitDiffPaneProps) {
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={gitActions.primary.label}
|
||||
>
|
||||
<View style={styles.splitButtonPrimaryInner}>
|
||||
<View
|
||||
style={[
|
||||
styles.splitButtonContent,
|
||||
gitActions.primary.status === "pending" && styles.splitButtonContentHidden,
|
||||
]}
|
||||
>
|
||||
{gitActions.primary.status === "pending" ? (
|
||||
<ActivityIndicator
|
||||
size="small"
|
||||
color={theme.colors.foreground}
|
||||
style={styles.splitButtonSpinnerOnly}
|
||||
/>
|
||||
) : (
|
||||
<View style={styles.splitButtonContent}>
|
||||
{gitActions.primary.icon}
|
||||
<Text style={styles.splitButtonText}>{getActionDisplayLabel(gitActions.primary)}</Text>
|
||||
</View>
|
||||
{gitActions.primary.status === "pending" ? (
|
||||
<ActivityIndicator
|
||||
size="small"
|
||||
color={theme.colors.foreground}
|
||||
style={styles.splitButtonSpinnerOverlay}
|
||||
/>
|
||||
) : null}
|
||||
</View>
|
||||
)}
|
||||
</Pressable>
|
||||
{gitActions.secondary.length > 0 ? (
|
||||
<DropdownMenu>
|
||||
@@ -1306,11 +1300,6 @@ const styles = StyleSheet.create((theme) => ({
|
||||
justifyContent: "center",
|
||||
position: "relative",
|
||||
},
|
||||
splitButtonPrimaryInner: {
|
||||
position: "relative",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
},
|
||||
splitButtonPrimaryDisabled: {
|
||||
opacity: 0.6,
|
||||
},
|
||||
@@ -1326,11 +1315,7 @@ const styles = StyleSheet.create((theme) => ({
|
||||
justifyContent: "center",
|
||||
gap: theme.spacing[2],
|
||||
},
|
||||
splitButtonContentHidden: {
|
||||
opacity: 0,
|
||||
},
|
||||
splitButtonSpinnerOverlay: {
|
||||
position: "absolute",
|
||||
splitButtonSpinnerOnly: {
|
||||
transform: [{ scale: 0.8 }],
|
||||
},
|
||||
splitButtonCaret: {
|
||||
|
||||
Reference in New Issue
Block a user