Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

> **Menu-bar panels:** Dashboard cards and their nested controls use shared semantic surfaces and text levels in Light, Dark, and Increased Contrast appearances, without decorative borders or shadows. The surrounding popover and its attachment arrow use one opaque semantic background so wallpaper colors do not reduce contrast. Settings includes independent Light and Dark themes, ten built-in palettes, System Default, live previews, and imports from `.itermcolors` (including `.txt`) or Base16/Base24 YAML/JSON files; themes preserve layout, typography, calendar event colors, and brand colors.

> **Preferences backup:** MacTools automatically keeps a local, deduplicated history of portable settings, with a 60-second debounce, a pre-import safety snapshot, human-readable local date-time filenames, and bounded hourly/daily/weekly retention. Each importable backup is limited to 16 MiB, while automatic history is capped at 100 snapshots and 128 MiB. Only successful saved portable-setting changes start or restart the timer; runtime history and cache writes are ignored. Automatic backup is enabled by default and can be disabled, run immediately, or opened in Finder from General settings, which also shows relative backup freshness, the exact timestamp, snapshot count, history size, and whether a manual backup found no changes. Export and import both let you select app preferences, plugin layout, shortcuts, automation, saved Run Links, and each plugin’s portable settings independently, with dependency notes beside every category. Workflow IDs and direct workflow Run Links are preserved; importing an individual workflow preserves its ID on a new Mac and creates a new ID only when that ID already exists. Automation rules bound to a display identifier from the current Mac are omitted with an export warning. Saved Scripts source is excluded unless each script explicitly opts in, and working directories are never included. Apple Shortcuts backup includes only per-shortcut safety policies; the destination Mac discovers its own current Shortcuts library. Permissions, caches, credentials, and other non-portable data are excluded. Missing plugins are never installed automatically: the preview lets you explicitly select catalog-verified plugins to install, while unavailable or unselected plugins and their settings are skipped.
> **Preferences backup:** MacTools automatically keeps a local, deduplicated history of portable settings, with a 60-second debounce, a pre-import safety snapshot, human-readable local date-time filenames, and bounded hourly/daily/weekly retention. Each importable backup is limited to 16 MiB, while automatic history is capped at 100 snapshots and 128 MiB. Only successful saved portable-setting changes start or restart the timer; runtime history and cache writes are ignored. Automatic backup is enabled by default and can be disabled, run immediately, or opened in Finder from General settings, which also shows relative backup freshness, the exact timestamp, snapshot count, history size, and whether a manual backup found no changes. Export and import both let you select app preferences, plugin layout, shortcuts, automation, saved Run Links, and each plugin’s portable settings independently, with dependency notes beside every category. Workflow IDs and direct workflow Run Links are preserved; importing an individual workflow preserves its ID on a new Mac and creates a new ID only when that ID already exists. Automation rules bound to a display identifier from the current Mac are omitted with an export warning. Saved Scripts source is excluded unless each script explicitly opts in, and working directories are never included. Apple Shortcuts backup includes only per-shortcut safety policies; the destination Mac discovers its own current Shortcuts library. Permissions, caches, credentials, and other non-portable data are excluded. Missing plugins are never installed automatically: the scrollable preview lets you explicitly select catalog-verified plugins to install, while unavailable or unselected plugins and their settings are skipped.

> **Right-click action:** You can use Option + left-click on the MacTools icon to trigger the right-click action.

Expand Down
57 changes: 35 additions & 22 deletions Sources/App/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,40 @@ private struct PreferencesImportPreviewSheet: View {
}

var body: some View {
VStack(spacing: 0) {
ScrollView {
previewContent
.padding(24)
}

Divider()

HStack(spacing: 12) {
if isImporting {
ProgressView()
.controlSize(.small)
}

Spacer()
Button(AppL10n.settings("common.cancel", defaultValue: "取消"), action: onCancel)
.buttonStyle(.bordered)
.disabled(isImporting)
Button(confirmTitle) {
onImport(selectedInstallablePluginIDs, selection)
}
.buttonStyle(.borderedProminent)
.disabled(isImporting || selection.isEmpty || previewErrorMessage != nil)
}
.padding(.horizontal, 24)
.padding(.vertical, 16)
}
.frame(width: 500, height: 640)
.onChange(of: selection) { _, selection in
refreshPreview(for: selection)
}
}

private var previewContent: some View {
VStack(alignment: .leading, spacing: 18) {
Text(AppL10n.preferencesBackup("preferencesBackup.preview.title", defaultValue: "导入偏好设置"))
.font(PluginSettingsTheme.Typography.pageTitle)
Expand Down Expand Up @@ -1549,29 +1583,8 @@ private struct PreferencesImportPreviewSheet: View {
.font(PluginSettingsTheme.Typography.rowDescription)
.foregroundStyle(.secondary)
}

HStack {
Spacer()
Button(AppL10n.settings("common.cancel", defaultValue: "取消"), action: onCancel)
.buttonStyle(.bordered)
.disabled(isImporting)
Button(confirmTitle) {
onImport(selectedInstallablePluginIDs, selection)
}
.buttonStyle(.borderedProminent)
.disabled(isImporting || selection.isEmpty || previewErrorMessage != nil)
}

if isImporting {
ProgressView()
.controlSize(.small)
}
}
.padding(24)
.frame(width: 500)
.onChange(of: selection) { _, selection in
refreshPreview(for: selection)
}
.frame(maxWidth: .infinity, alignment: .leading)
}

private var confirmTitle: String {
Expand Down
7 changes: 7 additions & 0 deletions changes/unreleased/preferences-import-preview-scrolling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
release: app
type: fixed
area: Preferences Backup
---

Preference imports with many missing plugins now keep the preview controls reachable in a scrollable sheet.
Loading