mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Add “learn more” button in UserOtherSessions
This commit is contained in:
@@ -30,9 +30,14 @@ struct UserOtherSessions: View {
|
||||
itemsView()
|
||||
}
|
||||
} header: {
|
||||
UserOtherSessionsHeaderView(viewData: viewModel.viewState.header)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.top, 24.0)
|
||||
UserOtherSessionsHeaderView(
|
||||
viewData: viewModel.viewState.header,
|
||||
onLearnMoreAction: {
|
||||
|
||||
}
|
||||
)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.top, 24.0)
|
||||
}
|
||||
}
|
||||
.onChange(of: viewModel.isEditModeEnabled) { _ in
|
||||
|
||||
+9
-6
@@ -17,9 +17,9 @@
|
||||
import SwiftUI
|
||||
|
||||
struct UserOtherSessionsHeaderViewData: Hashable {
|
||||
var title: String?
|
||||
let title: String?
|
||||
let subtitle: String
|
||||
var iconName: String?
|
||||
let iconName: String?
|
||||
}
|
||||
|
||||
struct UserOtherSessionsHeaderView: View {
|
||||
@@ -30,6 +30,7 @@ struct UserOtherSessionsHeaderView: View {
|
||||
@Environment(\.theme) private var theme
|
||||
|
||||
let viewData: UserOtherSessionsHeaderViewData
|
||||
var onLearnMoreAction: (() -> Void)?
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
@@ -48,10 +49,12 @@ struct UserOtherSessionsHeaderView: View {
|
||||
.foregroundColor(theme.colors.primaryContent)
|
||||
.padding(.vertical, 9.0)
|
||||
}
|
||||
Text(viewData.subtitle)
|
||||
.font(theme.fonts.footnote)
|
||||
.foregroundColor(theme.colors.secondaryContent)
|
||||
.padding(.bottom, 20.0)
|
||||
InlineTextButton(viewData.subtitle, tappableText: VectorL10n.userSessionLearnMore) {
|
||||
onLearnMoreAction?()
|
||||
}
|
||||
.font(theme.fonts.footnote)
|
||||
.foregroundColor(theme.colors.secondaryContent)
|
||||
.padding(.bottom, 20.0)
|
||||
})
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
Reference in New Issue
Block a user