Prioritize phone vault actions

This commit is contained in:
Joe Julian
2026-04-07 06:53:13 -07:00
parent 5d435f1f1f
commit 1aab5367a8
2 changed files with 123 additions and 93 deletions
+21 -1
View File
@@ -746,6 +746,20 @@ func TestUILifecycleControlsWithSelectedRecentVaultDoesNotPanic(t *testing.T) {
_ = u.lifecycleControls(gtx)
}
func TestUIShouldPrioritizeLifecyclePrimaryActionsOnPhone(t *testing.T) {
t.Parallel()
phone := newUIWithSession("phone", &session.Manager{})
if !phone.shouldPrioritizeLifecyclePrimaryActions() {
t.Fatal("phone.shouldPrioritizeLifecyclePrimaryActions() = false, want true")
}
desktop := newUIWithSession("desktop", &session.Manager{})
if desktop.shouldPrioritizeLifecyclePrimaryActions() {
t.Fatal("desktop.shouldPrioritizeLifecyclePrimaryActions() = true, want false")
}
}
func TestUIRecentVaultListWithSelectedRecentVaultDoesNotPanic(t *testing.T) {
t.Parallel()
@@ -6040,7 +6054,13 @@ func TestUIRemoteSyncSetupShortcutLabelUsesClearLanguage(t *testing.T) {
func TestUILifecycleRemoteSyncActionLabelUsesSetupLanguageWithoutSavedBinding(t *testing.T) {
t.Parallel()
u := newUIWithSession("desktop", &session.Manager{})
dir := t.TempDir()
u := newUIWithSession("desktop", &session.Manager{}, statePaths{
DefaultSaveAsPath: filepath.Join(dir, "vault.kdbx"),
RecentVaultsPath: filepath.Join(dir, "recent-vaults.json"),
RecentRemotesPath: filepath.Join(dir, "recent-remotes.json"),
UIPreferencesPath: filepath.Join(dir, "ui-prefs.json"),
})
u.vaultPath.SetText("/vaults/bellagio.kdbx")
if !u.shouldShowLifecycleRemoteSyncAction() {