From 965c39ab513ff42de395afb66181dd48e876378e Mon Sep 17 00:00:00 2001 From: Davide Date: Wed, 5 Feb 2025 13:39:28 +0100 Subject: [PATCH] iOS: Suggest that profile modules are editable (#1140) Fixes #1080 --- .../Profile/iOS/ProfileEditView+iOS.swift | 30 ++++++++++--------- .../UILibrary/L10n/SwiftGen+Strings.swift | 4 +-- .../Resources/de.lproj/Localizable.strings | 2 +- .../Resources/el.lproj/Localizable.strings | 2 +- .../Resources/en.lproj/Localizable.strings | 2 +- .../Resources/es.lproj/Localizable.strings | 2 +- .../Resources/fr.lproj/Localizable.strings | 2 +- .../Resources/it.lproj/Localizable.strings | 2 +- .../Resources/nl.lproj/Localizable.strings | 2 +- .../Resources/pl.lproj/Localizable.strings | 2 +- .../Resources/pt.lproj/Localizable.strings | 2 +- .../Resources/ru.lproj/Localizable.strings | 2 +- .../Resources/sv.lproj/Localizable.strings | 2 +- .../Resources/uk.lproj/Localizable.strings | 2 +- .../zh-Hans.lproj/Localizable.strings | 2 +- .../UILibrary/Theme/Theme+ImageName.swift | 2 ++ 16 files changed, 33 insertions(+), 29 deletions(-) diff --git a/Packages/App/Sources/AppUIMain/Views/Profile/iOS/ProfileEditView+iOS.swift b/Packages/App/Sources/AppUIMain/Views/Profile/iOS/ProfileEditView+iOS.swift index c668aa12..8fa4c8b5 100644 --- a/Packages/App/Sources/AppUIMain/Views/Profile/iOS/ProfileEditView+iOS.swift +++ b/Packages/App/Sources/AppUIMain/Views/Profile/iOS/ProfileEditView+iOS.swift @@ -107,22 +107,24 @@ private extension ProfileEditView { func moduleRow(for module: any ModuleBuilder) -> some View { EditorModuleToggle(profileEditor: profileEditor, module: module) { - Button { - push(.moduleDetail(moduleId: module.id)) - } label: { - HStack { - Text(module.description(inEditor: profileEditor)) - if errorModuleIds.contains(module.id) { - ThemeImage(.warning) - } else if profileEditor.isActiveModule(withId: module.id) { - PurchaseRequiredView(for: module as? AppFeatureRequiring) - } - Spacer() + HStack { + Text(module.description(inEditor: profileEditor)) + if errorModuleIds.contains(module.id) { + ThemeImage(.warning) + } else if profileEditor.isActiveModule(withId: module.id) { + PurchaseRequiredView(for: module as? AppFeatureRequiring) } - .contentShape(.rect) + Button { + push(.moduleDetail(moduleId: module.id)) + } label: { + Spacer() + ThemeImage(.navigate) + .contentShape(.rect) + .imageScale(.large) + } + .buttonStyle(.borderless) + .uiAccessibility(.Profile.moduleLink) } - .buttonStyle(.plain) - .uiAccessibility(.Profile.moduleLink) } } diff --git a/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift b/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift index 13f13227..e91b805c 100644 --- a/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift +++ b/Packages/App/Sources/UILibrary/L10n/SwiftGen+Strings.swift @@ -838,8 +838,8 @@ public enum Strings { } public enum ModuleList { public enum Section { - /// Drag modules to rearrange them, as their order determines priority. - public static let footer = Strings.tr("Localizable", "views.profile.module_list.section.footer", fallback: "Drag modules to rearrange them, as their order determines priority.") + /// Tap modules to edit their settings. Modules may be dragged to determine priority. + public static let footer = Strings.tr("Localizable", "views.profile.module_list.section.footer", fallback: "Tap modules to edit their settings. Modules may be dragged to determine priority.") } } public enum Rows { diff --git a/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings index b8d73c35..1107a664 100644 --- a/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/de.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Im Hintergrund sperren"; "views.preferences.locks_in_background.footer" = "Sperre die App mit FaceID, wenn sie in den Hintergrund geschickt wird."; "views.profile.alerts.purchase.buttons.ok" = "Trotzdem speichern"; -"views.profile.module_list.section.footer" = "Ziehe die Module, um sie neu anzuordnen, da ihre Reihenfolge die Priorität bestimmt."; +"views.profile.module_list.section.footer" = "Tippen Sie auf Module, um ihre Einstellungen zu bearbeiten. Module können gezogen werden, um die Priorität festzulegen."; "views.profile.rows.add_module" = "Modul hinzufügen"; "views.profile.sections.name.footer" = "Verwenden Sie diesen Namen, um Ihre VPN-Automationen in der Kurzbefehle-App zu erstellen."; "views.providers.clear_filters" = "Filter löschen"; diff --git a/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings index e18dc30d..9011b4a4 100644 --- a/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/el.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Κλείδωμα στο παρασκήνιο"; "views.preferences.locks_in_background.footer" = "Κλειδώστε την εφαρμογή με το FaceID όταν αποστέλλεται στο παρασκήνιο."; "views.profile.alerts.purchase.buttons.ok" = "Αποθήκευση ούτως ή άλλως"; -"views.profile.module_list.section.footer" = "Σύρετε τις μονάδες για να τις αναδιατάξετε, καθώς η σειρά τους καθορίζει την προτεραιότητα."; +"views.profile.module_list.section.footer" = "Πατήστε σε ένα module για να επεξεργαστείτε τις ρυθμίσεις του. Τα modules μπορούν να μετακινηθούν για να καθορίσετε την προτεραιότητά τους."; "views.profile.rows.add_module" = "Προσθήκη μονάδας"; "views.profile.sections.name.footer" = "Χρησιμοποιήστε αυτό το όνομα για να δημιουργήσετε αυτοματισμούς VPN στην εφαρμογή Συντομεύσεις."; "views.providers.clear_filters" = "Καθαρισμός φίλτρων"; diff --git a/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings index dcef1d69..f6584414 100644 --- a/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/en.lproj/Localizable.strings @@ -106,7 +106,7 @@ "views.profile.sections.name.footer" = "Use this name to create your VPN automations from the Shortcuts app."; "views.profile.rows.add_module" = "Add module"; -"views.profile.module_list.section.footer" = "Drag modules to rearrange them, as their order determines priority."; +"views.profile.module_list.section.footer" = "Tap modules to edit their settings. Modules may be dragged to determine priority."; "views.profile.alerts.purchase.buttons.ok" = "Save anyway"; "views.providers.no_provider" = "None"; diff --git a/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings index e5443e53..6c822eb8 100644 --- a/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/es.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Bloquear en segundo plano"; "views.preferences.locks_in_background.footer" = "Bloquea la app con FaceID cuando se envíe al fondo."; "views.profile.alerts.purchase.buttons.ok" = "Guardar de todos modos"; -"views.profile.module_list.section.footer" = "Arrastra los módulos para reorganizarlos, ya que su orden determina la prioridad."; +"views.profile.module_list.section.footer" = "Toca los módulos para editar su configuración. Se pueden arrastrar para establecer la prioridad."; "views.profile.rows.add_module" = "Añadir módulo"; "views.profile.sections.name.footer" = "Usa este nombre para crear automatizaciones VPN en la app Atajos."; "views.providers.clear_filters" = "Borrar filtros"; diff --git a/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings index 0e6755b6..4d1f5b4e 100644 --- a/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/fr.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Verrouiller en arrière-plan"; "views.preferences.locks_in_background.footer" = "Verrouillez l'application avec FaceID lorsqu'elle est envoyée en arrière-plan."; "views.profile.alerts.purchase.buttons.ok" = "Enregistrer quand même"; -"views.profile.module_list.section.footer" = "Faites glisser les modules pour les réorganiser, car leur ordre détermine la priorité."; +"views.profile.module_list.section.footer" = "Touchez les modules pour modifier leurs paramètres. Ils peuvent être glissés pour définir leur priorité."; "views.profile.rows.add_module" = "Ajouter un module"; "views.profile.sections.name.footer" = "Utilisez ce nom pour créer vos automatisations VPN dans l'app Raccourcis."; "views.providers.clear_filters" = "Effacer les filtres"; diff --git a/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings index 14adaf33..29203521 100644 --- a/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/it.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Blocca in background"; "views.preferences.locks_in_background.footer" = "Blocca l'app con FaceID quando viene inviata in background."; "views.profile.alerts.purchase.buttons.ok" = "Salva comunque"; -"views.profile.module_list.section.footer" = "Trascina i moduli per riordinarli, poiché il loro ordine determina la priorità."; +"views.profile.module_list.section.footer" = "Tocca i moduli per modificarne le impostazioni. Possono essere trascinati per determinare la priorità."; "views.profile.rows.add_module" = "Aggiungi modulo"; "views.profile.sections.name.footer" = "Usa questo nome per creare le automazioni VPN nell'app Comandi Rapidi."; "views.providers.clear_filters" = "Cancella filtri"; diff --git a/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings index 3971665c..9f0240ba 100644 --- a/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/nl.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Vergrendelen in achtergrond"; "views.preferences.locks_in_background.footer" = "Vergrendel de app met FaceID wanneer deze naar de achtergrond wordt gestuurd."; "views.profile.alerts.purchase.buttons.ok" = "Toch opslaan"; -"views.profile.module_list.section.footer" = "Sleep modules om ze opnieuw te rangschikken, omdat hun volgorde de prioriteit bepaalt."; +"views.profile.module_list.section.footer" = "Tik op modules om hun instellingen te bewerken. Modules kunnen worden versleept om de prioriteit te bepalen."; "views.profile.rows.add_module" = "Module toevoegen"; "views.profile.sections.name.footer" = "Gebruik deze naam om uw VPN-automatiseringen in de app Opdrachten te maken."; "views.providers.clear_filters" = "Filters wissen"; diff --git a/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings index 4368d696..054a2293 100644 --- a/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/pl.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Blokuj w tle"; "views.preferences.locks_in_background.footer" = "Zablokuj aplikację za pomocą FaceID, gdy zostanie przeniesiona w tle."; "views.profile.alerts.purchase.buttons.ok" = "Zapisz mimo to"; -"views.profile.module_list.section.footer" = "Przeciągnij moduły, aby je uporządkować, ponieważ ich kolejność określa priorytet."; +"views.profile.module_list.section.footer" = "Stuknij moduły, aby edytować ich ustawienia. Można je przeciągnąć, aby ustalić priorytet."; "views.profile.rows.add_module" = "Dodaj moduł"; "views.profile.sections.name.footer" = "Użyj tej nazwy, aby tworzyć automatyzacje VPN w aplikacji Skróty."; "views.providers.clear_filters" = "Wyczyść filtry"; diff --git a/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings index 4c681e8f..a1557ff2 100644 --- a/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/pt.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Bloquear em segundo plano"; "views.preferences.locks_in_background.footer" = "Bloqueie o app com o FaceID ao enviá-lo para segundo plano."; "views.profile.alerts.purchase.buttons.ok" = "Salvar assim mesmo"; -"views.profile.module_list.section.footer" = "Arraste os módulos para reorganizá-los, pois sua ordem determina a prioridade."; +"views.profile.module_list.section.footer" = "Toque nos módulos para editar suas configurações. Eles podem ser arrastados para definir a prioridade."; "views.profile.rows.add_module" = "Adicionar módulo"; "views.profile.sections.name.footer" = "Use este nome para criar automações VPN no app Atalhos."; "views.providers.clear_filters" = "Limpar filtros"; diff --git a/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings index c5288341..f2b9cde5 100644 --- a/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/ru.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Блокировка в фоновом режиме"; "views.preferences.locks_in_background.footer" = "Блокируйте приложение с помощью FaceID, когда оно переводится в фоновый режим."; "views.profile.alerts.purchase.buttons.ok" = "Сохранить в любом случае"; -"views.profile.module_list.section.footer" = "Перетащите модули для их переупорядочивания, так как их порядок определяет приоритет."; +"views.profile.module_list.section.footer" = "Нажмите на модули, чтобы изменить их настройки. Их можно перетаскивать для установки приоритета."; "views.profile.rows.add_module" = "Добавить модуль"; "views.profile.sections.name.footer" = "Используйте это имя для создания автоматизаций VPN в приложении Команды."; "views.providers.clear_filters" = "Очистить фильтры"; diff --git a/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings index e44462a7..c471ef95 100644 --- a/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/sv.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Lås i bakgrunden"; "views.preferences.locks_in_background.footer" = "Lås appen med FaceID när den skickas till bakgrunden."; "views.profile.alerts.purchase.buttons.ok" = "Spara ändå"; -"views.profile.module_list.section.footer" = "Dra moduler för att ordna om dem, eftersom deras ordning avgör prioritet."; +"views.profile.module_list.section.footer" = "Tryck på moduler för att redigera inställningarna. Moduler kan dras för att bestämma prioritet."; "views.profile.rows.add_module" = "Lägg till modul"; "views.profile.sections.name.footer" = "Använd detta namn för att skapa VPN-automatiseringar i appen Genvägar."; "views.providers.clear_filters" = "Rensa filter"; diff --git a/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings index 7324a6b7..7a96a6d4 100644 --- a/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/uk.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "Блокування у фоновому режимі"; "views.preferences.locks_in_background.footer" = "Блокуйте додаток за допомогою FaceID, коли він переходе у фоновий режим."; "views.profile.alerts.purchase.buttons.ok" = "Зберегти все одно"; -"views.profile.module_list.section.footer" = "Перетягніть модулі, щоб змінити їх порядок, оскільки їх порядок визначає пріоритет."; +"views.profile.module_list.section.footer" = "Торкніться модулів, щоб змінити їхні налаштування. Їх можна перетягувати для визначення пріоритету."; "views.profile.rows.add_module" = "Додати модуль"; "views.profile.sections.name.footer" = "Використовуйте цю назву для створення автоматизацій VPN у додатку Команди."; "views.providers.clear_filters" = "Очистити фільтри"; diff --git a/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings b/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings index 00d466e4..0d27759b 100644 --- a/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings +++ b/Packages/App/Sources/UILibrary/Resources/zh-Hans.lproj/Localizable.strings @@ -270,7 +270,7 @@ "views.preferences.locks_in_background" = "后台锁定"; "views.preferences.locks_in_background.footer" = "当应用切换到后台时,使用 FaceID 锁定它。"; "views.profile.alerts.purchase.buttons.ok" = "仍然保存"; -"views.profile.module_list.section.footer" = "拖动模块重新排列,因为它们的顺序决定了优先级。"; +"views.profile.module_list.section.footer" = "点击模块以编辑其设置。可以拖动模块来确定优先级。"; "views.profile.rows.add_module" = "添加模块"; "views.profile.sections.name.footer" = "使用此名称在快捷指令应用中创建您的 VPN 自动化。"; "views.providers.clear_filters" = "清除筛选"; diff --git a/Packages/App/Sources/UILibrary/Theme/Theme+ImageName.swift b/Packages/App/Sources/UILibrary/Theme/Theme+ImageName.swift index ce9dc922..1db8eb92 100644 --- a/Packages/App/Sources/UILibrary/Theme/Theme+ImageName.swift +++ b/Packages/App/Sources/UILibrary/Theme/Theme+ImageName.swift @@ -46,6 +46,7 @@ extension Theme { case info case marked case moreDetails + case navigate case pending case profileEdit case profileImport @@ -98,6 +99,7 @@ extension Theme.ImageName { case .info: return "info.circle" case .marked: return "checkmark" case .moreDetails: return "ellipsis.circle" + case .navigate: return "chevron.forward.circle.fill" case .pending: return "clock" case .profileEdit: return "square.and.pencil" case .profileImport: return "square.and.arrow.down"