mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 16:02:55 +00:00
Pin the new tab button outside the tab scroll view
Move the "New tab" button out of ScrollView so that it remains visible and reachable regardless of how far the tabs have been scrolled.
This commit is contained in:
@@ -4642,28 +4642,27 @@ export default function SessionScreen() {
|
||||
</View>
|
||||
</Pressable>
|
||||
))}
|
||||
<Pressable
|
||||
style={({ pressed }) => [
|
||||
styles.newTerminalButton,
|
||||
pressed && styles.newTerminalButtonPressed,
|
||||
(creating ||
|
||||
creatingBrowser ||
|
||||
creatingMarkdown ||
|
||||
connState !== 'connected') &&
|
||||
styles.newTerminalButtonDisabled
|
||||
]}
|
||||
disabled={
|
||||
creating || creatingBrowser || creatingMarkdown || connState !== 'connected'
|
||||
}
|
||||
onPress={() => {
|
||||
setCreateError('')
|
||||
setShowCreateTabDrawer(true)
|
||||
}}
|
||||
accessibilityLabel="New tab"
|
||||
>
|
||||
<Plus size={16} color={colors.textSecondary} strokeWidth={2.2} />
|
||||
</Pressable>
|
||||
</ScrollView>
|
||||
{/* Why: pinned outside the scroll strip so the new-agent button
|
||||
stays reachable no matter how far the tabs scroll. */}
|
||||
<Pressable
|
||||
style={({ pressed }) => [
|
||||
styles.newTerminalButton,
|
||||
pressed && styles.newTerminalButtonPressed,
|
||||
(creating || creatingBrowser || creatingMarkdown || connState !== 'connected') &&
|
||||
styles.newTerminalButtonDisabled
|
||||
]}
|
||||
disabled={
|
||||
creating || creatingBrowser || creatingMarkdown || connState !== 'connected'
|
||||
}
|
||||
onPress={() => {
|
||||
setCreateError('')
|
||||
setShowCreateTabDrawer(true)
|
||||
}}
|
||||
accessibilityLabel="New tab"
|
||||
>
|
||||
<Plus size={16} color={colors.textSecondary} strokeWidth={2.2} />
|
||||
</Pressable>
|
||||
</View>
|
||||
)}
|
||||
</SafeAreaView>
|
||||
|
||||
Reference in New Issue
Block a user