commit 7b1ac930577c85c384e1b0d4cb2e1556b3c8c46d
parent 3e56589584e11ae96bba37931f5334ae3d9322d9
Author: Michael Camilleri <[email protected]>
Date: Sun, 28 Jun 2026 17:31:18 +0900
Avoid eliding author names
Diffstat:
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/Crossmate/Views/Puzzle/SuccessPanel.swift b/Crossmate/Views/Puzzle/SuccessPanel.swift
@@ -684,14 +684,18 @@ private struct SuccessShareCard: View {
.lineLimit(2)
if puzzle.author != nil || timeText != nil {
- HStack(spacing: 8) {
- if let author = puzzle.author {
- Text("by \(author)")
- .lineLimit(1)
- }
- if let timeText {
- Text("in \(timeText)")
- .monospacedDigit()
+ ViewThatFits(in: .horizontal) {
+ shareCreditLine
+ VStack(spacing: 4) {
+ if let author = puzzle.author {
+ Text("by \(author)")
+ .multilineTextAlignment(.center)
+ }
+ if let timeText {
+ Text("in \(timeText)")
+ .monospacedDigit()
+ .lineLimit(1)
+ }
}
}
.font(.system(size: 20, weight: .medium, design: .rounded))
@@ -703,6 +707,20 @@ private struct SuccessShareCard: View {
.frame(width: Self.width)
.background(Color.white)
}
+
+ private var shareCreditLine: some View {
+ HStack(spacing: 8) {
+ if let author = puzzle.author {
+ Text("by \(author)")
+ .lineLimit(1)
+ }
+ if let timeText {
+ Text("in \(timeText)")
+ .monospacedDigit()
+ .lineLimit(1)
+ }
+ }
+ }
}
/// A two-tone rendering of the grid shape — open squares light, blocks dark —