Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

mobile: the whole card zooms, header included

RoversX22f8c1b01801
diff --git a/android/app/src/main/java/com/roversx/thinkterm/TerminalScreen.kt b/android/app/src/main/java/com/roversx/thinkterm/TerminalScreen.kt
index 8556137a..a86ea094 100644
--- a/android/app/src/main/java/com/roversx/thinkterm/TerminalScreen.kt
+++ b/android/app/src/main/java/com/roversx/thinkterm/TerminalScreen.kt
@@ -27,6 +27,7 @@ import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
@@ -81,6 +82,7 @@ import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.layout.boundsInRoot
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.layout.positionInParent
+import androidx.compose.ui.layout.positionInRoot
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalLifecycleOwner
@@ -123,7 +125,10 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
// cards fade in around it, as the desktop's Live Overview zooms out.
var overviewShown by remember { mutableStateOf(false) }
var terminalBounds by remember { mutableStateOf(Rect.Zero) }
- var cardBounds by remember { mutableStateOf<Rect?>(null) }
+ // Where the screen's padded box starts, in root pixels: the frames
+ // the cards report are root pixels too.
+ var boxOrigin by remember { mutableStateOf(Offset.Zero) }
+ var cardBounds by remember { mutableStateOf<CardFrames?>(null) }
val zoom = remember { Animatable(0f) }
// Once in the card the terminal fades into the card's own preview,
// so the live card looks like every other one.
@@ -131,7 +136,7 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
// Once the terminal has faded, the live card shows its preview rows.
var livePreview by remember { mutableStateOf(false) }
val overviewOpen = overviewShown && zoom.value > 0f
- var zoomTarget by remember { mutableStateOf<Rect?>(null) }
+ var zoomTarget by remember { mutableStateOf<CardFrames?>(null) }
val keyboardUp = WindowInsets.ime.getBottom(density) > 0
val twoLevel = settings.tabBarLevels == "two" && !(model.threads?.threads.isNullOrEmpty())
@@ -198,7 +203,7 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
// The card's thumbnail is laid out: the terminal goes there. Only the
// first report counts; later ones must not restart the animation.
- fun cardLaidOut(frame: Rect?) {
+ fun cardLaidOut(frame: CardFrames?) {
cardBounds = frame
if (frame == null || !overviewShown || zoomTarget != null || terminalBounds.width <= 0f) return
zoomTarget = frame
@@ -225,6 +230,7 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
.fillMaxSize()
.background(lerp(model.background, Color(0xFF0F0F0F), zoom.value))
.safeDrawingPadding()
+ .onGloballyPositioned { boxOrigin = it.positionInRoot() }
) {
if (overviewShown) {
Box(Modifier.fillMaxSize().graphicsLayer { alpha = zoom.value }) {
@@ -274,13 +280,14 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
val target = zoomTarget
transformOrigin = TransformOrigin(0f, 0f)
if (target != null && terminalBounds.width > 0) {
- val s = target.width / terminalBounds.width
+ val thumb = target.thumb
+ val s = thumb.width / terminalBounds.width
val scale = 1f + (s - 1f) * t
- val top = (terminalBounds.height - target.height / s) * t
+ val top = (terminalBounds.height - thumb.height / s) * t
scaleX = scale
scaleY = scale
- translationX = (target.left - terminalBounds.left) * t
- translationY = (target.top - terminalBounds.top) * t - top * scale
+ translationX = (thumb.left - terminalBounds.left) * t
+ translationY = (thumb.top - terminalBounds.top) * t - top * scale
// The card's own corners, once the terminal is in it.
val r = 13.dp.toPx() / scale * t
shape = RoundedCornerShape(bottomStart = r, bottomEnd = r)
@@ -297,8 +304,8 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
.drawWithContent {
val target = zoomTarget
if (target != null && terminalBounds.width > 0) {
- val s = target.width / terminalBounds.width
- val top = (size.height - target.height / s) * zoom.value
+ val s = target.thumb.width / terminalBounds.width
+ val top = (size.height - target.thumb.height / s) * zoom.value
clipRect(top = top) { [email protected]() }
} else {
drawContent()
@@ -323,6 +330,41 @@ fun TerminalScreen(host: Host, store: HostStore, onBack: () -> Unit) {
}
}
+ // The card's own header rides along with the terminal: laid out at
+ // the card's size, blown up to the terminal's width, and shrunk with
+ // the same zoom, so the whole card closes in, not just its bottom.
+ val hero = zoomTarget
+ val heroThread = currentThread
+ if (hero != null && heroThread != null && terminalBounds.width > 0) {
+ val sEnd = hero.thumb.width / terminalBounds.width
+ val headerPx = hero.thumb.top - hero.card.top
+ val cardW = with(density) { hero.card.width.toDp() }
+ val headerH = with(density) { headerPx.toDp() }
+ Box(
+ Modifier
+ .zIndex(2f)
+ .requiredSize(cardW, headerH)
+ .graphicsLayer {
+ val t = zoom.value
+ val scale = (1f + (sEnd - 1f) * t) / sEnd
+ transformOrigin = TransformOrigin(0f, 0f)
+ scaleX = scale
+ scaleY = scale
+ // Its bottom sits on the slice of terminal the card keeps.
+ val thumbTop = terminalBounds.top + (hero.thumb.top - terminalBounds.top) * t
+ translationX = terminalBounds.left + (hero.thumb.left - terminalBounds.left) * t - boxOrigin.x
+ translationY = thumbTop - headerPx * scale - boxOrigin.y
+ alpha = t * (1f - fade.value)
+ val r = 13.dp.toPx() * t
+ shape = RoundedCornerShape(topStart = r, topEnd = r)
+ clip = true
+ }
+ .background(Color(0xFF1A1C21))
+ ) {
+ ThreadCardHeader(heroThread, MaterialTheme.colorScheme.primary, Modifier.fillMaxWidth())
+ }
+ }
+
if (showTree) {
TreeSheet(model = model, onDismiss = { showTree = false })
}
diff --git a/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt b/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt
index 4e86bb0b..f9190a5b 100644
--- a/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt
+++ b/android/app/src/main/java/com/roversx/thinkterm/TreeSheet.kt
@@ -531,7 +531,7 @@ fun OverviewScreen(
model: TerminalModel,
liveThread: String?,
livePreview: Boolean,
- onCardBounds: (Rect?) -> Unit,
+ onCardBounds: (CardFrames?) -> Unit,
onDismiss: () -> Unit,
) {
val threads = model.threads?.threads ?: emptyList()
@@ -612,31 +612,19 @@ private fun GroupHeader(space: String, project: String, count: Int) {
}
}
+
+/// Where the live card is and where its thumbnail is, in root pixels.
+data class CardFrames(val card: Rect, val thumb: Rect)
+
+/// A card's top: the thread's dot and name, its tabs as dots, the current
+/// tab's title, and an offline badge. Shared with the screen's zoom,
+/// which carries the same header while the terminal shrinks.
@Composable
-private fun ThreadCard(
- model: TerminalModel,
- thread: ThreadView,
- live: Boolean,
- livePreview: Boolean,
- onCardBounds: (Rect?) -> Unit,
- onDismiss: () -> Unit,
- modifier: Modifier = Modifier,
-) {
- val accent = MaterialTheme.colorScheme.primary
+fun ThreadCardHeader(thread: ThreadView, accent: Color, modifier: Modifier = Modifier) {
val shown = thread.tabs.take(OVERVIEW_DOTS)
val folded = thread.tabs.size - shown.size
val currentTab = thread.tabs.firstOrNull { it.current } ?: thread.tabs.firstOrNull()
- val shape = RoundedCornerShape(13.dp)
- Column(
- modifier
- .clip(shape)
- .background(Color(0xFF1A1C21))
- .border(if (live) 2.dp else 1.dp, if (live) accent else Color.White.copy(alpha = 0.07f), shape)
- .clickable {
- if (!live) model.sideClick("thread", thread.id)
- onDismiss()
- }
- ) {
+ Column(modifier) {
Row(
Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, top = 10.dp, bottom = 6.dp),
verticalAlignment = Alignment.CenterVertically,
@@ -653,42 +641,78 @@ private fun ThreadCard(
)
}
Row(
- Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, bottom = 7.dp),
- verticalAlignment = Alignment.CenterVertically,
- horizontalArrangement = Arrangement.spacedBy(4.dp),
- ) {
- for (tab in shown) {
- Box(
- Modifier
- .size(6.dp)
- .background(
- if (thread.current && tab.current) accent else Color.White.copy(alpha = 0.28f),
- CircleShape,
- )
- )
- }
- if (folded > 0) Text("+$folded", fontSize = 9.5.sp, color = overviewSecondary)
- Text(
- currentTab?.title ?: "",
- fontSize = 10.sp,
- fontFamily = FontFamily.Monospace,
- color = overviewSecondary,
- maxLines = 1,
- overflow = TextOverflow.Ellipsis,
- modifier = Modifier.weight(1f).padding(start = 3.dp),
- )
- if (!thread.live) {
+ Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, bottom = 7.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.spacedBy(4.dp),
+ ) {
+ for (tab in shown) {
+ Box(
+ Modifier
+ .size(6.dp)
+ .background(
+ if (thread.current && tab.current) accent else Color.White.copy(alpha = 0.28f),
+ CircleShape,
+ )
+ )
+ }
+ if (folded > 0) Text("+$folded", fontSize = 9.5.sp, color = overviewSecondary)
Text(
- tr("offline"),
- fontSize = 9.sp,
- fontWeight = FontWeight.SemiBold,
+ currentTab?.title ?: "",
+ fontSize = 10.sp,
+ fontFamily = FontFamily.Monospace,
color = overviewSecondary,
- modifier = Modifier
- .background(Color.Gray.copy(alpha = 0.22f), CircleShape)
- .padding(horizontal = 6.dp, vertical = 2.dp),
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis,
+ modifier = Modifier.weight(1f).padding(start = 3.dp),
)
+ if (!thread.live) {
+ Text(
+ tr("offline"),
+ fontSize = 9.sp,
+ fontWeight = FontWeight.SemiBold,
+ color = overviewSecondary,
+ modifier = Modifier
+ .background(Color.Gray.copy(alpha = 0.22f), CircleShape)
+ .padding(horizontal = 6.dp, vertical = 2.dp),
+ )
+ }
}
- }
+ }
+}
+
+@Composable
+private fun ThreadCard(
+ model: TerminalModel,
+ thread: ThreadView,
+ live: Boolean,
+ livePreview: Boolean,
+ onCardBounds: (CardFrames?) -> Unit,
+ onDismiss: () -> Unit,
+ modifier: Modifier = Modifier,
+) {
+ val accent = MaterialTheme.colorScheme.primary
+ val shape = RoundedCornerShape(13.dp)
+ // The live card reports where it is and where its thumbnail is, so
+ // the screen can shrink the terminal, header and all, into it.
+ var cardRect by remember { mutableStateOf<Rect?>(null) }
+ var thumbRect by remember { mutableStateOf<Rect?>(null) }
+ fun report() {
+ val c = cardRect ?: return
+ val t = thumbRect ?: return
+ onCardBounds(CardFrames(c, t))
+ }
+ Column(
+ modifier
+ .onGloballyPositioned { if (live) { cardRect = it.boundsInRoot(); report() } }
+ .clip(shape)
+ .background(Color(0xFF1A1C21))
+ .border(if (live) 2.dp else 1.dp, if (live) accent else Color.White.copy(alpha = 0.07f), shape)
+ .clickable {
+ if (!live) model.sideClick("thread", thread.id)
+ onDismiss()
+ }
+ ) {
+ ThreadCardHeader(thread, accent)
Box(
Modifier
.fillMaxWidth()
@@ -710,7 +734,7 @@ private fun ThreadCard(
if (live) {
// The terminal itself lands over this, then fades into the
// same preview as every other card; the box reports where.
- Box(Modifier.fillMaxSize().onGloballyPositioned { onCardBounds(it.boundsInRoot()) })
+ Box(Modifier.fillMaxSize().onGloballyPositioned { thumbRect = it.boundsInRoot(); report() })
}
}
}
diff --git a/ios/Sources/TerminalScreen.swift b/ios/Sources/TerminalScreen.swift
index 4e771e23..77b5c8fd 100644
--- a/ios/Sources/TerminalScreen.swift
+++ b/ios/Sources/TerminalScreen.swift
@@ -27,7 +27,12 @@ struct TerminalScreen: View {
/// The cards stay while the terminal comes back out of its card.
@State private var overviewVisible = false
@State private var terminalFrame: CGRect = .zero
- @State private var cardFrame: CGRect?
+ @State private var cardFrame: CardFrames?
+ /// The card's header, carried along with the terminal by the zoom.
+ @State private var heroFrames: CardFrames?
+ @State private var heroScale: CGFloat = 1
+ @State private var heroOffset: CGSize = .zero
+ @State private var heroAlpha: Double = 0
@State private var zoomScale: CGFloat = 1
@State private var zoomOffset: CGSize = .zero
@State private var zoomClip: CGFloat?
@@ -51,6 +56,22 @@ struct TerminalScreen: View {
.opacity(overviewOpen ? 1 : 0)
.onChange(of: overviewShown) { _, shown in if !shown { closeOverview() } }
}
+ // The card's own header rides along with the terminal: laid out at
+ // the card's size, blown up to the terminal's width, and shrunk
+ // with the same zoom, so the whole card closes in.
+ if let hero = heroFrames, let thread = model.threads?.threads.first(where: { $0.id == currentThreadId }) {
+ let sEnd = hero.thumb.width / max(terminalFrame.width, 1)
+ ThreadCardHeader(thread: thread)
+ .frame(width: hero.card.width, height: hero.thumb.minY - hero.card.minY, alignment: .top)
+ .background(Color(red: 0.10, green: 0.11, blue: 0.13))
+ .clipShape(UnevenRoundedRectangle(topLeadingRadius: 13, topTrailingRadius: 13))
+ .scaleEffect(1 / sEnd, anchor: .topLeading)
+ .scaleEffect(heroScale, anchor: .topLeading)
+ .offset(heroOffset)
+ .opacity(heroAlpha * zoomFade)
+ .zIndex(3)
+ .allowsHitTesting(false)
+ }
// Above the cards, so the shrunken terminal shows in its card;
// untouchable meanwhile, so the cards get the taps.
VStack(spacing: 0) {
@@ -96,9 +117,9 @@ struct TerminalScreen: View {
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification)) { _ in
keyboardUp = false
}
- .onChange(of: cardFrame) { _, frame in
+ .onChange(of: cardFrame) { _, frames in
// The card's thumbnail is laid out: the terminal goes there.
- if overviewShown, let frame, !overviewOpen { zoom(into: frame) }
+ if overviewShown, let frames, !overviewOpen { zoom(into: frames) }
}
.navigationBarTitleDisplayMode(.inline)
.toolbar(.hidden, for: .tabBar)
@@ -386,10 +407,17 @@ struct TerminalScreen: View {
/// Shrink the terminal into the card's thumbnail: scaled to its
/// width, moved into it, and masked to its height from the bottom,
/// so the card keeps the newest rows as the other cards' previews do.
- private func zoom(into frame: CGRect) {
+ private func zoom(into frames: CardFrames) {
guard terminalFrame.width > 0 else { return }
+ let frame = frames.thumb
let scale = frame.width / terminalFrame.width
let clip = frame.height / scale
+ // The header starts above the terminal, at the terminal's width,
+ // and lands on the card's own header.
+ heroFrames = frames
+ heroScale = 1
+ heroOffset = CGSize(width: terminalFrame.minX, height: terminalFrame.minY - (frame.minY - frames.card.minY) / scale)
+ heroAlpha = 0
withAnimation(.spring(response: 0.4, dampingFraction: 0.85)) {
overviewOpen = true
zoomScale = scale
@@ -398,6 +426,9 @@ struct TerminalScreen: View {
height: frame.minY - terminalFrame.minY - (terminalFrame.height - clip) * scale
)
zoomClip = clip
+ heroScale = scale
+ heroOffset = CGSize(width: frames.card.minX, height: frames.card.minY)
+ heroAlpha = 1
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {
guard overviewOpen else { return }
@@ -417,10 +448,19 @@ struct TerminalScreen: View {
zoomScale = 1
zoomOffset = .zero
zoomClip = nil
+ heroScale = 1
+ heroAlpha = 0
+ if let hero = heroFrames {
+ let sEnd = hero.thumb.width / max(terminalFrame.width, 1)
+ heroOffset = CGSize(width: terminalFrame.minX, height: terminalFrame.minY - (hero.thumb.minY - hero.card.minY) / sEnd)
+ }
}
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
- if !overviewShown { overviewVisible = false }
+ if !overviewShown {
+ overviewVisible = false
+ heroFrames = nil
+ }
}
cardFrame = nil
}
diff --git a/ios/Sources/TreeSheet.swift b/ios/Sources/TreeSheet.swift
index b990e5ee..2edea846 100644
--- a/ios/Sources/TreeSheet.swift
+++ b/ios/Sources/TreeSheet.swift
@@ -273,8 +273,8 @@ struct OverviewScreen: View {
@ObservedObject var model: TerminalModel
@ObservedObject private var lang = AppLanguage.shared
@Binding var isPresented: Bool
- /// The thumbnail box of the thread on show, in the screen's space.
- @Binding var cardFrame: CGRect?
+ /// The thread on show's card and its thumbnail box, in the screen's space.
+ @Binding var cardFrame: CardFrames?
var liveThread: String?
/// The live card's rows wait until the terminal has faded out of it.
var livePreview: Bool = true
@@ -282,6 +282,16 @@ struct OverviewScreen: View {
private let rows = 9
private let columns = [GridItem(.flexible(), spacing: 10), GridItem(.flexible(), spacing: 10)]
+ /// The live card's two frames, reported together once both are known.
+ @State private var liveCardFrame: CGRect?
+ @State private var thumbFrame: CGRect?
+
+ private func report() {
+ guard let card = liveCardFrame, let thumb = thumbFrame else { return }
+ let frames = CardFrames(card: card, thumb: thumb)
+ if cardFrame != frames { cardFrame = frames }
+ }
+
private var threads: [ThreadView] { model.threads?.threads ?? [] }
private var groups: [(project: String, threads: [ThreadView])] {
@@ -363,40 +373,7 @@ struct OverviewScreen: View {
isPresented = false
} label: {
VStack(alignment: .leading, spacing: 0) {
- HStack(spacing: 7) {
- Circle().fill(TerminalScreen.threadColor(status: thread.status, live: thread.live)).frame(width: 7, height: 7)
- Text(thread.name).font(.system(size: 13.5, weight: .semibold)).lineLimit(1)
- Spacer(minLength: 0)
- }
- .padding(.horizontal, 10)
- .padding(.top, 10)
- .padding(.bottom, 6)
- HStack(spacing: 4) {
- ForEach(shown) { tab in
- Circle()
- .fill(thread.current && tab.current ? Color.accentColor : Color.white.opacity(0.28))
- .frame(width: 6, height: 6)
- }
- if folded > 0 {
- Text("+\(folded)").font(.system(size: 9.5)).foregroundColor(.secondary)
- }
- Text(currentTab?.title ?? "")
- .font(.system(size: 10, design: .monospaced))
- .foregroundColor(.secondary)
- .lineLimit(1)
- .padding(.leading, 3)
- Spacer(minLength: 0)
- if !thread.live {
- Text(tr("offline"))
- .font(.system(size: 9, weight: .semibold))
- .foregroundColor(.secondary)
- .padding(.horizontal, 6).padding(.vertical, 2)
- .background(Color.gray.opacity(0.22))
- .clipShape(Capsule())
- }
- }
- .padding(.horizontal, 10)
- .padding(.bottom, 7)
+ ThreadCardHeader(thread: thread)
ZStack(alignment: .topLeading) {
Text(preview(thread))
.font(.system(size: 7, design: .monospaced))
@@ -412,8 +389,8 @@ struct OverviewScreen: View {
Color.clear
.background(GeometryReader { geo in
Color.clear
- .onAppear { cardFrame = geo.frame(in: .named("screen")) }
- .onChange(of: geo.frame(in: .named("screen"))) { _, f in cardFrame = f }
+ .onAppear { thumbFrame = geo.frame(in: .named("screen")); report() }
+ .onChange(of: geo.frame(in: .named("screen"))) { _, f in thumbFrame = f; report() }
})
}
}
@@ -421,6 +398,11 @@ struct OverviewScreen: View {
.background(thread.live ? model.background : Color.black.opacity(0.4))
.clipped()
}
+ .background(live ? GeometryReader { geo in
+ Color.clear
+ .onAppear { liveCardFrame = geo.frame(in: .named("screen")); report() }
+ .onChange(of: geo.frame(in: .named("screen"))) { _, f in liveCardFrame = f; report() }
+ } : nil)
.background(Color(red: 0.10, green: 0.11, blue: 0.13))
.clipShape(RoundedRectangle(cornerRadius: 13))
.overlay(RoundedRectangle(cornerRadius: 13).stroke(live ? Color.accentColor : Color.white.opacity(0.07), lineWidth: live ? 2 : 1))
@@ -449,3 +431,61 @@ struct OverviewScreen: View {
return out
}
}
+
+/// Where the live card is and where its thumbnail is, in the screen's space.
+struct CardFrames: Equatable {
+ var card: CGRect
+ var thumb: CGRect
+}
+
+/// A card's top: the thread's dot and name, its tabs as dots, the current
+/// tab's title, and an offline badge. Shared with the screen's zoom, which
+/// carries the same header while the terminal shrinks.
+struct ThreadCardHeader: View {
+ let thread: ThreadView
+ @ObservedObject private var lang = AppLanguage.shared
+ private let dots = 4
+
+ var body: some View {
+ let shown = Array(thread.tabs.prefix(dots))
+ let folded = thread.tabs.count - shown.count
+ let currentTab = thread.tabs.first(where: { $0.current }) ?? thread.tabs.first
+ VStack(alignment: .leading, spacing: 0) {
+ HStack(spacing: 7) {
+ Circle().fill(TerminalScreen.threadColor(status: thread.status, live: thread.live)).frame(width: 7, height: 7)
+ Text(thread.name).font(.system(size: 13.5, weight: .semibold)).lineLimit(1)
+ Spacer(minLength: 0)
+ }
+ .padding(.horizontal, 10)
+ .padding(.top, 10)
+ .padding(.bottom, 6)
+ HStack(spacing: 4) {
+ ForEach(shown) { tab in
+ Circle()
+ .fill(thread.current && tab.current ? Color.accentColor : Color.white.opacity(0.28))
+ .frame(width: 6, height: 6)
+ }
+ if folded > 0 {
+ Text("+\(folded)").font(.system(size: 9.5)).foregroundColor(.secondary)
+ }
+ Text(currentTab?.title ?? "")
+ .font(.system(size: 10, design: .monospaced))
+ .foregroundColor(.secondary)
+ .lineLimit(1)
+ .padding(.leading, 3)
+ Spacer(minLength: 0)
+ if !thread.live {
+ Text(tr("offline"))
+ .font(.system(size: 9, weight: .semibold))
+ .foregroundColor(.secondary)
+ .padding(.horizontal, 6).padding(.vertical, 2)
+ .background(Color.gray.opacity(0.22))
+ .clipShape(Capsule())
+ }
+ }
+ .padding(.horizontal, 10)
+ .padding(.bottom, 7)
+ }
+ .foregroundColor(.white)
+ }
+}