dsh-config-manager 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/adapters/mcp.js +42 -13
- package/lib/adapters/messages.d.ts +1 -0
- package/lib/adapters/messages.js +2 -0
- package/lib/adapters/patch-key-guard.d.ts +23 -0
- package/lib/adapters/patch-key-guard.js +13 -0
- package/lib/adapters/plugin-data.d.ts +19 -5
- package/lib/adapters/plugin-data.js +76 -22
- package/lib/adapters/plugins.d.ts +14 -1
- package/lib/adapters/plugins.js +147 -4
- package/lib/cli/actions.d.ts +7 -105
- package/lib/cli/actions.js +16 -172
- package/lib/cli/control-state.d.ts +54 -0
- package/lib/cli/control-state.js +107 -0
- package/lib/cli/index.js +14 -0
- package/lib/cli/write-gates.d.ts +61 -0
- package/lib/cli/write-gates.js +110 -0
- package/lib/client.d.ts +104 -49
- package/lib/client.js +12536 -12006
- package/lib/core/backup.d.ts +0 -4
- package/lib/core/backup.js +21 -4
- package/lib/core/boot-rescue.d.ts +1 -1
- package/lib/core/boot-rescue.js +12 -1
- package/lib/core/boot-safety.js +37 -2
- package/lib/core/conflict-decisions.js +2 -1
- package/lib/core/exporter.js +22 -1
- package/lib/core/journal.d.ts +54 -4
- package/lib/core/journal.js +158 -35
- package/lib/core/local-plugin-host.d.ts +29 -0
- package/lib/core/local-plugin-host.js +55 -48
- package/lib/core/messages.d.ts +7 -0
- package/lib/core/messages.js +14 -0
- package/lib/core/migration-history.js +16 -9
- package/lib/core/model-tools.d.ts +2 -2
- package/lib/core/model-tools.js +14 -2
- package/lib/core/patch-secret-guard.d.ts +49 -0
- package/lib/core/patch-secret-guard.js +164 -0
- package/lib/core/reconcile.d.ts +8 -0
- package/lib/core/reconcile.js +18 -3
- package/lib/core/reinstall.d.ts +2 -0
- package/lib/core/reinstall.js +6 -2
- package/lib/core/restore.js +31 -6
- package/lib/core/section-sanitize.d.ts +32 -0
- package/lib/core/section-sanitize.js +13 -0
- package/lib/core/snapshot-diff.d.ts +30 -0
- package/lib/core/snapshot-diff.js +56 -20
- package/lib/core/startup-barrier.js +8 -2
- package/lib/core/types.d.ts +22 -0
- package/lib/core/update-check.js +51 -2
- package/lib/foreign/kernel.js +9 -2
- package/lib/foreign/read-claude-plugins.js +29 -11
- package/lib/foreign/read-dsh.js +31 -2
- package/lib/foreign/session-ir.js +50 -9
- package/lib/foreign/session-read.d.ts +8 -0
- package/lib/foreign/session-read.js +26 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/profiles/dsh-profile-io.d.ts +20 -0
- package/lib/profiles/dsh-profile-io.js +27 -0
- package/lib/profiles/dsh-profile-manager.d.ts +27 -0
- package/lib/profiles/dsh-profile-manager.js +45 -4
- package/lib/profiles/dsh-profile-runtime.d.ts +5 -1
- package/lib/profiles/dsh-profile-runtime.js +16 -3
- package/lib/profiles/process-control.d.ts +18 -1
- package/lib/profiles/process-control.js +25 -1
- package/lib/routes/profiles.js +2 -1
- package/lib/routes/sync.js +13 -1
- package/lib/schema/types.d.ts +11 -0
- package/lib/security/redaction.js +22 -6
- package/lib/sync/autosync-repeat.d.ts +27 -0
- package/lib/sync/autosync-repeat.js +23 -0
- package/lib/sync/autosync-scheduler.d.ts +34 -1
- package/lib/sync/autosync-scheduler.js +151 -43
- package/lib/sync/baseline-heal.js +7 -0
- package/lib/sync/baseline-record.d.ts +67 -0
- package/lib/sync/baseline-record.js +74 -0
- package/lib/sync/blob-store.js +13 -0
- package/lib/sync/content-diff.d.ts +39 -0
- package/lib/sync/content-diff.js +46 -0
- package/lib/sync/git/git-transport.d.ts +32 -1
- package/lib/sync/git/git-transport.js +146 -26
- package/lib/sync/github-auth.d.ts +17 -1
- package/lib/sync/github-auth.js +37 -1
- package/lib/sync/merge-apply-plan.d.ts +38 -0
- package/lib/sync/merge-apply-plan.js +76 -0
- package/lib/sync/messages.d.ts +1 -0
- package/lib/sync/messages.js +2 -0
- package/lib/sync/pending-merge.d.ts +34 -0
- package/lib/sync/pending-merge.js +53 -0
- package/lib/sync/s3/s3-transport.d.ts +14 -2
- package/lib/sync/s3/s3-transport.js +72 -48
- package/lib/sync/sync-engine.d.ts +23 -40
- package/lib/sync/sync-engine.js +115 -132
- package/lib/sync/sync-history.d.ts +7 -0
- package/lib/sync/sync-state.d.ts +28 -0
- package/lib/sync/sync-state.js +20 -0
- package/lib/sync/transport.d.ts +12 -3
- package/lib/sync/transport.js +13 -4
- package/lib/sync/webdav/webdav-transport.d.ts +19 -2
- package/lib/sync/webdav/webdav-transport.js +81 -40
- package/lib/ui/commands.js +5 -11
- package/lib/ui/dsh-profiles-view.d.ts +8 -3
- package/lib/ui/dsh-profiles-view.js +9 -5
- package/lib/ui/i18n.d.ts +2 -1
- package/lib/ui/i18n.js +4 -2
- package/lib/ui/menu-placement.js +1 -1
- package/lib/ui/migration-consult-view.d.ts +11 -0
- package/lib/ui/migration-consult-view.js +15 -0
- package/lib/ui/overview-view.d.ts +7 -0
- package/lib/ui/overview-view.js +3 -0
- package/lib/ui/report.d.ts +9 -0
- package/lib/ui/report.js +17 -4
- package/lib/ui/selection-model.d.ts +8 -0
- package/lib/ui/selection-model.js +16 -0
- package/lib/utils/patch-yaml.d.ts +39 -1
- package/lib/utils/patch-yaml.js +82 -2
- package/lib/utils/paths.d.ts +13 -0
- package/lib/utils/paths.js +35 -0
- package/lib/utils/workdir-lock.js +18 -3
- package/package.json +2 -1
- package/src/adapters/mcp.test.ts +29 -0
- package/src/adapters/mcp.ts +43 -12
- package/src/adapters/messages.ts +2 -0
- package/src/adapters/patch-key-guard.ts +29 -0
- package/src/adapters/plugin-data.test.ts +126 -0
- package/src/adapters/plugin-data.ts +97 -26
- package/src/adapters/plugins.test.ts +288 -0
- package/src/adapters/plugins.ts +141 -4
- package/src/cli/actions.test.ts +74 -1
- package/src/cli/actions.ts +27 -246
- package/src/cli/control-state.ts +143 -0
- package/src/cli/index.ts +18 -0
- package/src/cli/web/web.test.ts +27 -0
- package/src/cli/write-gates.ts +149 -0
- package/src/client/about/AboutPanel.tsx +7 -6
- package/src/client/about/release-notes-view.test.ts +17 -0
- package/src/client/about/release-notes-view.ts +49 -24
- package/src/client/chat/ChatEntryView.tsx +2 -2
- package/src/client/chat/rollback-entry-view.ts +6 -1
- package/src/client/common/CommandPalette.tsx +6 -3
- package/src/client/common/ConfirmDialog.tsx +29 -12
- package/src/client/common/ContentPicker.tsx +13 -12
- package/src/client/common/Modal.tsx +12 -5
- package/src/client/common/MoreMenu.tsx +4 -1
- package/src/client/common/RunsCenter.tsx +103 -32
- package/src/client/common/Select.tsx +2 -2
- package/src/client/common/floating-bounds.ts +1 -1
- package/src/client/common/floating-units.test.ts +1 -2
- package/src/client/common/plan-text-redaction.test.ts +188 -3
- package/src/client/common/runs-center-guard.test.ts +60 -0
- package/src/client/common/runs-center-view.test.ts +128 -0
- package/src/client/common/runs-center-view.ts +96 -0
- package/src/client/common/section-title-action.test.ts +66 -0
- package/src/client/common/ui.tsx +93 -30
- package/src/client/config-manager.module.css +1507 -272
- package/src/client/consult/ConsultCard.tsx +7 -6
- package/src/client/environment/EnvironmentPanel.tsx +20 -21
- package/src/client/environment/maintenance/DiskUsageCard.tsx +65 -91
- package/src/client/environment/profiles-incomplete-ui.test.ts +8 -8
- package/src/client/export/ExportView.tsx +7 -16
- package/src/client/history/HistoryPanel.tsx +88 -28
- package/src/client/history/history-locales.ts +3 -3
- package/src/client/home/BackupScheduleCard.tsx +35 -30
- package/src/client/home/HomePanel.tsx +45 -10
- package/src/client/import/ConflictList.tsx +13 -13
- package/src/client/import/ForeignImportView.tsx +7 -6
- package/src/client/import/ImportWizardView.tsx +2 -3
- package/src/client/import/PathMappingForm.tsx +4 -4
- package/src/client/import/PathPickerDialog.tsx +2 -1
- package/src/client/import/import-wizard-steps.tsx +51 -39
- package/src/client/import/use-import-wizard-controller.test.ts +129 -0
- package/src/client/import/use-import-wizard-controller.ts +116 -22
- package/src/client/library/ArtifactRow.tsx +2 -2
- package/src/client/library/BackupInspectView.tsx +19 -15
- package/src/client/library/LibraryActions.tsx +56 -16
- package/src/client/library/LibraryPanel.tsx +7 -7
- package/src/client/library/RestorePlanView.tsx +13 -8
- package/src/client/locales/about.ts +0 -2
- package/src/client/locales/backup.ts +10 -12
- package/src/client/locales/common.ts +2 -0
- package/src/client/locales/export.ts +5 -12
- package/src/client/locales/foreign.ts +2 -2
- package/src/client/locales/import.ts +3 -2
- package/src/client/locales/overview.ts +4 -0
- package/src/client/locales/profiles.ts +32 -4
- package/src/client/locales/restore.ts +0 -2
- package/src/client/locales/sessions.ts +0 -2
- package/src/client/locales/shell.ts +2 -2
- package/src/client/market/MarketPanel.tsx +38 -20
- package/src/client/market/MyConfigsList.tsx +34 -32
- package/src/client/market/MyConfigsLoginCard.tsx +12 -15
- package/src/client/market/MyConfigsView.tsx +5 -5
- package/src/client/market/MyConfigsWizard.tsx +7 -12
- package/src/client/market/market-locales.ts +0 -6
- package/src/client/market/my-configs-split.test.ts +2 -1
- package/src/client/nav-menu-clip-guard.test.ts +52 -0
- package/src/client/recovery/IncompleteCopiesSection.tsx +1 -3
- package/src/client/recovery/RecoveryPanel.tsx +31 -16
- package/src/client/recovery/RollbackCard.tsx +58 -16
- package/src/client/recovery/RollbackFileChanges.tsx +40 -27
- package/src/client/recovery/SessionHealthCard.tsx +2 -2
- package/src/client/recovery/SessionHealthDialog.tsx +5 -7
- package/src/client/recovery/SessionLayoutSection.tsx +3 -5
- package/src/client/recovery/recovery-locales.ts +12 -8
- package/src/client/run-store.test.ts +30 -0
- package/src/client/run-store.ts +21 -1
- package/src/client/sync/AddChannelCard.tsx +65 -0
- package/src/client/sync/AutosyncCard.tsx +182 -108
- package/src/client/sync/ChannelClearConfirmDialog.tsx +5 -1
- package/src/client/sync/ChannelConfigDialog.tsx +27 -48
- package/src/client/sync/MergePreviewView.tsx +3 -5
- package/src/client/sync/PushReportSections.tsx +35 -0
- package/src/client/sync/SyncChannelEntryCard.tsx +33 -24
- package/src/client/sync/SyncConfirmView.tsx +3 -3
- package/src/client/sync/SyncLogList.tsx +16 -5
- package/src/client/sync/SyncPanel.tsx +153 -159
- package/src/client/sync/SyncProbeRow.tsx +5 -7
- package/src/client/sync/SyncRepositoryPicker.tsx +17 -4
- package/src/client/sync/SyncSecuritySection.tsx +157 -0
- package/src/client/sync/SyncSettingsDialog.tsx +304 -0
- package/src/client/sync/SyncSettingsView.test.ts +26 -8
- package/src/client/sync/WorkDirCard.tsx +2 -4
- package/src/client/sync/config-clear-guard.test.ts +94 -0
- package/src/client/sync/config-clear-guard.ts +98 -0
- package/src/client/sync/config-dirty.test.ts +91 -0
- package/src/client/sync/config-dirty.ts +88 -0
- package/src/client/sync/history-model.test.ts +2 -0
- package/src/client/sync/history-model.ts +3 -0
- package/src/client/sync/merge-request.ts +20 -0
- package/src/client/sync/sync-api.ts +12 -0
- package/src/client/sync/sync-locales.ts +87 -47
- package/src/client/sync/sync-panel-clear.test.ts +44 -0
- package/src/client/sync/sync-view.test.ts +20 -0
- package/src/client/sync/sync-view.ts +42 -4
- package/src/core/backup.test.ts +61 -1
- package/src/core/backup.ts +21 -4
- package/src/core/boot-rescue.test.ts +35 -0
- package/src/core/boot-rescue.ts +13 -2
- package/src/core/boot-safety.test.ts +25 -0
- package/src/core/boot-safety.ts +37 -2
- package/src/core/conflict-decisions.ts +2 -1
- package/src/core/exporter.ts +21 -1
- package/src/core/journal.test.ts +183 -0
- package/src/core/journal.ts +163 -25
- package/src/core/local-plugin-host.test.ts +68 -2
- package/src/core/local-plugin-host.ts +31 -4
- package/src/core/messages.ts +14 -0
- package/src/core/migration-history.test.ts +27 -0
- package/src/core/migration-history.ts +12 -4
- package/src/core/model-tools.test.ts +67 -0
- package/src/core/model-tools.ts +16 -4
- package/src/core/patch-secret-guard.test.ts +110 -0
- package/src/core/patch-secret-guard.ts +176 -0
- package/src/core/reconcile.ts +32 -4
- package/src/core/reinstall.ts +8 -2
- package/src/core/restore.ts +32 -7
- package/src/core/section-sanitize.ts +37 -0
- package/src/core/snapshot-diff.test.ts +73 -1
- package/src/core/snapshot-diff.ts +66 -21
- package/src/core/startup-barrier.test.ts +64 -0
- package/src/core/startup-barrier.ts +8 -2
- package/src/core/types.ts +27 -1
- package/src/core/update-check.test.ts +40 -0
- package/src/core/update-check.ts +53 -2
- package/src/foreign/claude-code.test.ts +5 -0
- package/src/foreign/claude-plugins.test.ts +57 -0
- package/src/foreign/claude-sessions-bytes.test.ts +7 -1
- package/src/foreign/dsh.test.ts +23 -0
- package/src/foreign/kernel.ts +9 -2
- package/src/foreign/read-claude-plugins.ts +32 -11
- package/src/foreign/read-dsh.ts +33 -2
- package/src/foreign/session-ir.test.ts +67 -0
- package/src/foreign/session-ir.ts +54 -14
- package/src/foreign/session-read.ts +23 -0
- package/src/index.ts +1 -1
- package/src/profiles/dsh-profile-copy-rollback.test.ts +58 -4
- package/src/profiles/dsh-profile-io.ts +29 -0
- package/src/profiles/dsh-profile-manager.test.ts +30 -0
- package/src/profiles/dsh-profile-manager.ts +53 -5
- package/src/profiles/dsh-profile-runtime.test.ts +29 -7
- package/src/profiles/dsh-profile-runtime.ts +17 -3
- package/src/profiles/process-control.test.ts +97 -0
- package/src/profiles/process-control.ts +28 -1
- package/src/routes/profiles.ts +2 -1
- package/src/routes/sync.ts +13 -1
- package/src/schema/types.ts +16 -1
- package/src/security/redaction.test.ts +31 -0
- package/src/security/redaction.ts +23 -6
- package/src/sync/autosync-repeat.test.ts +58 -0
- package/src/sync/autosync-repeat.ts +55 -0
- package/src/sync/autosync-scheduler.test.ts +417 -0
- package/src/sync/autosync-scheduler.ts +154 -41
- package/src/sync/baseline-heal.ts +6 -0
- package/src/sync/baseline-record.ts +135 -0
- package/src/sync/blob-store.test.ts +16 -0
- package/src/sync/blob-store.ts +13 -0
- package/src/sync/content-diff.test.ts +95 -0
- package/src/sync/content-diff.ts +79 -0
- package/src/sync/git/git-transport.test.ts +151 -4
- package/src/sync/git/git-transport.ts +143 -27
- package/src/sync/github-auth.test.ts +26 -1
- package/src/sync/github-auth.ts +37 -1
- package/src/sync/merge-apply-plan.ts +117 -0
- package/src/sync/messages.ts +2 -0
- package/src/sync/pending-merge.ts +77 -0
- package/src/sync/s3/s3-delete-and-blob-index.test.ts +249 -0
- package/src/sync/s3/s3-transport.ts +76 -42
- package/src/sync/sync-config.test.ts +39 -12
- package/src/sync/sync-device-identity.test.ts +3 -0
- package/src/sync/sync-engine.test.ts +465 -12
- package/src/sync/sync-engine.ts +130 -135
- package/src/sync/sync-history.ts +7 -0
- package/src/sync/sync-state.ts +48 -0
- package/src/sync/transport.test.ts +13 -1
- package/src/sync/transport.ts +12 -4
- package/src/sync/webdav/webdav-delete-and-blob-index.test.ts +249 -0
- package/src/sync/webdav/webdav-transport.ts +86 -34
- package/src/ui/commands.test.ts +11 -0
- package/src/ui/commands.ts +5 -14
- package/src/ui/dsh-profiles-view.test.ts +16 -0
- package/src/ui/dsh-profiles-view.ts +11 -5
- package/src/ui/i18n.ts +4 -2
- package/src/ui/menu-placement.ts +1 -1
- package/src/ui/migration-consult-view.test.ts +20 -1
- package/src/ui/migration-consult-view.ts +17 -0
- package/src/ui/overview-view.ts +10 -0
- package/src/ui/report.test.ts +25 -1
- package/src/ui/report.ts +15 -4
- package/src/ui/selection-model.test.ts +15 -1
- package/src/ui/selection-model.ts +18 -0
- package/src/utils/js-yaml4.d.ts +35 -0
- package/src/utils/patch-yaml.test.ts +207 -1
- package/src/utils/patch-yaml.ts +98 -2
- package/src/utils/paths.test.ts +14 -1
- package/src/utils/paths.ts +35 -0
- package/src/utils/workdir-lock.test.ts +69 -0
- package/src/utils/workdir-lock.ts +17 -3
- package/lib/ui/path-mapping.d.ts +0 -38
- package/lib/ui/path-mapping.js +0 -75
- package/src/client/common/InfoHint.tsx +0 -289
- package/src/client/common/info-hint-guard.test.ts +0 -1119
- package/src/client/sync/DecryptPasswordCard.tsx +0 -48
- package/src/client/sync/SecurityOptionsCard.tsx +0 -97
- package/src/client/sync/SyncSectionPickerDialog.tsx +0 -213
- package/src/ui/path-mapping.test.ts +0 -67
- package/src/ui/path-mapping.ts +0 -103
|
@@ -93,7 +93,6 @@ export const zh = {
|
|
|
93
93
|
'backupFiles.inspectEncrypted': '这是整包加密的备份,无法直接查看内容:请点「导入」——向导会先让你输入备份密码解锁,解锁后即可看到包含的分区与差异。',
|
|
94
94
|
'library.source.all': '全部',
|
|
95
95
|
// 来源档案(originProfile):快照行徽章 + 列表筛选。档案名本身不翻译,只有这三条通用文案需要。
|
|
96
|
-
'library.origin.foreign': '来自他人档案',
|
|
97
96
|
'library.kind.snapshot': '本机快照',
|
|
98
97
|
'library.kind.backupFile': '备份文件',
|
|
99
98
|
'library.kind.remote': '远端快照',
|
|
@@ -220,7 +219,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
220
219
|
'library.moreActions': 'More actions',
|
|
221
220
|
'backupFiles.inspectEncrypted': 'This backup is fully encrypted, so its contents cannot be inspected directly. Use Import — the wizard asks for the backup password, unlocks the archive, and then shows its sections and diff.',
|
|
222
221
|
'library.source.all': 'All',
|
|
223
|
-
'library.origin.foreign': 'From another profile',
|
|
224
222
|
'library.kind.snapshot': 'Local snapshot',
|
|
225
223
|
'library.kind.backupFile': 'Backup file',
|
|
226
224
|
'library.kind.remote': 'Remote snapshot',
|
|
@@ -24,7 +24,7 @@ export const zh = {
|
|
|
24
24
|
'runs.loading': '正在读取任务列表…',
|
|
25
25
|
'runs.loadFailed': '读取任务列表失败:{message}',
|
|
26
26
|
'runs.empty': '近期没有任何任务(运行中的任务会实时出现在这里)',
|
|
27
|
-
'runs.retentionHint': '
|
|
27
|
+
'runs.retentionHint': '刚结束的任务只保留 30 分钟。',
|
|
28
28
|
'runs.runningBadge': '{count} 个进行中',
|
|
29
29
|
'runs.awaitingBadge': '{count} 个等待你选择',
|
|
30
30
|
'runs.awaitingDecision': '等待你选择',
|
|
@@ -95,7 +95,7 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
95
95
|
'runs.loading': 'Loading tasks...',
|
|
96
96
|
'runs.loadFailed': 'Failed to load tasks: {message}',
|
|
97
97
|
'runs.empty': 'No recent tasks (running ones appear here live)',
|
|
98
|
-
'runs.retentionHint': '
|
|
98
|
+
'runs.retentionHint': 'Finished tasks are kept for 30 minutes only.',
|
|
99
99
|
'runs.runningBadge': '{count} running',
|
|
100
100
|
'runs.awaitingBadge': '{count} waiting for you',
|
|
101
101
|
'runs.awaitingDecision': 'Waiting for you',
|
|
@@ -26,7 +26,7 @@ import type { ConfigManagerApi } from '../api.ts'
|
|
|
26
26
|
import type { ImportResult, ItemResolution } from '../../core/types.ts'
|
|
27
27
|
import type { SectionId } from '../../schema/types.ts'
|
|
28
28
|
import { Badge, Banner, Button, Card, Empty, SectionTitle } from '../common/ui.tsx'
|
|
29
|
-
import {
|
|
29
|
+
import { InspectIcon } from '../common/Icon.tsx'
|
|
30
30
|
import { Skeleton, SkeletonList } from '../common/Skeleton.tsx'
|
|
31
31
|
import { Select } from '../common/Select.tsx'
|
|
32
32
|
import { effectiveImportSelection, type Selection } from '../../ui/selection-model.ts'
|
|
@@ -424,7 +424,15 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
return (
|
|
427
|
-
|
|
427
|
+
/* 浏览列表模式整屏定高(.marketFill):筛选卡吃满剩余高度、条目在卡内滚动,
|
|
428
|
+
整页不跟着条目数变长(视觉稿 T-04:筛选卡 flex-1)。详情页不套定高,保持整页滚动。 */
|
|
429
|
+
<div
|
|
430
|
+
className={
|
|
431
|
+
state.subView === 'browse' && !downloadOpen
|
|
432
|
+
? `${css.viewBody} ${css.marketView} ${css.marketFill}`
|
|
433
|
+
: `${css.viewBody} ${css.marketView}`
|
|
434
|
+
}
|
|
435
|
+
>
|
|
428
436
|
{/* 子视图切换(§4.6):浏览市场 / 我的配置(低频面板状态镜像 runStore,切 tab/刷新不丢) */}
|
|
429
437
|
<div className={css.modeTabs} role="tablist">
|
|
430
438
|
<button
|
|
@@ -471,7 +479,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
471
479
|
{/* 列表视图的表头与市场操作卡:进入条目向导页时整块让位(P2 起向导是**页面**,
|
|
472
480
|
不再在列表之上叠弹窗) */}
|
|
473
481
|
{!downloadOpen && (<>
|
|
474
|
-
<SectionTitle title={t('section.label')}
|
|
482
|
+
<SectionTitle title={t('section.label')} tooltip={t('section.description')} />
|
|
475
483
|
|
|
476
484
|
{/* 市场操作行(2026-11-01):原为一张卡,卡里只有标题 + 两个按钮,右侧四百多像素永远空着
|
|
477
485
|
(app-screens §4.2 卡内死空间,白吃约 50px)。改成标题与动作同一行 —— 它本来就是
|
|
@@ -595,9 +603,15 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
595
603
|
</>
|
|
596
604
|
)}
|
|
597
605
|
|
|
598
|
-
{/*
|
|
606
|
+
{/* 条目列表(浏览):整卡吃满剩余高度(.marketListCard),条目在卡内滚动 */}
|
|
599
607
|
{!downloadOpen && (
|
|
600
|
-
<Card
|
|
608
|
+
<Card
|
|
609
|
+
className={
|
|
610
|
+
!state.browsing && state.loadError === null && filtered.length > 0
|
|
611
|
+
? `${css.marketListCard} ${css.marketListCardFill}`
|
|
612
|
+
: css.marketListCard
|
|
613
|
+
}
|
|
614
|
+
>
|
|
601
615
|
{/* 加载失败必须说清原因并可就地重试:此前把 loadError 渲染成中性空态文案
|
|
602
616
|
(「内置市场尚未加载,请先『拉取最新』」),错误原文被整个丢弃 ——
|
|
603
617
|
用户只会反复点刷新,永远不知是宿主没就绪、网络不通还是本地 index 读不出来。 */}
|
|
@@ -615,13 +629,17 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
615
629
|
窄画布(宿主设置弹窗 564px)下 2 列优于 4 列。 */}
|
|
616
630
|
<div className={css.marketFilterGrid}>
|
|
617
631
|
{/* 搜索 + 类别过滤 + 来源筛选 + 排序(2026-08-21 新增;状态镜像 runStore) */}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
632
|
+
{/* 搜索框:12px 放大镜内嵌 + 无描边 input(描边归外壳,聚焦时整框变色) */}
|
|
633
|
+
<div className={`${css.marketSearchBox} ${css.marketFilterSearch}`}>
|
|
634
|
+
<InspectIcon size={12} />
|
|
635
|
+
<input
|
|
636
|
+
type="text"
|
|
637
|
+
className={css.marketSearchInput}
|
|
638
|
+
value={state.search}
|
|
639
|
+
placeholder={t('list.searchPlaceholder')}
|
|
640
|
+
onChange={(e: ChangeEvent<HTMLInputElement>) => { patch({ search: e.target.value }) }}
|
|
641
|
+
/>
|
|
642
|
+
</div>
|
|
625
643
|
<Select
|
|
626
644
|
value={state.category}
|
|
627
645
|
ariaLabel={t('list.categoriesAll')}
|
|
@@ -679,27 +697,27 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
679
697
|
</>)}
|
|
680
698
|
{state.browsing && <SkeletonList label={t('list.loading')} />}
|
|
681
699
|
{!state.browsing && state.loadError === null && state.items.length === 0 && <Empty>{t('list.noItems')}</Empty>}
|
|
682
|
-
{/*
|
|
700
|
+
{/* 条目列表(视觉稿 T-04):分隔线行 + 卡内滚动;名称/版本一行、作者·描述一行、徽章一行 */}
|
|
683
701
|
{!state.browsing && state.loadError === null && filtered.length > 0 && (
|
|
684
|
-
<div className={css.
|
|
702
|
+
<div className={css.marketItemList}>
|
|
685
703
|
{filtered.map((it) => {
|
|
686
704
|
// 来源徽章(阶段 1:条目级来源仓库):官方 ok / 第三方 warn,文案走字典
|
|
687
705
|
const sourceKind = sourceBadgeKind(it, marketUrl)
|
|
688
706
|
return (
|
|
689
|
-
<div key={it.id} className={css.
|
|
690
|
-
<div
|
|
691
|
-
<div className={css.conflictHead}>
|
|
707
|
+
<div key={it.id} className={css.marketItem}>
|
|
708
|
+
<div className={css.marketItemMain}>
|
|
709
|
+
<div className={`${css.conflictHead} ${css.marketItemHead}`}>
|
|
692
710
|
<span className={css.conflictId}>{it.name}</span>
|
|
693
711
|
{it.version !== undefined && <Badge kind="info">{it.version}</Badge>}
|
|
694
712
|
</div>
|
|
695
713
|
{(it.author !== undefined || it.description !== undefined) && (
|
|
696
|
-
<span className={css.
|
|
714
|
+
<span className={css.marketItemDesc}>
|
|
697
715
|
{it.author !== undefined ? `${it.author}` : ''}
|
|
698
716
|
{it.author !== undefined && it.description !== undefined ? ' · ' : ''}
|
|
699
717
|
{it.description ?? ''}
|
|
700
718
|
</span>
|
|
701
719
|
)}
|
|
702
|
-
<div className={css.
|
|
720
|
+
<div className={css.marketItemMeta}>
|
|
703
721
|
<Badge kind={sourceKind}>
|
|
704
722
|
{sourceKind === 'ok' ? t('list.sourceOfficial') : t('list.sourcePersonal')}
|
|
705
723
|
</Badge>
|
|
@@ -708,7 +726,7 @@ export function MarketPanel({ api, myConfigsApi, importApi, syncApi, t, cmT, ope
|
|
|
708
726
|
{cacheLabel(it.cacheState)}
|
|
709
727
|
</Badge>
|
|
710
728
|
{it.stars !== undefined && (
|
|
711
|
-
<Badge kind="info"
|
|
729
|
+
<Badge kind="info">{t('list.stars', { count: String(it.stars) })}</Badge>
|
|
712
730
|
)}
|
|
713
731
|
</div>
|
|
714
732
|
</div>
|
|
@@ -50,8 +50,9 @@ export function MyConfigsList({
|
|
|
50
50
|
onRefresh, onChangeDeleteConfirm, onOpenUpdate, onOpenInstall,
|
|
51
51
|
}: MyConfigsListProps) {
|
|
52
52
|
return (
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/* 视觉稿 T-05:卡片自带一条列表头(h34、下边框),行贴在卡内(p0 0 12),不再用 Card 的 12px 内边距 */
|
|
54
|
+
<Card className={css.marketMyListCard}>
|
|
55
|
+
<div className={css.marketMyListHead}>
|
|
55
56
|
<span className={css.groupLabel}>{t('myconfigs.list.title')}</span>
|
|
56
57
|
{/* 撑开剩余空间:Badge 与刷新按钮成组贴右,刷新按钮为该行最右元素 */}
|
|
57
58
|
<span className={css.statusSpacer} />
|
|
@@ -72,45 +73,46 @@ export function MyConfigsList({
|
|
|
72
73
|
{myItemsError !== null && <Banner kind="error">{redact(myItemsError)}</Banner>}
|
|
73
74
|
{listLoading && myItems === null && <SkeletonList label={t('myconfigs.list.loading')} />}
|
|
74
75
|
{!listLoading && myItems !== null && myItems.length === 0 && <Empty>{t('myconfigs.list.empty')}</Empty>}
|
|
76
|
+
{/* 视觉稿 T-05:每行「名称+版本 / 动作」一行,徽章行在下方;行间 1px 分隔,列表限高内滚 */}
|
|
75
77
|
{!listLoading && itemViews.length > 0 && (
|
|
76
|
-
<div className={css.
|
|
78
|
+
<div className={css.marketMyItemList}>
|
|
77
79
|
{itemViews.map(({ entry, view, badge }) => (
|
|
78
|
-
<div key={view.id} className={css.
|
|
79
|
-
<div
|
|
80
|
-
<div className={css.
|
|
80
|
+
<div key={view.id} className={css.marketMyItem}>
|
|
81
|
+
<div className={css.marketMyItemTop}>
|
|
82
|
+
<div className={css.marketMyItemTitle}>
|
|
81
83
|
<span className={css.conflictId}>{view.name}</span>
|
|
82
84
|
{view.version !== '' && <Badge kind="info">{view.version}</Badge>}
|
|
83
85
|
</div>
|
|
84
|
-
<div className={css.
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
<div className={css.marketMyItemActions}>
|
|
87
|
+
<Button onClick={() => { onOpenUpdate(entry) }}>{t('myconfigs.item.update')}</Button>
|
|
88
|
+
<Button
|
|
89
|
+
disabled={install !== null && install.detail === null}
|
|
90
|
+
onClick={() => { onOpenInstall(entry) }}
|
|
91
|
+
>
|
|
92
|
+
{t('myconfigs.item.install')}
|
|
93
|
+
</Button>
|
|
94
|
+
{entry.repoUrl !== '' && <Button href={entry.repoUrl}>{t('myconfigs.list.openRepo')}</Button>}
|
|
95
|
+
{badge.kind === 'warn' && badge.prUrl !== undefined && badge.prUrl !== '' && (
|
|
96
|
+
<Button href={badge.prUrl}>{t('myconfigs.item.openPr')}</Button>
|
|
88
97
|
)}
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
{/* 删除:danger 按钮 → 弹窗二次确认(ConfirmDialog;不可恢复,已收录自动提交下架 PR) */}
|
|
99
|
+
<Button
|
|
100
|
+
variant="danger"
|
|
101
|
+
disabled={deletingId !== null}
|
|
102
|
+
onClick={() => { onChangeDeleteConfirm(view.id) }}
|
|
103
|
+
>
|
|
104
|
+
{t('myconfigs.delete.run')}
|
|
105
|
+
</Button>
|
|
92
106
|
</div>
|
|
93
107
|
</div>
|
|
94
|
-
<div className={css.
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
onClick={() => { onOpenInstall(entry) }}
|
|
99
|
-
>
|
|
100
|
-
{t('myconfigs.item.install')}
|
|
101
|
-
</Button>
|
|
102
|
-
{entry.repoUrl !== '' && <Button href={entry.repoUrl}>{t('myconfigs.list.openRepo')}</Button>}
|
|
103
|
-
{badge.kind === 'warn' && badge.prUrl !== undefined && badge.prUrl !== '' && (
|
|
104
|
-
<Button href={badge.prUrl}>{t('myconfigs.item.openPr')}</Button>
|
|
108
|
+
<div className={css.marketMyItemMeta}>
|
|
109
|
+
<Badge kind={badge.kind}>{badge.text}</Badge>
|
|
110
|
+
{view.stars !== undefined && (
|
|
111
|
+
<Badge kind="info">{t('list.stars', { count: String(view.stars) })}</Badge>
|
|
105
112
|
)}
|
|
106
|
-
{
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
disabled={deletingId !== null}
|
|
110
|
-
onClick={() => { onChangeDeleteConfirm(view.id) }}
|
|
111
|
-
>
|
|
112
|
-
{t('myconfigs.delete.run')}
|
|
113
|
-
</Button>
|
|
113
|
+
{view.author !== '' && <Badge kind="info">{view.author}</Badge>}
|
|
114
|
+
{view.updatedAt !== '' && <Badge kind="info">{view.updatedAt}</Badge>}
|
|
115
|
+
{view.categories.map((c) => <Badge key={c} kind="info">{c}</Badge>)}
|
|
114
116
|
</div>
|
|
115
117
|
</div>
|
|
116
118
|
))}
|
|
@@ -11,7 +11,6 @@ import { computeGithubLoginView } from '../sync/sync-view.ts'
|
|
|
11
11
|
import type { UiT } from '../../ui/i18n.ts'
|
|
12
12
|
import type { MyGithubFlowState } from '../../ui/my-configs-view.ts'
|
|
13
13
|
import { Badge, Banner, Button, Card } from '../common/ui.tsx'
|
|
14
|
-
import { InfoHint } from '../common/InfoHint.tsx'
|
|
15
14
|
import { Skeleton } from '../common/Skeleton.tsx'
|
|
16
15
|
import type { LoginView } from './my-configs-view.ts'
|
|
17
16
|
import css from '../config-manager.module.css'
|
|
@@ -39,7 +38,7 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
|
|
|
39
38
|
|
|
40
39
|
/** 设备码 + 授权页链接展示(waiting/polling 时) */
|
|
41
40
|
const renderDeviceCode = (): ReactNode => (
|
|
42
|
-
<div className={css.
|
|
41
|
+
<div className={css.marketLoginRow}>
|
|
43
42
|
<Badge kind="info">{t('myconfigs.login.userCode', { code: githubView.userCode })}</Badge>
|
|
44
43
|
<a className={css.ghostButton} href={githubView.verificationUri} target="_blank" rel="noreferrer" style={{ textDecoration: 'none' }}>
|
|
45
44
|
{t('myconfigs.login.openAuth')}
|
|
@@ -49,18 +48,16 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
|
|
|
49
48
|
|
|
50
49
|
if (loginView.kind === 'loading') {
|
|
51
50
|
return (
|
|
52
|
-
<Card>
|
|
53
|
-
<
|
|
54
|
-
<Skeleton count={2} label={t('myconfigs.login.checking')} />
|
|
55
|
-
</div>
|
|
51
|
+
<Card className={css.marketLoginCard}>
|
|
52
|
+
<Skeleton count={2} label={t('myconfigs.login.checking')} />
|
|
56
53
|
</Card>
|
|
57
54
|
)
|
|
58
55
|
}
|
|
59
56
|
if (loginView.kind === 'logged-out' || loginView.kind === 'token-invalid') {
|
|
60
57
|
return (
|
|
61
|
-
<Card>
|
|
62
|
-
<div className={css.
|
|
63
|
-
<Button variant="primary" disabled={!githubView.canStart} onClick={() => { onStart() }}>
|
|
58
|
+
<Card className={css.marketLoginCard}>
|
|
59
|
+
<div className={css.marketLoginRow}>
|
|
60
|
+
<Button variant="primary" disabled={!githubView.canStart} onClick={() => { onStart() }} title={t('myconfigs.login.hint')}>
|
|
64
61
|
{githubView.startLabel}
|
|
65
62
|
</Button>
|
|
66
63
|
{githubView.canCancel && (
|
|
@@ -69,10 +66,9 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
|
|
|
69
66
|
</Button>
|
|
70
67
|
)}
|
|
71
68
|
</div>
|
|
72
|
-
<InfoHint text={t('myconfigs.login.hint')} label={t('common.infoHint')} />
|
|
73
69
|
{loginView.kind === 'token-invalid' && <Banner kind="warn">{t('myconfigs.error.loadStatus')}</Banner>}
|
|
74
70
|
{githubView.showCode && renderDeviceCode()}
|
|
75
|
-
<div className={css.
|
|
71
|
+
<div className={css.marketLoginRow}>
|
|
76
72
|
<Badge kind={githubView.phase === 'error' ? 'error' : 'warn'}>{githubView.statusText}</Badge>
|
|
77
73
|
</div>
|
|
78
74
|
{/* R-18:失败详情已由 failGithub() 走全局 Toast;此处保留状态行 Badge(持续状态展示,非回执) */}
|
|
@@ -81,14 +77,15 @@ export function MyConfigsLoginCard({ loginView, github, t, uiT, onStart, onCance
|
|
|
81
77
|
}
|
|
82
78
|
// logged-in:@login + 固定目标仓库(只读)+ 配置仓库状态
|
|
83
79
|
return (
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
/* 视觉稿 T-05:三行徽章等距(gap 6、px16 py12),不再借用 actionRow/statRow 的行距 */
|
|
81
|
+
<Card className={css.marketLoginCard}>
|
|
82
|
+
<div className={css.marketLoginRow}>
|
|
86
83
|
<Badge kind="ok">{t('myconfigs.login.loggedInAs', { login: loginView.login })}</Badge>
|
|
87
84
|
</div>
|
|
88
|
-
<div className={css.
|
|
85
|
+
<div className={css.marketLoginRow}>
|
|
89
86
|
<Badge kind="info">{t('myconfigs.login.targetRepo', { repo: targetRepo })}</Badge>
|
|
90
87
|
</div>
|
|
91
|
-
<div className={css.
|
|
88
|
+
<div className={css.marketLoginRow}>
|
|
92
89
|
{loginView.repoExists
|
|
93
90
|
? <Badge kind="ok">{t('myconfigs.login.repoReady', { repo: loginView.repoUrl })}</Badge>
|
|
94
91
|
: <Badge kind="warn">{t('myconfigs.login.repoMissing')}</Badge>}
|
|
@@ -763,7 +763,8 @@ export function MyConfigsView({
|
|
|
763
763
|
}
|
|
764
764
|
|
|
765
765
|
return (
|
|
766
|
-
|
|
766
|
+
/* .myconfigsView:与页签之间 10px(视觉稿 T-05 的 space-y-10;外层 .marketView 是 8px) */
|
|
767
|
+
<div className={`${css.viewBody} ${css.myconfigsView}`}>
|
|
767
768
|
{/* 标题只留标题:登录说明紧挨着就在下面的登录卡标题 ⓘ 上,同一屏不再出现两遍 */}
|
|
768
769
|
<SectionTitle title={t('myconfigs.tab.myconfigs')} />
|
|
769
770
|
{renderLoginCard()}
|
|
@@ -771,13 +772,12 @@ export function MyConfigsView({
|
|
|
771
772
|
{loginView.kind === 'logged-in' && (
|
|
772
773
|
<>
|
|
773
774
|
{/* 一键上传入口:点按钮 → 免责(首次)→ 弹窗向导 */}
|
|
774
|
-
|
|
775
|
+
{/* 视觉稿 T-05:单动作卡 —— 卡内只有这枚主按钮(h50、px16 py10,按钮垂直居中) */}
|
|
776
|
+
<Card className={css.marketUploadCard}>
|
|
775
777
|
{/* 卡片里只有一个动作:按钮本身已写明作用对象(上传配置包),不再重复标题。
|
|
776
778
|
此处不再放 ⓘ:它的「先在导出页生成 zip / 含密钥的备份会被拒绝」已在点开后的
|
|
777
779
|
向导头(MyConfigsWizard 的 Modal.Header trailing)逐字出现,入口再放一遍是同一条信息两次。 */}
|
|
778
|
-
<
|
|
779
|
-
<Button variant="primary" onClick={openUpload}>{t('myconfigs.upload.run')}</Button>
|
|
780
|
-
</div>
|
|
780
|
+
<Button variant="primary" onClick={openUpload}>{t('myconfigs.upload.run')}</Button>
|
|
781
781
|
</Card>
|
|
782
782
|
{renderList()}
|
|
783
783
|
{/* 弹窗:上传/更新向导(uploadOpen)—— 装回本地已改为页面级向导(见上方提前 return) */}
|
|
@@ -12,7 +12,6 @@ import { redact } from '../../security/redaction.ts'
|
|
|
12
12
|
import { myPrLinkSource } from '../../ui/my-configs-view.ts'
|
|
13
13
|
import { Badge, Banner, Button, Field } from '../common/ui.tsx'
|
|
14
14
|
import { Modal } from '../common/Modal.tsx'
|
|
15
|
-
import { InfoHint } from '../common/InfoHint.tsx'
|
|
16
15
|
import { myConfigFormValid } from './my-configs-view.ts'
|
|
17
16
|
import type { AutoFieldBadge, MyConfigForm, MyWizardState } from './my-configs-view.ts'
|
|
18
17
|
import css from '../config-manager.module.css'
|
|
@@ -91,7 +90,7 @@ export function MyConfigsWizard({
|
|
|
91
90
|
closeDisabled={wizard.running || wizard.validating}
|
|
92
91
|
trailing={wizard.mode === 'update'
|
|
93
92
|
? <Badge kind="info">{t('myconfigs.update.hint')}</Badge>
|
|
94
|
-
:
|
|
93
|
+
: undefined}
|
|
95
94
|
/>
|
|
96
95
|
<Modal.Body scroll>
|
|
97
96
|
|
|
@@ -109,7 +108,7 @@ export function MyConfigsWizard({
|
|
|
109
108
|
}}
|
|
110
109
|
/>
|
|
111
110
|
<div className={css.actionRow}>
|
|
112
|
-
<Button variant="primary" disabled={wizard.running} onClick={() => { fileInput.current?.click() }}>
|
|
111
|
+
<Button variant="primary" disabled={wizard.running} onClick={() => { fileInput.current?.click() }} title={t('myconfigs.upload.selectHint')}>
|
|
113
112
|
{t('myconfigs.upload.select')}
|
|
114
113
|
</Button>
|
|
115
114
|
</div>
|
|
@@ -139,7 +138,6 @@ export function MyConfigsWizard({
|
|
|
139
138
|
{wizard.step === 'form' && (<>
|
|
140
139
|
{/* update 模式:表单页内嵌「选择新 ZIP」入口(选中自动校验,通过后才可一键更新) */}
|
|
141
140
|
{wizard.mode === 'update' && (<>
|
|
142
|
-
<InfoHint text={t('myconfigs.update.zipHint')} label={t('common.infoHint')} />
|
|
143
141
|
<input
|
|
144
142
|
ref={fileInput}
|
|
145
143
|
type="file"
|
|
@@ -172,12 +170,9 @@ export function MyConfigsWizard({
|
|
|
172
170
|
<Badge kind="ok">{t('myconfigs.upload.validateOk')}</Badge>
|
|
173
171
|
</div>
|
|
174
172
|
)}
|
|
175
|
-
{/*
|
|
176
|
-
|
|
177
|
-
<Field
|
|
178
|
-
label={t('myconfigs.upload.form.name')}
|
|
179
|
-
info={<InfoHint text={t('myconfigs.upload.form.nameHint')} label={t('common.infoHint')} />}
|
|
180
|
-
>
|
|
173
|
+
{/* 说明文案走 Field 的 tooltip(挂在标签上),不塞进字段体内:塞进去等于放进 <label>,
|
|
174
|
+
悬停/点击标签会连带作用到说明上。 */}
|
|
175
|
+
<Field label={t('myconfigs.upload.form.name')}>
|
|
181
176
|
<input
|
|
182
177
|
className={css.input}
|
|
183
178
|
aria-label={t('myconfigs.upload.form.name')}
|
|
@@ -195,8 +190,8 @@ export function MyConfigsWizard({
|
|
|
195
190
|
{/* F6 发布模式:迁移(全带)/ 分享(自动排除敏感分区 + 强制隐私拦截)—— 复用既有 conflictOptions/radioLabel 单选样式 */}
|
|
196
191
|
<Field
|
|
197
192
|
label={t('myconfigs.upload.mode.title')}
|
|
198
|
-
|
|
199
|
-
?
|
|
193
|
+
tooltip={wizard.form.publishMode === 'share'
|
|
194
|
+
? t('myconfigs.upload.mode.shareHint')
|
|
200
195
|
: undefined}
|
|
201
196
|
>
|
|
202
197
|
<div className={css.conflictOptions}>
|
|
@@ -38,7 +38,6 @@ export const zh = {
|
|
|
38
38
|
'list.sortStars': '⭐ 最多',
|
|
39
39
|
'list.sortName': '名称 A–Z',
|
|
40
40
|
'list.stars': '⭐ {count}',
|
|
41
|
-
'list.starsHint': '来源仓库 star 数(仓库级,非本条目)',
|
|
42
41
|
'list.count': '共 {count} 个条目',
|
|
43
42
|
'list.filtered': '(筛选后 {count} 个)',
|
|
44
43
|
'list.cacheCached': '已缓存',
|
|
@@ -136,7 +135,6 @@ export const zh = {
|
|
|
136
135
|
'myconfigs.upload.validateSecrets': '包含密钥:市场通道永不携带秘密,拒绝上传',
|
|
137
136
|
'myconfigs.upload.validateInvalid': '内容校验未通过,无法上传',
|
|
138
137
|
'myconfigs.upload.form.name': '名称',
|
|
139
|
-
'myconfigs.upload.form.nameHint': '预填 zip 文件名,可修改',
|
|
140
138
|
'myconfigs.upload.form.description': '描述(可选)',
|
|
141
139
|
'myconfigs.upload.form.categories': '类别(可选,逗号分隔)',
|
|
142
140
|
'myconfigs.upload.form.autoTitle': '自动生成',
|
|
@@ -149,7 +147,6 @@ export const zh = {
|
|
|
149
147
|
'myconfigs.update.title': '更新配置',
|
|
150
148
|
'myconfigs.update.hint': '版本自动 +1',
|
|
151
149
|
'myconfigs.update.run': '一键更新',
|
|
152
|
-
'myconfigs.update.zipHint': '选择新 zip 后自动校验,通过才能更新。',
|
|
153
150
|
'myconfigs.update.selectZip': '选择新 ZIP…',
|
|
154
151
|
// 上传/更新结果卡
|
|
155
152
|
'myconfigs.result.title': '上传/更新完成',
|
|
@@ -225,7 +222,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
225
222
|
'list.sortStars': 'Most starred',
|
|
226
223
|
'list.sortName': 'Name A–Z',
|
|
227
224
|
'list.stars': '⭐ {count}',
|
|
228
|
-
'list.starsHint': 'Stars of the source repo (repo-level, not per item)',
|
|
229
225
|
'list.count': '{count} {count, plural, item|items}',
|
|
230
226
|
'list.filtered': '({count} after filter)',
|
|
231
227
|
'list.cacheCached': 'cached',
|
|
@@ -316,7 +312,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
316
312
|
'myconfigs.upload.validateSecrets': 'Contains secrets: the market channel never carries secrets — upload rejected',
|
|
317
313
|
'myconfigs.upload.validateInvalid': 'Content validation failed — cannot upload',
|
|
318
314
|
'myconfigs.upload.form.name': 'Name',
|
|
319
|
-
'myconfigs.upload.form.nameHint': 'Prefilled from the zip file name; editable',
|
|
320
315
|
'myconfigs.upload.form.description': 'Description (optional)',
|
|
321
316
|
'myconfigs.upload.form.categories': 'Categories (optional, comma-separated)',
|
|
322
317
|
'myconfigs.upload.form.autoTitle': 'Generated',
|
|
@@ -328,7 +323,6 @@ export const en: Record<keyof typeof zh, string> = {
|
|
|
328
323
|
'myconfigs.update.title': 'Update config',
|
|
329
324
|
'myconfigs.update.hint': 'version +1 automatically',
|
|
330
325
|
'myconfigs.update.run': 'Update',
|
|
331
|
-
'myconfigs.update.zipHint': 'Pick a new zip and it will be validated automatically; only a passing zip can be installed.',
|
|
332
326
|
'myconfigs.update.selectZip': 'Choose new ZIP…',
|
|
333
327
|
'myconfigs.result.title': 'Upload/update complete',
|
|
334
328
|
'myconfigs.result.version': 'version {version}',
|
|
@@ -22,7 +22,8 @@ const MAIN = 'MyConfigsView.tsx';
|
|
|
22
22
|
const PARTS: readonly { file: string; component: string; markers: readonly string[] }[] = [
|
|
23
23
|
{ file: 'MyConfigsLoginCard.tsx', component: 'MyConfigsLoginCard', markers: ['renderDeviceCode', 'myconfigs.login.userCode'] },
|
|
24
24
|
{ file: 'MyConfigsWizard.tsx', component: 'MyConfigsWizard', markers: ['css.hiddenFile', 'css.radioLabel', 'Modal.Body'] },
|
|
25
|
-
|
|
25
|
+
// T-05 按设计稿重排行结构后,列表段特征类名从 statRow/snapshotList/rowActions 换成自有类(2026-11-13)
|
|
26
|
+
{ file: 'MyConfigsList.tsx', component: 'MyConfigsList', markers: ['css.marketMyItemList', 'css.marketMyItemActions'] },
|
|
26
27
|
{ file: 'MyConfigsInstall.tsx', component: 'MyConfigsInstall', markers: ['marketDetailView(', 'detailView.canImport'] },
|
|
27
28
|
];
|
|
28
29
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* nav-menu-clip-guard — 导航条「更多 ▾」的弹层不得被祖先裁剪(2026-11-14 真机 bug)。
|
|
3
|
+
*
|
|
4
|
+
* 为什么需要它:MoreMenu 的弹层是**留在原地的 absolute**(契约见 common/MoreMenu.tsx ①,
|
|
5
|
+
* 不 portal),祖先链 `.navStrip → .shellNav → .section` 任何一级写 `overflow`(或 `contain: paint`、
|
|
6
|
+
* `clip-path`)都会把它切掉。真机表现:小视口下页签挤进「更多 ▾」,点开**什么都不显示** ——
|
|
7
|
+
* 菜单只剩分隔条下沿那一条,正是 `.navStrip` 早先那条「防极端情况」的 `overflow: hidden` 干的。
|
|
8
|
+
*
|
|
9
|
+
* 这条不变量没法被 typecheck / build 发现,所以按源码级断言钉住(与 css-scale-guard 同一套做法):
|
|
10
|
+
* - `.navStrip` / `.shellNav` 不得出现任何裁剪声明;
|
|
11
|
+
* - 兜底必须存在:`.section` 仍是 `overflow: hidden`(画布边界兜住宿主布局,
|
|
12
|
+
* 量测失败时的横向溢出也由它裁在插件画布内)。
|
|
13
|
+
* 去注释后再断言:注释里会写「不写 overflow: hidden」,不能把它当成违规。
|
|
14
|
+
*/
|
|
15
|
+
import test from 'node:test'
|
|
16
|
+
import assert from 'node:assert/strict'
|
|
17
|
+
import fs from 'node:fs'
|
|
18
|
+
import path from 'node:path'
|
|
19
|
+
|
|
20
|
+
const ROOT = path.resolve(import.meta.dirname, '../..')
|
|
21
|
+
const CSS = fs.readFileSync(path.join(ROOT, 'src/client/config-manager.module.css'), 'utf8')
|
|
22
|
+
.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '))
|
|
23
|
+
|
|
24
|
+
/** 取某个**单选择器**规则体(`.x {` 开头,到第一个 `}` 行结束)。 */
|
|
25
|
+
function ruleBody(selector: string): string {
|
|
26
|
+
const head = '\n' + selector + ' {'
|
|
27
|
+
const at = CSS.indexOf(head)
|
|
28
|
+
assert.ok(at >= 0, `CSS 里找不到 ${selector} 的规则块`)
|
|
29
|
+
const end = CSS.indexOf('\n}', at)
|
|
30
|
+
assert.ok(end > at, `${selector} 的规则块没有闭合`)
|
|
31
|
+
return CSS.slice(at, end)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 会裁剪后代的声明:overflow 家族 + 两种等价手段。 */
|
|
35
|
+
const CLIPPING = /^\s*(overflow(-[xy])?|contain|clip-path)\s*:/m
|
|
36
|
+
|
|
37
|
+
for (const selector of ['.navStrip', '.shellNav']) {
|
|
38
|
+
test(`${selector}: 不得裁剪「更多 ▾」弹层`, () => {
|
|
39
|
+
assert.doesNotMatch(
|
|
40
|
+
ruleBody(selector), CLIPPING,
|
|
41
|
+
`${selector} 一旦裁剪,「更多 ▾」的 absolute 弹层会被切成一条(见本文件头)。` +
|
|
42
|
+
'需要兜住溢出时改由 .section 承担。',
|
|
43
|
+
)
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
test('.section: 仍是唯一的溢出兜底', () => {
|
|
48
|
+
assert.match(
|
|
49
|
+
ruleBody('.section'), /^\s*overflow\s*:\s*hidden\s*;/m,
|
|
50
|
+
'.section 的 overflow: hidden 是「量测失败时横向溢出不外泄」的唯一兜底,别删。',
|
|
51
|
+
)
|
|
52
|
+
})
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
import { useState } from 'react'
|
|
14
14
|
|
|
15
15
|
import { Badge, Banner, Button, Card } from '../common/ui.tsx'
|
|
16
|
-
import { InfoHint } from '../common/InfoHint.tsx'
|
|
17
16
|
import { redact } from '../../security/redaction.ts'
|
|
18
17
|
import css from '../config-manager.module.css'
|
|
19
18
|
import type { TranslateNS } from '../client-types.ts'
|
|
@@ -75,8 +74,7 @@ export function IncompleteCopiesSection(props: IncompleteCopiesSectionProps) {
|
|
|
75
74
|
return (
|
|
76
75
|
<Card>
|
|
77
76
|
<div className={css.statRow}>
|
|
78
|
-
<strong>{t('recovery.incomplete.title')}</strong>
|
|
79
|
-
<InfoHint text={t('recovery.incomplete.hint')} label={t('common.infoHint')} />
|
|
77
|
+
<strong title={t('recovery.incomplete.hint')}>{t('recovery.incomplete.title')}</strong>
|
|
80
78
|
<Badge kind="warn">{String(rows.length)}</Badge>
|
|
81
79
|
</div>
|
|
82
80
|
<div className={css.snapshotList}>
|