Normalize app UI pane packages
This commit is contained in:
+24
-46
@@ -26,9 +26,13 @@ import (
|
||||
"git.julianfamily.org/keepassgo/internal/apiaudit"
|
||||
"git.julianfamily.org/keepassgo/internal/apitokens"
|
||||
"git.julianfamily.org/keepassgo/internal/appstate"
|
||||
detaillayout "git.julianfamily.org/keepassgo/internal/appui/layout/detail"
|
||||
listlayout "git.julianfamily.org/keepassgo/internal/appui/layout/list"
|
||||
detailmodel "git.julianfamily.org/keepassgo/internal/appui/detail"
|
||||
detaillayout "git.julianfamily.org/keepassgo/internal/appui/detail/layout"
|
||||
lifecyclemodel "git.julianfamily.org/keepassgo/internal/appui/lifecycle"
|
||||
listmodel "git.julianfamily.org/keepassgo/internal/appui/list"
|
||||
listlayout "git.julianfamily.org/keepassgo/internal/appui/list/layout"
|
||||
"git.julianfamily.org/keepassgo/internal/appui/platform"
|
||||
syncmodel "git.julianfamily.org/keepassgo/internal/appui/sync"
|
||||
keepassassets "git.julianfamily.org/keepassgo/internal/assets"
|
||||
"git.julianfamily.org/keepassgo/internal/clipboard"
|
||||
"git.julianfamily.org/keepassgo/internal/passwords"
|
||||
@@ -105,24 +109,17 @@ type uiSurface struct {
|
||||
Locked bool
|
||||
}
|
||||
|
||||
type lifecycleOpenIntent string
|
||||
type lifecycleOpenIntent = lifecyclemodel.OpenIntent
|
||||
|
||||
const (
|
||||
lifecycleOpenIntentNone lifecycleOpenIntent = ""
|
||||
lifecycleOpenIntentRemoteSyncSetup lifecycleOpenIntent = "remote_sync_setup"
|
||||
lifecycleOpenIntentRemoteSyncSettings lifecycleOpenIntent = "remote_sync_settings"
|
||||
lifecycleOpenIntentNone = lifecyclemodel.OpenIntentNone
|
||||
lifecycleOpenIntentRemoteSyncSetup = lifecyclemodel.OpenIntentRemoteSyncSetup
|
||||
lifecycleOpenIntentRemoteSyncSettings = lifecyclemodel.OpenIntentRemoteSyncSettings
|
||||
)
|
||||
|
||||
type emptyState struct {
|
||||
Title string
|
||||
Body string
|
||||
}
|
||||
type emptyState = detailmodel.EmptyState
|
||||
|
||||
type vaultSummary struct {
|
||||
Title string
|
||||
Detail string
|
||||
Context string
|
||||
}
|
||||
type vaultSummary = detailmodel.VaultSummary
|
||||
|
||||
type sessionStatus interface {
|
||||
HasVault() bool
|
||||
@@ -130,10 +127,7 @@ type sessionStatus interface {
|
||||
IsRemote() bool
|
||||
}
|
||||
|
||||
type attachmentItem struct {
|
||||
Name string
|
||||
Size int
|
||||
}
|
||||
type attachmentItem = detailmodel.AttachmentItem
|
||||
|
||||
type statePaths struct {
|
||||
DefaultSaveAsPath string
|
||||
@@ -195,32 +189,27 @@ const (
|
||||
autofillFirstFillApprovalBlock autofillFirstFillApprovalMode = "block"
|
||||
)
|
||||
|
||||
type entriesSectionState struct {
|
||||
Path []string
|
||||
SearchQuery string
|
||||
SelectedEntryID string
|
||||
Editing bool
|
||||
}
|
||||
type entriesSectionState = listmodel.EntriesSectionState
|
||||
|
||||
type syncSourceMode string
|
||||
type syncSourceMode = syncmodel.SourceMode
|
||||
|
||||
const (
|
||||
syncSourceLocal syncSourceMode = "local"
|
||||
syncSourceRemote syncSourceMode = "remote"
|
||||
syncSourceLocal = syncmodel.SourceLocal
|
||||
syncSourceRemote = syncmodel.SourceRemote
|
||||
)
|
||||
|
||||
type syncDirection string
|
||||
type syncDirection = syncmodel.Direction
|
||||
|
||||
const (
|
||||
syncDirectionPull syncDirection = "pull"
|
||||
syncDirectionPush syncDirection = "push"
|
||||
syncDirectionPull = syncmodel.DirectionPull
|
||||
syncDirectionPush = syncmodel.DirectionPush
|
||||
)
|
||||
|
||||
type syncDialogPurpose string
|
||||
type syncDialogPurpose = syncmodel.DialogPurpose
|
||||
|
||||
const (
|
||||
syncDialogPurposeAdvanced syncDialogPurpose = "advanced"
|
||||
syncDialogPurposeRemoteSetup syncDialogPurpose = "remote-setup"
|
||||
syncDialogPurposeAdvanced = syncmodel.DialogPurposeAdvanced
|
||||
syncDialogPurposeRemoteSetup = syncmodel.DialogPurposeRemoteSetup
|
||||
)
|
||||
|
||||
type ui struct {
|
||||
@@ -3106,18 +3095,7 @@ func syncDialogSectionLabel(th *material.Theme, text string) layout.Widget {
|
||||
}
|
||||
|
||||
func syncDialogSummaryText(purpose syncDialogPurpose, source syncSourceMode, direction syncDirection) string {
|
||||
if purpose == syncDialogPurposeRemoteSetup {
|
||||
return "Push this local vault to a WebDAV target and save that target for future sync."
|
||||
}
|
||||
sourceLabel := "another local vault file"
|
||||
if source == syncSourceRemote {
|
||||
sourceLabel = "another WebDAV-backed vault"
|
||||
}
|
||||
action := "Pull changes from"
|
||||
if direction == syncDirectionPush {
|
||||
action = "Push the current vault into"
|
||||
}
|
||||
return action + " " + sourceLabel + "."
|
||||
return syncmodel.SummaryText(purpose, source, direction)
|
||||
}
|
||||
|
||||
func syncDialogSummaryCard(gtx layout.Context, th *material.Theme, purpose syncDialogPurpose, source syncSourceMode, direction syncDirection) layout.Dimensions {
|
||||
|
||||
Reference in New Issue
Block a user