Skip to content

Commit

Permalink
Adapt sections
Browse files Browse the repository at this point in the history
- General > Storage
- General > AppleTV
- On-demand > Policy
- OpenVPN credentials > Interactive
- Settings > iCloud
  • Loading branch information
keeshux committed Nov 5, 2024
1 parent d0dff1c commit 7882c00
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private extension OnDemandView {
}
}
.themeSection(footer: policyFooterDescription)
.themeRow(footer: policyFooterDescription)
}

var policyFooterDescription: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct AppleTVSection: View {
private extension AppleTVSection {
var availableToggle: some View {
Toggle(Strings.Modules.General.Rows.appleTv(Strings.Unlocalized.appleTV), isOn: $profileEditor.isAvailableForTV)
.themeRow(footer: footer)
}

@ViewBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,19 @@ struct StorageSection: View {
}
.themeSection(
header: Strings.Global.storage,
footer: Strings.Modules.General.Sections.Storage.footer
footer: footer
)
}
}

private extension StorageSection {
var sharingToggle: some View {
Toggle(Strings.Modules.General.Rows.icloudSharing, isOn: $profileEditor.isShared)
.themeRow(footer: footer)
}

var footer: String {
Strings.Modules.General.Sections.Storage.footer
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ struct SettingsSectionGroup: View {
.themeSection(header: Strings.Global.general)
Group {
eraseCloudKitButton
.themeRow(footer: iCloudFooter)
}
.themeSection(
header: Strings.Unlocalized.iCloud,
footer: Strings.Views.Settings.Sections.Icloud.footer
footer: iCloudFooter
)
}
}
Expand Down Expand Up @@ -99,4 +100,8 @@ private extension SettingsSectionGroup {
}
.disabled(isErasingiCloud)
}

var iCloudFooter: String {
Strings.Views.Settings.Sections.Icloud.footer
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ private extension OpenVPNCredentialsView {
var interactiveSection: some View {
Group {
Toggle(Strings.Modules.Openvpn.Credentials.interactive, isOn: $isInteractive)
.themeRow(footer: interactiveFooter)

if isInteractive {
Picker(Strings.Unlocalized.otp, selection: $builder.otpMethod) {
Expand Down

0 comments on commit 7882c00

Please sign in to comment.