@momo-kits/native-kits 0.169.8-beta.3 → 0.169.8-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/Input/InputSearch.swift +23 -6
- package/ios/Layout/HeaderLayout.swift +60 -0
- package/ios/Navigation/BottomTab/BottomTabBar.swift +0 -9
- package/ios/Navigation/Component/Header.swift +25 -15
- package/ios/Navigation/Component/HeaderJourney.swift +2 -1
- package/ios/Navigation/Component/HeaderLocation.swift +2 -1
- package/ios/Navigation/Component/HeaderRight.swift +13 -8
- package/ios/Navigation/Component/HeaderUser.swift +2 -1
- package/ios/Navigation/Navigation.swift +6 -26
- package/ios/Navigation/StackScreen.swift +30 -26
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +11 -2
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +1 -13
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +11 -0
- package/package.json +1 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
+
/// Body searches keep 36 / 24; the header search matches the 32pt header buttons.
|
|
4
|
+
enum InputSearchSize {
|
|
5
|
+
case `default`, header
|
|
6
|
+
|
|
7
|
+
var height: CGFloat { self == .header ? HeaderLayoutMetrics.searchHeight : 36 }
|
|
8
|
+
var iconSize: CGFloat { self == .header ? HeaderLayoutMetrics.iconSize : 24 }
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
// MARK: - RenderRightIconSearch
|
|
4
12
|
|
|
5
13
|
struct RenderRightIconSearch: View {
|
|
@@ -7,6 +15,7 @@ struct RenderRightIconSearch: View {
|
|
|
7
15
|
let loading: Bool
|
|
8
16
|
let icon: String
|
|
9
17
|
let color: Color
|
|
18
|
+
var size: InputSearchSize = .default
|
|
10
19
|
let onClick: () -> Void
|
|
11
20
|
|
|
12
21
|
var body: some View {
|
|
@@ -17,13 +26,13 @@ struct RenderRightIconSearch: View {
|
|
|
17
26
|
.padding(.horizontal, Spacing.S)
|
|
18
27
|
}
|
|
19
28
|
if !icon.isEmpty {
|
|
20
|
-
// Compose: a 1pt rule inset S from the top and bottom of the
|
|
29
|
+
// Compose: a 1pt rule inset S from the top and bottom of the bar.
|
|
21
30
|
Rectangle()
|
|
22
31
|
.fill(theme.colors.primary)
|
|
23
|
-
.frame(width: 1, height:
|
|
32
|
+
.frame(width: 1, height: size.height - Spacing.S * 2)
|
|
24
33
|
.padding(.leading, Spacing.S)
|
|
25
34
|
|
|
26
|
-
Icon(source: icon, size:
|
|
35
|
+
Icon(source: icon, size: size.iconSize, color: color)
|
|
27
36
|
.padding(.leading, Spacing.S)
|
|
28
37
|
.onTapGesture(perform: onClick)
|
|
29
38
|
}
|
|
@@ -137,6 +146,7 @@ public struct InputSearch: View {
|
|
|
137
146
|
var clearCondition: (() -> Bool)? = nil
|
|
138
147
|
var onClearPress: () -> Void = {}
|
|
139
148
|
var onSubmit: () -> Void = {}
|
|
149
|
+
var size: InputSearchSize = .default
|
|
140
150
|
|
|
141
151
|
@State private var isFocused = false
|
|
142
152
|
@State private var isBlurred = false
|
|
@@ -226,7 +236,7 @@ public struct InputSearch: View {
|
|
|
226
236
|
if let searchIcon = searchIcon {
|
|
227
237
|
searchIcon()
|
|
228
238
|
} else {
|
|
229
|
-
Icon(source: "navigation_search", size:
|
|
239
|
+
Icon(source: "navigation_search", size: size.iconSize, color: theme.colors.text.hint)
|
|
230
240
|
.padding(.trailing, Spacing.XS)
|
|
231
241
|
}
|
|
232
242
|
|
|
@@ -275,11 +285,11 @@ public struct InputSearch: View {
|
|
|
275
285
|
.padding(.leading, Spacing.XS)
|
|
276
286
|
}
|
|
277
287
|
|
|
278
|
-
RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, onClick: onRightIconPressed)
|
|
288
|
+
RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, size: size, onClick: onRightIconPressed)
|
|
279
289
|
}
|
|
280
290
|
.padding(.horizontal, Spacing.M)
|
|
281
291
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
282
|
-
.frame(height:
|
|
292
|
+
.frame(height: size.height)
|
|
283
293
|
.background(
|
|
284
294
|
RoundedRectangle(cornerRadius: Radius.XL)
|
|
285
295
|
.fill(backgroundColor ?? theme.colors.background.surface)
|
|
@@ -298,6 +308,13 @@ public struct InputSearch: View {
|
|
|
298
308
|
}
|
|
299
309
|
}
|
|
300
310
|
|
|
311
|
+
/// The header search: 32pt tall with a 20pt icon, level with the header buttons.
|
|
312
|
+
func headerSize() -> InputSearch {
|
|
313
|
+
var copy = self
|
|
314
|
+
copy.size = .header
|
|
315
|
+
return copy
|
|
316
|
+
}
|
|
317
|
+
|
|
301
318
|
// MARK: - Helper Functions
|
|
302
319
|
|
|
303
320
|
func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Top navigation spec (Figma "Top Navigation · Màn hình gập"). Mirrors Compose `layout/HeaderLayout.kt`
|
|
2
|
+
// and RN; keep the three in sync.
|
|
3
|
+
|
|
4
|
+
import SwiftUI
|
|
5
|
+
|
|
6
|
+
/// Header spec values, in points. Public so custom header rights and extensions can match them.
|
|
7
|
+
public enum HeaderLayoutMetrics {
|
|
8
|
+
public static let buttonSize: CGFloat = 32
|
|
9
|
+
public static let iconSize: CGFloat = 20
|
|
10
|
+
public static let pillWidth: CGFloat = 72
|
|
11
|
+
public static let searchHeight: CGFloat = 32
|
|
12
|
+
public static let titleGap: CGFloat = Spacing.S
|
|
13
|
+
public static let sidePadding: CGFloat = Spacing.M
|
|
14
|
+
/// shortcut + gap + help/home pill
|
|
15
|
+
public static let clusterWidth: CGFloat = buttonSize + titleGap + pillWidth
|
|
16
|
+
public static let frameMaxWidth: CGFloat = 600
|
|
17
|
+
/// Banner image width on every device: wide windows keep the phone size, centered.
|
|
18
|
+
public static let bannerWidth: CGFloat = 375
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/// How a screen lays out its content on wide windows; the header row follows it.
|
|
22
|
+
public enum ContentLayout: Equatable {
|
|
23
|
+
/// 12 column grid: the header keeps the 12pt side padding.
|
|
24
|
+
case grid
|
|
25
|
+
/// One column of at most `HeaderLayoutMetrics.frameMaxWidth`, centered: the header row sits in the same frame.
|
|
26
|
+
case stretch
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// Header geometry for a window; see `ScreenLayout.headerLayout(_:)`.
|
|
30
|
+
public struct HeaderLayout: Equatable {
|
|
31
|
+
/// Short side >= 600, iPhone Duo excluded (it has its own layout).
|
|
32
|
+
public let isWide: Bool
|
|
33
|
+
/// Padding from each side of the safe area to the header row (back, title / search, right cluster).
|
|
34
|
+
public let frameInset: CGFloat
|
|
35
|
+
/// Width of the header row, so tabs and other header extensions can line up with it.
|
|
36
|
+
public let frameWidth: CGFloat
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public extension ScreenLayout {
|
|
40
|
+
func headerLayout(_ contentLayout: ContentLayout = .grid) -> HeaderLayout {
|
|
41
|
+
let isWide = !isIPhoneDuo && !isDuoDevice && min(width, height) >= ModalMetrics.foldableMinWidth
|
|
42
|
+
let safeWidth = width - insets.leading - insets.trailing
|
|
43
|
+
let frameInset = isWide && contentLayout == .stretch
|
|
44
|
+
? max(HeaderLayoutMetrics.sidePadding, (safeWidth - HeaderLayoutMetrics.frameMaxWidth) / 2)
|
|
45
|
+
: HeaderLayoutMetrics.sidePadding
|
|
46
|
+
return HeaderLayout(isWide: isWide, frameInset: frameInset, frameWidth: safeWidth - frameInset * 2)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private struct ContentLayoutKey: EnvironmentKey {
|
|
51
|
+
static let defaultValue: ContentLayout = .grid
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public extension EnvironmentValues {
|
|
55
|
+
/// The enclosing screen's `NavigationOptions.contentLayout`, set by `StackScreen`.
|
|
56
|
+
var contentLayout: ContentLayout {
|
|
57
|
+
get { self[ContentLayoutKey.self] }
|
|
58
|
+
set { self[ContentLayoutKey.self] = newValue }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -166,19 +166,10 @@ struct HorizontalTabBar: View {
|
|
|
166
166
|
|
|
167
167
|
if let cta {
|
|
168
168
|
CenterAction(data: cta)
|
|
169
|
-
.offset(y: centerActionTop)
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
.frame(width: width)
|
|
173
172
|
}
|
|
174
|
-
|
|
175
|
-
/// Offset of the center action column from the bar top: the items sit at the top of the container
|
|
176
|
-
/// (which starts ctaLift down), so the column is placed for its label to start on the tab labels' line.
|
|
177
|
-
private var centerActionTop: CGFloat {
|
|
178
|
-
let itemLabelTop = TabBarMetrics.ctaLift + TabBarMetrics.paddingVertical
|
|
179
|
-
+ TabBarMetrics.indicatorHeight + TabBarMetrics.itemIconLabelGap
|
|
180
|
-
return itemLabelTop - TabBarMetrics.ctaLabelGap - TabBarMetrics.ctaSize
|
|
181
|
-
}
|
|
182
173
|
}
|
|
183
174
|
|
|
184
175
|
/// One active indicator per bar: Background/tonal with its inner light (white 12% from below) and
|
|
@@ -6,10 +6,11 @@ import SwiftUI
|
|
|
6
6
|
/// Header bar height, mirrors Compose's `HEADER_HEIGHT`.
|
|
7
7
|
public let HEADER_HEIGHT: CGFloat = 52
|
|
8
8
|
|
|
9
|
-
/// Room the back button and
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/// Room the back button, the gaps around the title and the right cluster take from the header row
|
|
10
|
+
/// (Compose `HEADER_ACTIONS_WIDTH`).
|
|
11
|
+
let headerActionsWidth: CGFloat = HeaderLayoutMetrics.buttonSize + HeaderLayoutMetrics.titleGap * 2 + HeaderLayoutMetrics.clusterWidth
|
|
12
|
+
// Side padding, 48pt back and toolkit on the iPhone Duo status bar row.
|
|
13
|
+
private let statusBarRowActionsWidth: CGFloat = 227
|
|
13
14
|
|
|
14
15
|
public enum TitlePosition {
|
|
15
16
|
case left, center
|
|
@@ -24,15 +25,19 @@ public struct AnimatedHeader {
|
|
|
24
25
|
public var aspectRatio: AnimatedHeaderRatio = .ratio16_9
|
|
25
26
|
public var isSurface: Bool = true
|
|
26
27
|
public var composable: (_ scrollState: CGFloat) -> AnyView = { _ in AnyView(EmptyView()) }
|
|
28
|
+
/// Wide windows: fills the sides of the phone-sized banner, fading out downward.
|
|
29
|
+
public var bannerBackgroundColor: Color?
|
|
27
30
|
|
|
28
31
|
public init(
|
|
29
32
|
aspectRatio: AnimatedHeaderRatio = .ratio16_9,
|
|
30
33
|
isSurface: Bool = true,
|
|
31
|
-
composable: @escaping (_ scrollState: CGFloat) -> AnyView = { _ in AnyView(EmptyView()) }
|
|
34
|
+
composable: @escaping (_ scrollState: CGFloat) -> AnyView = { _ in AnyView(EmptyView()) },
|
|
35
|
+
bannerBackgroundColor: Color? = nil
|
|
32
36
|
) {
|
|
33
37
|
self.aspectRatio = aspectRatio
|
|
34
38
|
self.isSurface = isSurface
|
|
35
39
|
self.composable = composable
|
|
40
|
+
self.bannerBackgroundColor = bannerBackgroundColor
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
43
|
|
|
@@ -286,10 +291,11 @@ func headerSearchProps(
|
|
|
286
291
|
}
|
|
287
292
|
|
|
288
293
|
/// Max title width: back button and toolkit share the bar unless the iPhone Duo side bar holds them.
|
|
289
|
-
func headerTitleMaxWidth(_ layout: ScreenLayout) -> CGFloat {
|
|
294
|
+
func headerTitleMaxWidth(_ layout: ScreenLayout, _ contentLayout: ContentLayout) -> CGFloat {
|
|
290
295
|
let clearance = layout.statusBarClearance.map { $0.left + $0.right } ?? 0
|
|
291
296
|
if layout.sideBar != nil { return layout.contentWidth - Spacing.M * 2 - clearance }
|
|
292
|
-
|
|
297
|
+
if layout.statusBarClearance != nil { return layout.width - statusBarRowActionsWidth - clearance }
|
|
298
|
+
return layout.headerLayout(contentLayout).frameWidth - headerActionsWidth
|
|
293
299
|
}
|
|
294
300
|
|
|
295
301
|
// MARK: - Header
|
|
@@ -339,10 +345,13 @@ public struct NavigationHeader: View {
|
|
|
339
345
|
}
|
|
340
346
|
|
|
341
347
|
@Environment(\.screenLayout) private var layout
|
|
348
|
+
@Environment(\.contentLayout) private var contentLayout
|
|
342
349
|
@Environment(\.appTheme) private var theme
|
|
343
350
|
@OptionalEnvironmentObject private var navigator: Navigator?
|
|
344
351
|
@State private var headerRightWidth: CGFloat = 0
|
|
345
352
|
|
|
353
|
+
private var headerLayout: HeaderLayout { layout.headerLayout(contentLayout) }
|
|
354
|
+
|
|
346
355
|
/// iPhone Duo side bar holds back and the toolkit; a custom header right stays in the bar.
|
|
347
356
|
private var useSideBar: Bool { layout.sideBar != nil }
|
|
348
357
|
|
|
@@ -352,7 +361,7 @@ public struct NavigationHeader: View {
|
|
|
352
361
|
/// Max centered title width; on the status bar row the clusters are lopsided, so both sides
|
|
353
362
|
/// keep the wider one's room.
|
|
354
363
|
private var centerTitleMaxWidth: CGFloat {
|
|
355
|
-
guard let clearance = layout.statusBarClearance else { return
|
|
364
|
+
guard let clearance = layout.statusBarClearance else { return headerLayout.frameWidth / 2 }
|
|
356
365
|
let back = goBack == nil || useSideBar ? 0 : DuoMetrics.controlSize + Spacing.S
|
|
357
366
|
let inset = max(clearance.left + back, clearance.right + headerRightWidth) + Spacing.S
|
|
358
367
|
return max(layout.contentWidth - (Spacing.M + inset) * 2, 0)
|
|
@@ -388,7 +397,7 @@ public struct NavigationHeader: View {
|
|
|
388
397
|
} else {
|
|
389
398
|
BackButton(color: headerColor, onBack: goBack)
|
|
390
399
|
}
|
|
391
|
-
Spacer().frame(width:
|
|
400
|
+
Spacer().frame(width: HeaderLayoutMetrics.titleGap)
|
|
392
401
|
}
|
|
393
402
|
|
|
394
403
|
if centerTitle {
|
|
@@ -418,14 +427,14 @@ public struct NavigationHeader: View {
|
|
|
418
427
|
)
|
|
419
428
|
}
|
|
420
429
|
}
|
|
421
|
-
.padding(.leading,
|
|
422
|
-
.padding(.trailing,
|
|
430
|
+
.padding(.leading, headerLayout.frameInset + (layout.statusBarClearance?.left ?? 0))
|
|
431
|
+
.padding(.trailing, headerLayout.frameInset + (layout.statusBarClearance?.right ?? 0))
|
|
423
432
|
|
|
424
433
|
if centerTitle {
|
|
425
434
|
titleArea(centered: true)
|
|
426
435
|
// Compose caps a centered title at half the bar
|
|
427
436
|
.frame(maxWidth: centerTitleMaxWidth)
|
|
428
|
-
.padding(.horizontal,
|
|
437
|
+
.padding(.horizontal, headerLayout.frameInset)
|
|
429
438
|
}
|
|
430
439
|
}
|
|
431
440
|
.onPreferenceChange(HeaderRightWidthKey.self) { headerRightWidth = $0 }
|
|
@@ -448,6 +457,7 @@ public struct NavigationHeader: View {
|
|
|
448
457
|
theme: theme,
|
|
449
458
|
pop: navigator.map { navigator in { navigator.pop() } }
|
|
450
459
|
))
|
|
460
|
+
.headerSize()
|
|
451
461
|
} else {
|
|
452
462
|
switch headerTitle {
|
|
453
463
|
case let .user(data)?:
|
|
@@ -501,7 +511,7 @@ struct HeaderBarBackground: View {
|
|
|
501
511
|
|
|
502
512
|
// MARK: - Back button
|
|
503
513
|
|
|
504
|
-
/// Mirrors Compose's `BackButton`: a
|
|
514
|
+
/// Mirrors Compose's `BackButton`: a 32pt circle with the back arrow.
|
|
505
515
|
private struct BackButton: View {
|
|
506
516
|
let color: HeaderColor
|
|
507
517
|
let onBack: () -> Void
|
|
@@ -511,8 +521,8 @@ private struct BackButton: View {
|
|
|
511
521
|
Circle()
|
|
512
522
|
.fill(color.backgroundButton)
|
|
513
523
|
.overlay(Circle().stroke(color.borderColor, lineWidth: 0.2))
|
|
514
|
-
.frame(width:
|
|
515
|
-
.overlay(Icon(source: "arrow-back", size:
|
|
524
|
+
.frame(width: HeaderLayoutMetrics.buttonSize, height: HeaderLayoutMetrics.buttonSize)
|
|
525
|
+
.overlay(Icon(source: "arrow-back", size: HeaderLayoutMetrics.iconSize, color: color.tintIconColor))
|
|
516
526
|
}
|
|
517
527
|
.buttonStyle(ActiveOpacityButtonStyle())
|
|
518
528
|
.accessibilityIdentifier("btn_navigation_back")
|
|
@@ -13,6 +13,7 @@ public struct HeaderJourneyView: View {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@Environment(\.screenLayout) private var layout
|
|
16
|
+
@Environment(\.contentLayout) private var contentLayout
|
|
16
17
|
|
|
17
18
|
public var body: some View {
|
|
18
19
|
if data.isLoading {
|
|
@@ -45,7 +46,7 @@ public struct HeaderJourneyView: View {
|
|
|
45
46
|
MomoText(description, typography: .descriptionXsRegular, color: tint, maxLines: 1)
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
.frame(maxWidth: headerTitleMaxWidth(layout), alignment: .leading)
|
|
49
|
+
.frame(maxWidth: headerTitleMaxWidth(layout, contentLayout), alignment: .leading)
|
|
49
50
|
}
|
|
50
51
|
.buttonStyle(ActiveOpacityButtonStyle())
|
|
51
52
|
.disabled(data.onPress == nil)
|
|
@@ -13,6 +13,7 @@ public struct HeaderLocationView: View {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@Environment(\.screenLayout) private var layout
|
|
16
|
+
@Environment(\.contentLayout) private var contentLayout
|
|
16
17
|
|
|
17
18
|
public var body: some View {
|
|
18
19
|
if data.isLoading {
|
|
@@ -34,7 +35,7 @@ public struct HeaderLocationView: View {
|
|
|
34
35
|
Icon(source: "16_arrow_chevron_down_small", size: 16, color: tint)
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
.frame(maxWidth: headerTitleMaxWidth(layout), alignment: .leading)
|
|
38
|
+
.frame(maxWidth: headerTitleMaxWidth(layout, contentLayout), alignment: .leading)
|
|
38
39
|
}
|
|
39
40
|
.buttonStyle(ActiveOpacityButtonStyle())
|
|
40
41
|
.disabled(data.onPress == nil)
|
|
@@ -354,25 +354,30 @@ struct Toolkit: View {
|
|
|
354
354
|
}
|
|
355
355
|
toolButton(icon: headerRight.closeIcon, accessibilityId: "btn_navigation_close", action: onPressClose)
|
|
356
356
|
}
|
|
357
|
-
.frame(
|
|
357
|
+
.frame(
|
|
358
|
+
width: usesHelpCenter(context) ? HeaderLayoutMetrics.pillWidth : HeaderLayoutMetrics.buttonSize,
|
|
359
|
+
height: HeaderLayoutMetrics.buttonSize
|
|
360
|
+
)
|
|
358
361
|
.background(headerColor.backgroundButton)
|
|
359
|
-
.
|
|
360
|
-
.overlay(
|
|
362
|
+
.clipShape(Capsule())
|
|
363
|
+
.overlay(Capsule().stroke(headerColor.borderColor, lineWidth: 0.2))
|
|
361
364
|
.padding(.leading, Spacing.S)
|
|
362
365
|
}
|
|
363
366
|
}
|
|
364
367
|
|
|
368
|
+
/// One half of the help / home pill; each half takes an equal share of the pill width.
|
|
365
369
|
private func toolButton(icon: String, accessibilityId: String, action: @escaping () -> Void) -> some View {
|
|
366
370
|
SwiftUI.Button(action: action) {
|
|
367
|
-
Icon(source: icon, size:
|
|
368
|
-
.
|
|
371
|
+
Icon(source: icon, size: HeaderLayoutMetrics.iconSize, color: headerColor.tintIconColor)
|
|
372
|
+
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
373
|
+
.contentShape(Rectangle())
|
|
369
374
|
}
|
|
370
375
|
.buttonStyle(ActiveOpacityButtonStyle())
|
|
371
376
|
.accessibilityIdentifier(accessibilityId)
|
|
372
377
|
}
|
|
373
378
|
}
|
|
374
379
|
|
|
375
|
-
/// Mirrors Compose's `NavigationButton`: the
|
|
380
|
+
/// Mirrors Compose's `NavigationButton`: the 32pt circular shortcut / more button.
|
|
376
381
|
public struct NavigationButton: View {
|
|
377
382
|
var disabled: Bool
|
|
378
383
|
var icon: String
|
|
@@ -405,9 +410,9 @@ public struct NavigationButton: View {
|
|
|
405
410
|
Circle()
|
|
406
411
|
.fill(colors.backgroundButton)
|
|
407
412
|
.overlay(Circle().stroke(colors.borderColor, lineWidth: 0.2))
|
|
408
|
-
Icon(source: icon, size:
|
|
413
|
+
Icon(source: icon, size: HeaderLayoutMetrics.iconSize, color: colors.tintIconColor)
|
|
409
414
|
}
|
|
410
|
-
.frame(width:
|
|
415
|
+
.frame(width: HeaderLayoutMetrics.buttonSize, height: HeaderLayoutMetrics.buttonSize)
|
|
411
416
|
.overlay(alignment: .topTrailing) {
|
|
412
417
|
if showBadge {
|
|
413
418
|
BadgeDot(size: .small).offset(x: -Spacing.XXS, y: -Spacing.XXS)
|
|
@@ -13,6 +13,7 @@ public struct HeaderUserView: View {
|
|
|
13
13
|
private let avatarSize: CGFloat = Spacing.XXL // 32
|
|
14
14
|
|
|
15
15
|
@Environment(\.screenLayout) private var layout
|
|
16
|
+
@Environment(\.contentLayout) private var contentLayout
|
|
16
17
|
|
|
17
18
|
public var body: some View {
|
|
18
19
|
if data.isLoading {
|
|
@@ -67,7 +68,7 @@ public struct HeaderUserView: View {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
.frame(maxWidth: headerTitleMaxWidth(layout), alignment: .leading)
|
|
71
|
+
.frame(maxWidth: headerTitleMaxWidth(layout, contentLayout), alignment: .leading)
|
|
71
72
|
|
|
72
73
|
Spacer(minLength: 0)
|
|
73
74
|
}
|
|
@@ -14,9 +14,6 @@ public final class Navigation: ObservableObject {
|
|
|
14
14
|
private weak var registry: DynamicScreenRegistry?
|
|
15
15
|
/// What the footer (or navigation bar) takes from the window bottom; lifts snack bars.
|
|
16
16
|
var bottomObstruction: CGFloat = 0
|
|
17
|
-
/// A tab that pads itself asks (via `floatingTabBarEdgeToEdge()`) to run edge to edge behind the floating
|
|
18
|
-
/// bar and the home indicator; the kit then stops reserving that space. Compose's `bottomTabEdgeToEdge`.
|
|
19
|
-
@Published var bottomTabEdgeToEdge = false
|
|
20
17
|
|
|
21
18
|
init(
|
|
22
19
|
id: Int = -1,
|
|
@@ -87,6 +84,8 @@ public struct NavigationOptions {
|
|
|
87
84
|
public var inputSearchProps: InputSearchProps?
|
|
88
85
|
public var fabProps: FabProps?
|
|
89
86
|
public var onBackHandler: (() -> Void)?
|
|
87
|
+
/// Wide windows: `.stretch` puts the header row in the centered 600pt content frame.
|
|
88
|
+
public var contentLayout: ContentLayout
|
|
90
89
|
|
|
91
90
|
public init(
|
|
92
91
|
screenName: String? = nil,
|
|
@@ -115,7 +114,8 @@ public struct NavigationOptions {
|
|
|
115
114
|
layoutOffset: CGFloat = 56,
|
|
116
115
|
inputSearchProps: InputSearchProps? = nil,
|
|
117
116
|
fabProps: FabProps? = nil,
|
|
118
|
-
onBackHandler: (() -> Void)? = nil
|
|
117
|
+
onBackHandler: (() -> Void)? = nil,
|
|
118
|
+
contentLayout: ContentLayout = .grid
|
|
119
119
|
) {
|
|
120
120
|
self.screenName = screenName
|
|
121
121
|
self.title = title
|
|
@@ -144,6 +144,7 @@ public struct NavigationOptions {
|
|
|
144
144
|
self.inputSearchProps = inputSearchProps
|
|
145
145
|
self.fabProps = fabProps
|
|
146
146
|
self.onBackHandler = onBackHandler
|
|
147
|
+
self.contentLayout = contentLayout
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
|
|
@@ -187,30 +188,9 @@ struct OptionsStackScreen: View {
|
|
|
187
188
|
layoutOffset: options.layoutOffset,
|
|
188
189
|
inputSearchProps: options.inputSearchProps,
|
|
189
190
|
fabProps: options.fabProps,
|
|
191
|
+
contentLayout: options.contentLayout,
|
|
190
192
|
screenName: screenName,
|
|
191
193
|
content: content
|
|
192
194
|
)
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
|
-
|
|
196
|
-
// MARK: - Edge-to-edge tab content
|
|
197
|
-
|
|
198
|
-
public extension View {
|
|
199
|
-
/// Compose's `floatingTabBarContentPadding()`: the content of a `BottomTab` tab runs edge to edge behind
|
|
200
|
-
/// the floating tab bar and the home indicator, and pads its own bottom (e.g. a full-screen native view
|
|
201
|
-
/// with its own safe area). No effect outside a tab.
|
|
202
|
-
func floatingTabBarEdgeToEdge() -> some View {
|
|
203
|
-
modifier(FloatingTabBarEdgeToEdge())
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
private struct FloatingTabBarEdgeToEdge: ViewModifier {
|
|
208
|
-
@OptionalEnvironmentObject private var navigation: Navigation?
|
|
209
|
-
|
|
210
|
-
func body(content: Content) -> some View {
|
|
211
|
-
content.onAppear {
|
|
212
|
-
guard let navigation, navigation.bottomTabIndex != -1, !navigation.bottomTabEdgeToEdge else { return }
|
|
213
|
-
navigation.bottomTabEdgeToEdge = true
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
@@ -34,6 +34,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
34
34
|
var layoutOffset: CGFloat
|
|
35
35
|
var inputSearchProps: InputSearchProps?
|
|
36
36
|
var fabProps: FabProps?
|
|
37
|
+
var contentLayout: ContentLayout = .grid
|
|
37
38
|
var screenName: String = ""
|
|
38
39
|
var content: () -> Content
|
|
39
40
|
|
|
@@ -65,6 +66,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
65
66
|
layoutOffset: CGFloat = 56,
|
|
66
67
|
inputSearchProps: InputSearchProps? = nil,
|
|
67
68
|
fabProps: FabProps? = nil,
|
|
69
|
+
contentLayout: ContentLayout = .grid,
|
|
68
70
|
screenName: String = "",
|
|
69
71
|
@ViewBuilder content: @escaping () -> Content
|
|
70
72
|
) {
|
|
@@ -95,6 +97,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
95
97
|
self.layoutOffset = layoutOffset
|
|
96
98
|
self.inputSearchProps = inputSearchProps
|
|
97
99
|
self.fabProps = fabProps
|
|
100
|
+
self.contentLayout = contentLayout
|
|
98
101
|
self.screenName = screenName
|
|
99
102
|
self.content = content
|
|
100
103
|
}
|
|
@@ -161,16 +164,6 @@ public struct StackScreen<Content: View>: View {
|
|
|
161
164
|
&& inputSearchProps == nil && !headerTransparent && !fullScreenContent
|
|
162
165
|
}
|
|
163
166
|
|
|
164
|
-
/// Bottom room for the tab's content: clear of the floating bar, unless the tab runs edge to edge
|
|
165
|
-
/// (`floatingTabBarEdgeToEdge()`), when it also covers the home indicator that BottomTab keeps clear of
|
|
166
|
-
/// (a negative inset extends the content past the tab's frame).
|
|
167
|
-
private var contentBottomInset: CGFloat {
|
|
168
|
-
guard let navigation, navigation.bottomTabIndex != -1, navigation.bottomTabEdgeToEdge else {
|
|
169
|
-
return duoTabBarInsets.overlay
|
|
170
|
-
}
|
|
171
|
-
return -layout.insets.bottom
|
|
172
|
-
}
|
|
173
|
-
|
|
174
167
|
/// iPhone Duo: the header leaves with the content and slides back in on a reverse scroll
|
|
175
168
|
/// (RN DuoQuickReturnHeader). The side bar is drawn apart from the header, so it stays put.
|
|
176
169
|
private var useQuickReturn: Bool {
|
|
@@ -307,6 +300,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
307
300
|
}
|
|
308
301
|
}
|
|
309
302
|
.ignoresSafeArea(.keyboard, edges: .bottom)
|
|
303
|
+
.environment(\.contentLayout, contentLayout)
|
|
310
304
|
.onChange(of: scrollOffset) { updateHeaderHide($0) }
|
|
311
305
|
.onAppear { reportEmptySideBar() }
|
|
312
306
|
.onChange(of: showsSideBar) { _ in reportEmptySideBar() }
|
|
@@ -389,7 +383,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
389
383
|
scrollOffset: $scrollOffset,
|
|
390
384
|
scrollToTopCallback: scrollToTopCallback,
|
|
391
385
|
animatedSearchInset: animatedSearchInset,
|
|
392
|
-
bottomInset:
|
|
386
|
+
bottomInset: duoTabBarInsets.overlay,
|
|
393
387
|
snapDistance: searchSnapDistance,
|
|
394
388
|
onScrollIdle: settleHeader,
|
|
395
389
|
content: { animatedHeroBody(animatedHeader) }
|
|
@@ -422,7 +416,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
422
416
|
scrollOffset: $scrollOffset,
|
|
423
417
|
scrollToTopCallback: scrollToTopCallback,
|
|
424
418
|
animatedSearchInset: animatedSearchInset,
|
|
425
|
-
bottomInset:
|
|
419
|
+
bottomInset: duoTabBarInsets.overlay,
|
|
426
420
|
snapDistance: searchSnapDistance,
|
|
427
421
|
onScrollIdle: settleHeader,
|
|
428
422
|
content: { duoInsetContent }
|
|
@@ -443,7 +437,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
443
437
|
scrollOffset: $scrollOffset,
|
|
444
438
|
scrollToTopCallback: scrollToTopCallback,
|
|
445
439
|
topInset: layout.headerHeight - layout.insets.top,
|
|
446
|
-
bottomInset:
|
|
440
|
+
bottomInset: duoTabBarInsets.overlay,
|
|
447
441
|
snapDistance: searchSnapDistance,
|
|
448
442
|
onScrollIdle: settleHeader,
|
|
449
443
|
content: content
|
|
@@ -489,7 +483,7 @@ public struct StackScreen<Content: View>: View {
|
|
|
489
483
|
scrollOffset: $scrollOffset,
|
|
490
484
|
scrollToTopCallback: scrollToTopCallback,
|
|
491
485
|
animatedSearchInset: animatedSearchInset,
|
|
492
|
-
bottomInset:
|
|
486
|
+
bottomInset: duoTabBarInsets.overlay,
|
|
493
487
|
snapDistance: searchSnapDistance,
|
|
494
488
|
onScrollIdle: settleHeader,
|
|
495
489
|
content: content
|
|
@@ -506,18 +500,28 @@ public struct StackScreen<Content: View>: View {
|
|
|
506
500
|
}
|
|
507
501
|
|
|
508
502
|
private func heroGlassStart(_ animatedHeader: AnimatedHeader) -> CGFloat {
|
|
509
|
-
max(
|
|
503
|
+
max(bannerWidth / animatedHeader.aspectRatio.value - layout.headerHeight, 0)
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/// Wide windows keep the phone banner size, centered; phones fill the width.
|
|
507
|
+
private var bannerWidth: CGFloat {
|
|
508
|
+
layout.headerLayout(contentLayout).isWide ? HeaderLayoutMetrics.bannerWidth : layout.width
|
|
510
509
|
}
|
|
511
510
|
|
|
512
511
|
/// The banner fills the width at its aspect ratio; the body starts `layoutOffset` below the
|
|
513
|
-
/// header band so it overlaps the banner's lower part.
|
|
512
|
+
/// header band so it overlaps the banner's lower part. On wide windows `bannerBackgroundColor`
|
|
513
|
+
/// fills the sides, fading out downward.
|
|
514
514
|
@ViewBuilder
|
|
515
515
|
private func animatedHeroBody(_ animatedHeader: AnimatedHeader) -> some View {
|
|
516
|
-
let width =
|
|
516
|
+
let width = bannerWidth
|
|
517
517
|
let imageHeight = width / animatedHeader.aspectRatio.value
|
|
518
518
|
let contentTopInset = layout.headerHeight + layoutOffset
|
|
519
519
|
|
|
520
520
|
ZStack(alignment: .top) {
|
|
521
|
+
if width < layout.width, let fill = animatedHeader.bannerBackgroundColor {
|
|
522
|
+
LinearGradient(colors: [fill, fill.opacity(0)], startPoint: .top, endPoint: .bottom)
|
|
523
|
+
.frame(width: layout.width, height: imageHeight)
|
|
524
|
+
}
|
|
521
525
|
animatedHeader.composable(scrollOffset)
|
|
522
526
|
.frame(width: width, height: imageHeight)
|
|
523
527
|
.clipped()
|
|
@@ -571,8 +575,7 @@ private struct StackScreenContent<Content: View>: View {
|
|
|
571
575
|
/// Room for a header the content scrolls under (iPhone Duo glass header).
|
|
572
576
|
var topInset: CGFloat = 0
|
|
573
577
|
/// Room for the floating tab bar that overlays the content: scrolling content runs under it and
|
|
574
|
-
/// ends clear of it, static content stays above it.
|
|
575
|
-
/// reaches that far past its frame.
|
|
578
|
+
/// ends clear of it, static content stays above it.
|
|
576
579
|
var bottomInset: CGFloat = 0
|
|
577
580
|
/// Compose's animated-search snap: a scroll that comes to rest part way through this distance
|
|
578
581
|
/// finishes the move, up or back down.
|
|
@@ -633,8 +636,6 @@ private struct StackScreenContent<Content: View>: View {
|
|
|
633
636
|
}
|
|
634
637
|
}
|
|
635
638
|
.coordinateSpace(name: scrollSpace)
|
|
636
|
-
// an edge-to-edge tab's scroll reaches past its frame, under the home indicator
|
|
637
|
-
.padding(.bottom, min(bottomInset, 0))
|
|
638
639
|
.modifier(ScrollRest(offset: scrollOffset, onRest: scrollDidRest))
|
|
639
640
|
// Status-bar tap (MoMoStatusBarTap swizzle) scrolls to top and notifies the consumer.
|
|
640
641
|
.onReceive(NotificationCenter.default.publisher(for: MoMoStatusBarTap.notificationName)) { _ in
|
|
@@ -735,6 +736,7 @@ private struct SearchAnimatedHeader: View {
|
|
|
735
736
|
var hasToolkit: Bool = false
|
|
736
737
|
|
|
737
738
|
@Environment(\.screenLayout) private var layout
|
|
739
|
+
@Environment(\.contentLayout) private var contentLayout
|
|
738
740
|
@Environment(\.appTheme) private var theme
|
|
739
741
|
@OptionalEnvironmentObject private var navigator: Navigator?
|
|
740
742
|
|
|
@@ -745,14 +747,15 @@ private struct SearchAnimatedHeader: View {
|
|
|
745
747
|
let rowTop = layout.headerStatusBarHeight - layout.insets.top
|
|
746
748
|
let minTop = rowTop + (layout.headerBarHeight - HEADER_HEIGHT) / 2
|
|
747
749
|
let maxTop = layout.headerHeight - layout.insets.top
|
|
748
|
-
|
|
750
|
+
// stretch screens on wide windows keep the search in the header's centered frame
|
|
751
|
+
let minSide = layout.headerLayout(contentLayout).frameInset
|
|
749
752
|
// collapsed on the iPhone Duo status bar row, the search stays between its clusters (48pt back there)
|
|
750
753
|
let clearance = layout.statusBarClearance
|
|
751
|
-
let backWidth: CGFloat = clearance != nil && !useSideBar ? DuoMetrics.controlSize :
|
|
752
|
-
let maxStart = (clearance?.left ?? 0) + (hiddenBack || useSideBar ?
|
|
754
|
+
let backWidth: CGFloat = clearance != nil && !useSideBar ? DuoMetrics.controlSize : HeaderLayoutMetrics.buttonSize
|
|
755
|
+
let maxStart = (clearance?.left ?? 0) + (hiddenBack || useSideBar ? minSide : backWidth + minSide + HeaderLayoutMetrics.titleGap)
|
|
753
756
|
let maxEnd = (clearance?.right ?? 0) + (useSideBar && hasToolkit
|
|
754
|
-
?
|
|
755
|
-
: headerRightWidth + (hasHeaderRight ? Spacing.M
|
|
757
|
+
? minSide
|
|
758
|
+
: headerRightWidth + (hasHeaderRight ? minSide + Spacing.M : minSide))
|
|
756
759
|
|
|
757
760
|
// one progress for all three, so the field docks with its final insets and never covers the toolkit
|
|
758
761
|
let progress = min(scroll / HEADER_HEIGHT, 1)
|
|
@@ -768,6 +771,7 @@ private struct SearchAnimatedHeader: View {
|
|
|
768
771
|
theme: theme,
|
|
769
772
|
pop: navigator.map { navigator in { navigator.pop() } }
|
|
770
773
|
))
|
|
774
|
+
.headerSize()
|
|
771
775
|
.frame(height: HEADER_HEIGHT)
|
|
772
776
|
.padding(.leading, start)
|
|
773
777
|
.padding(.trailing, end)
|
package/ios/native-kits.podspec
CHANGED
|
@@ -30,6 +30,7 @@ struct AnimatedHeaderDemoContent: View {
|
|
|
30
30
|
|
|
31
31
|
@State private var ratio: AnimatedHeaderRatio = .ratio16_9
|
|
32
32
|
@State private var isSurface = true
|
|
33
|
+
@State private var isStretch = true
|
|
33
34
|
|
|
34
35
|
private let imageUrl = "https://static.momocdn.net/app/img/booking/holiday/mid_atumn_dldl.jpeg"
|
|
35
36
|
|
|
@@ -47,6 +48,11 @@ struct AnimatedHeaderDemoContent: View {
|
|
|
47
48
|
MomoText("Surface")
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
// wide windows (short side >= 600): phone-sized banner, sides filled with the banner color
|
|
52
|
+
Toggle(isOn: $isStretch) {
|
|
53
|
+
MomoText("Stretch content layout")
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
MoMoUIKits.Button(
|
|
51
57
|
title: "Show Animated Header",
|
|
52
58
|
action: show,
|
|
@@ -63,6 +69,7 @@ struct AnimatedHeaderDemoContent: View {
|
|
|
63
69
|
private func show() {
|
|
64
70
|
let ratio = ratio
|
|
65
71
|
let isSurface = isSurface
|
|
72
|
+
let contentLayout: ContentLayout = isStretch ? .stretch : .grid
|
|
66
73
|
let url = imageUrl
|
|
67
74
|
navigator.push(
|
|
68
75
|
{ AnimatedHeaderTargetScreen(ratio: ratio) },
|
|
@@ -77,8 +84,10 @@ struct AnimatedHeaderDemoContent: View {
|
|
|
77
84
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
78
85
|
.clipped()
|
|
79
86
|
)
|
|
80
|
-
}
|
|
81
|
-
|
|
87
|
+
},
|
|
88
|
+
bannerBackgroundColor: Colors.pink09
|
|
89
|
+
),
|
|
90
|
+
contentLayout: contentLayout
|
|
82
91
|
)
|
|
83
92
|
)
|
|
84
93
|
}
|
|
@@ -39,8 +39,6 @@ private struct DemoConfig: Hashable {
|
|
|
39
39
|
var initialRouteName = "Momo"
|
|
40
40
|
var compressionBehavior: DuoBarCompressionBehavior = .toolbar
|
|
41
41
|
var backToInitialTab = true
|
|
42
|
-
// a sticky footer in the tab's content body, to check it clears the floating bar
|
|
43
|
-
var footer = false
|
|
44
42
|
|
|
45
43
|
var visibleTabs: [TabConfig] { Array(tabs.prefix(tabCount)) }
|
|
46
44
|
}
|
|
@@ -109,10 +107,7 @@ struct BottomTabDemoContent: View {
|
|
|
109
107
|
icon: tab.icon,
|
|
110
108
|
showDot: tab.showDot,
|
|
111
109
|
badgeLabel: tab.badgeLabel,
|
|
112
|
-
options: NavigationOptions(
|
|
113
|
-
headerTitle: .default(tab.label),
|
|
114
|
-
footer: config.footer ? { AnyView(demoFooter) } : nil
|
|
115
|
-
),
|
|
110
|
+
options: NavigationOptions(headerTitle: .default(tab.label)),
|
|
116
111
|
screen: { TabContent(name: tab.name, config: $config, focused: $focused) }
|
|
117
112
|
)
|
|
118
113
|
},
|
|
@@ -129,10 +124,6 @@ struct BottomTabDemoContent: View {
|
|
|
129
124
|
.onAppear { ctaLottieLoader.load() }
|
|
130
125
|
}
|
|
131
126
|
|
|
132
|
-
private var demoFooter: some View {
|
|
133
|
-
MoMoUIKits.Button(title: "Footer trong content", action: {}, isFull: true)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
127
|
private var floatingButton: BottomTabFloatingButton? {
|
|
137
128
|
guard config.special else { return nil }
|
|
138
129
|
guard config.ctaLottie else {
|
|
@@ -211,9 +202,6 @@ private struct TabContent: View {
|
|
|
211
202
|
])
|
|
212
203
|
Options(title: "backToInitialTab", hint: "Back ở tab khác quay về tab đầu trước khi rời màn",
|
|
213
204
|
options: yesNo(config.backToInitialTab) { config.backToInitialTab = $0 })
|
|
214
|
-
Options(title: "footer",
|
|
215
|
-
hint: "Footer dính trong content body, kiểm tra nó nằm trên thanh tab nổi",
|
|
216
|
-
options: yesNo(config.footer) { config.footer = $0 })
|
|
217
205
|
}
|
|
218
206
|
|
|
219
207
|
Section(title: "Nút giữa (floatingButton)") {
|
|
@@ -273,7 +273,9 @@ private struct HeaderTypesScreen: View {
|
|
|
273
273
|
|
|
274
274
|
@EnvironmentObject private var navigation: Navigation
|
|
275
275
|
@Environment(\.applicationEnvironment) private var applicationEnvironment
|
|
276
|
+
@Environment(\.screenLayout) private var layout
|
|
276
277
|
@State private var kind: AnyHashable = Kind.default
|
|
278
|
+
@State private var contentLayout: AnyHashable = ContentLayout.grid
|
|
277
279
|
@State private var titlePosition: AnyHashable = TitlePosition.left
|
|
278
280
|
@State private var showBack = true
|
|
279
281
|
@State private var headerRight: AnyHashable = HeaderRightOption.toolkit
|
|
@@ -295,6 +297,15 @@ private struct HeaderTypesScreen: View {
|
|
|
295
297
|
}, label: position == .left ? "LEFT" : "CENTER")
|
|
296
298
|
}
|
|
297
299
|
Divider()
|
|
300
|
+
// stretch only differs on wide windows (short side >= 600, iPhone Duo excluded)
|
|
301
|
+
let headerLayout = layout.headerLayout(contentLayout.base as? ContentLayout ?? .grid)
|
|
302
|
+
MomoText("Content Layout · wide: \(headerLayout.isWide), frame inset: \(Int(headerLayout.frameInset))")
|
|
303
|
+
ForEach([ContentLayout.grid, ContentLayout.stretch], id: \.self) { item in
|
|
304
|
+
Radio(value: item, groupValue: $contentLayout, onChange: {
|
|
305
|
+
navigation.setOptions { $0.contentLayout = item }
|
|
306
|
+
}, label: item == .grid ? "Grid" : "Stretch")
|
|
307
|
+
}
|
|
308
|
+
Divider()
|
|
298
309
|
Checkbox($showBack, onChange: { checked in
|
|
299
310
|
navigation.setOptions { $0.hiddenBack = !checked }
|
|
300
311
|
}, title: "Show Back")
|