diff --git a/SharedPackages/BrowserServicesKit/Sources/BrowserServicesKit/DataImport/DataImport.swift b/SharedPackages/BrowserServicesKit/Sources/BrowserServicesKit/DataImport/DataImport.swift index a551e4e161b..24588a016ac 100644 --- a/SharedPackages/BrowserServicesKit/Sources/BrowserServicesKit/DataImport/DataImport.swift +++ b/SharedPackages/BrowserServicesKit/Sources/BrowserServicesKit/DataImport/DataImport.swift @@ -40,12 +40,12 @@ public enum DataImport { case tor case vivaldi case yandex + case csv + case bookmarksHTML case onePassword8 case onePassword7 case bitwarden case lastPass - case csv - case bookmarksHTML static let preferredSources: [Self] = [.chrome, .safari] diff --git a/macOS/DuckDuckGo/Common/Localizables/UserText.swift b/macOS/DuckDuckGo/Common/Localizables/UserText.swift index 8c2927aa01a..8377b7bba95 100644 --- a/macOS/DuckDuckGo/Common/Localizables/UserText.swift +++ b/macOS/DuckDuckGo/Common/Localizables/UserText.swift @@ -1188,7 +1188,7 @@ struct UserText { // MARK: - Login Import & Export static let importChooseSourceTitle = NSLocalizedString("import.choose-source.title", value: "Choose where to import from", comment: "Title text for the import dialog, before the user selects a source") - static let importChooseSourceShowMoreButtonTitle = NSLocalizedString("import.choose-source.show-more-button.title", value: "Show More", comment: "Button text for showing more import options in the data import view") + static let importChooseSourceShowMoreButtonTitle = NSLocalizedString("import.choose-source.more-button.title", value: "More", comment: "Button text for showing more import options in the data import view") static let importChooseSourceSyncButtonTitle = NSLocalizedString("import.choose-source.sync-button.title", value: "Using DuckDuckGo on another device?", comment: "Button text for syncing from the data import view") static let importChooseSourceSyncButtonAction = NSLocalizedString("import.choose-source.sync-button.action", value: "Sync", comment: "Action text for syncing data with another device from the data import view") diff --git a/macOS/DuckDuckGo/DataImport/View/DataImportView.swift b/macOS/DuckDuckGo/DataImport/View/DataImportView.swift index 4fbfdddfbc4..e40a996995e 100644 --- a/macOS/DuckDuckGo/DataImport/View/DataImportView.swift +++ b/macOS/DuckDuckGo/DataImport/View/DataImportView.swift @@ -196,7 +196,7 @@ struct DataImportView: ModalView { @State private var showPasswordsExplainerPopover = false private func passwordsExplainerView() -> some View { - HStack(spacing: 4) { + HStack(spacing: 8) { Image(nsImage: DesignSystemImages.Glyphs.Size16.lock) .renderingMode(.template) .foregroundColor(Color(designSystemColor: showPasswordsExplainerPopover ? .iconsPrimary : .iconsTertiary)) diff --git a/macOS/DuckDuckGo/DataImport/View/New/DataImportSummaryDetailView.swift b/macOS/DuckDuckGo/DataImport/View/New/DataImportSummaryDetailView.swift index fec7d269b74..4a387d2e76a 100644 --- a/macOS/DuckDuckGo/DataImport/View/New/DataImportSummaryDetailView.swift +++ b/macOS/DuckDuckGo/DataImport/View/New/DataImportSummaryDetailView.swift @@ -34,6 +34,8 @@ struct DataImportSummaryDetailView: View { var body: some View { VStack(spacing: 0) { headerView + .padding(.horizontal, Metrics.outerPadding) + .padding(.top, Metrics.outerPadding) .padding(.bottom, 16) ScrollView { @@ -50,9 +52,10 @@ struct DataImportSummaryDetailView: View { } } } + .padding(.horizontal, Metrics.outerPadding) } + .padding(.bottom, Metrics.outerPadding) } - .padding(20) .frame(maxHeight: 600) } @@ -112,7 +115,7 @@ struct DataImportSummaryDetailView: View { @ViewBuilder private func duplicateRow(item: ImportItem) -> some View { - if case .password(let _, let domain, let username, _) = item { + if case .password(_, let domain, let username, _) = item { duplicateRowContent( icon: DesignSystemImages.Glyphs.Size16.globe, content: { @@ -273,6 +276,7 @@ struct DataImportSummaryDetailView: View { private enum Metrics { static let sectionInnerPadding: CGFloat = 10 static let mainStackViewSpacing: CGFloat = 20 + static let outerPadding: CGFloat = 20 static let iconSize: CGFloat = 16.0 static let sectionHeaderHeight: CGFloat = 44.0 static let innerRowSpacing: CGFloat = 8.0 diff --git a/macOS/DuckDuckGo/DataImport/View/New/ImportSourcePickerView.swift b/macOS/DuckDuckGo/DataImport/View/New/ImportSourcePickerView.swift index e622f41612d..575b514658f 100644 --- a/macOS/DuckDuckGo/DataImport/View/New/ImportSourcePickerView.swift +++ b/macOS/DuckDuckGo/DataImport/View/New/ImportSourcePickerView.swift @@ -72,7 +72,7 @@ struct ImportSourcePickerView: View { HoverButtonView { viewModel.showTypeSelectionSheet() } content: { - HStack(alignment: .lastTextBaseline, spacing: 1) { + HStack(alignment: .center, spacing: 4) { Text(viewModel.typeButtonTitle) .font(.system(size: 13, weight: .semibold)) Image(nsImage: DesignSystemImages.Glyphs.Size16.chevronRight) @@ -80,6 +80,7 @@ struct ImportSourcePickerView: View { .resizable() .frame(width: 10, height: 10) .rotationEffect(.degrees(90)) + .offset(y: 1) } } } @@ -100,7 +101,7 @@ struct ImportSourcePickerView: View { viewModel.toggleExpansion() } content: { Text(UserText.importChooseSourceShowMoreButtonTitle) - .font(.system(size: 11, weight: .semibold)) + .font(.system(size: 13, weight: .semibold)) .multilineTextAlignment(.center) } .padding(.top, 10) @@ -125,7 +126,7 @@ struct ImportSourcePickerView: View { .padding(.horizontal, 12) .padding(.vertical, 14) .frame(width: 380, alignment: .center) - .background((Color(designSystemColor: .surfacePrimary))) + .background((Color(designSystemColor: .surfaceSecondary))) .cornerRadius(10) } .buttonStyle(.plain) diff --git a/macOS/DuckDuckGo/Localization/Localizable.xcstrings b/macOS/DuckDuckGo/Localization/Localizable.xcstrings index c8f835f6bea..51cd3ec4ed4 100644 --- a/macOS/DuckDuckGo/Localization/Localizable.xcstrings +++ b/macOS/DuckDuckGo/Localization/Localizable.xcstrings @@ -42515,14 +42515,14 @@ } } }, - "import.choose-source.show-more-button.title" : { + "import.choose-source.more-button.title" : { "comment" : "Button text for showing more import options in the data import view", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Show More" + "value" : "More" } } }