Simplify settings UI and fix personal dictionary page styling
- Remove polish intensity and personal dictionary description subtitles - Use consistent surface background on personal dictionary page - Change empty state icon to library (menuBook) style - Remove polish scenario and translation rows from onboarding Co-authored-by: Rocky <hkgood@users.noreply.github.com>
This commit is contained in:
@@ -757,35 +757,8 @@ private struct APISetupPage: View {
|
||||
.padding(.horizontal, Spacing.lg)
|
||||
}
|
||||
|
||||
if config.isPolishScenarioRowVisible {
|
||||
postProcessingSection
|
||||
.padding(.horizontal, Spacing.lg)
|
||||
}
|
||||
}
|
||||
.padding(.bottom, Spacing.xxxl)
|
||||
}
|
||||
}
|
||||
|
||||
/// Polish scenario + optional translation target for cloud onboarding.
|
||||
private var postProcessingSection: some View {
|
||||
VStack(alignment: .leading, spacing: SettingsListMetrics.sectionLabelSpacing) {
|
||||
Text("settings.polishScenario.section")
|
||||
.font(TypeStyle.caption2)
|
||||
.foregroundStyle(palette.textSecondary)
|
||||
.textCase(.uppercase)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
VStack(spacing: 0) {
|
||||
ScenarioPickerRow(config: config, isVisible: true)
|
||||
if config.isTranslationRowVisible {
|
||||
Divider().background(palette.divider)
|
||||
TranslationPickerRow(config: config, isVisible: true)
|
||||
}
|
||||
}
|
||||
.background(palette.surface, in: RoundedRectangle(cornerRadius: Radius.large, style: .continuous))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: Radius.large, style: .continuous)
|
||||
.stroke(palette.divider, lineWidth: 0.5)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ struct PersonalDictionaryView: View {
|
||||
list
|
||||
}
|
||||
}
|
||||
.background(palette.background.ignoresSafeArea())
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(palette.surface.ignoresSafeArea())
|
||||
.navigationTitle("settings.personalDictionary.title")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar(.visible, for: .navigationBar)
|
||||
@@ -56,7 +57,7 @@ struct PersonalDictionaryView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.toolbarBackground(palette.background, for: .navigationBar)
|
||||
.toolbarBackground(palette.surface, for: .navigationBar)
|
||||
.toolbarBackground(.visible, for: .navigationBar)
|
||||
.confirmationDialog(
|
||||
AppL10n.string("settings.personalDictionary.clearAll.confirmTitle"),
|
||||
@@ -180,7 +181,7 @@ struct PersonalDictionaryView: View {
|
||||
private var emptyState: some View {
|
||||
VStack(spacing: Spacing.sm) {
|
||||
Spacer()
|
||||
MaterialIcon(name: .bookmark, size: 36)
|
||||
MaterialIcon(name: .menuBook, size: 36)
|
||||
.foregroundStyle(palette.textTertiary.opacity(0.5))
|
||||
Text("settings.personalDictionary.empty.title")
|
||||
.font(TypeStyle.body)
|
||||
|
||||
@@ -304,34 +304,12 @@ struct SettingsView: View {
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.padding(.horizontal, Spacing.md)
|
||||
|
||||
Text(SharedL10n.string(config.polishIntensity.descriptionKey, language: config.uiLanguage))
|
||||
.font(TypeStyle.caption2)
|
||||
.foregroundStyle(palette.textSecondary)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, Spacing.md)
|
||||
.padding(.bottom, Spacing.sm)
|
||||
}
|
||||
}
|
||||
|
||||
private var personalDictionaryPreferenceRow: some View {
|
||||
HStack(spacing: Spacing.sm) {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text("settings.personalDictionary.title")
|
||||
.font(TypeStyle.body)
|
||||
.foregroundStyle(palette.textPrimary)
|
||||
Text("settings.personalDictionary.summary")
|
||||
.font(TypeStyle.caption2)
|
||||
.foregroundStyle(palette.textSecondary)
|
||||
}
|
||||
Spacer()
|
||||
Image(systemName: "chevron.right")
|
||||
.font(.system(size: 14, weight: .semibold))
|
||||
.foregroundStyle(palette.textTertiary)
|
||||
}
|
||||
.padding(.horizontal, Spacing.md)
|
||||
.frame(minHeight: SettingsListMetrics.doubleLineMinHeight)
|
||||
.contentShape(Rectangle())
|
||||
footerNavigationRow(title: "settings.personalDictionary.title")
|
||||
}
|
||||
|
||||
// MARK: - Footer links (tab settings only)
|
||||
|
||||
Reference in New Issue
Block a user