feat(sidecars): restyle migration result as a summary modal

Follow the app's existing operation-summary convention (Metadata Fetch
Summary / Batch Download Summary): a self-managed modal appended to
document.body with a 3-state summary header, stat cards (moved /
models / skipped / conflicts / errors), and a failure table listing
per-model errors that were previously swallowed into a single count.

The storage location line and Open Folder action move into the modal
actions; the page reload still happens only when the modal is
dismissed. ESC is captured so it never reaches the settings modal
underneath. The obsolete migrateSuccess toast key is dropped — the
modal is the success feedback now.
This commit is contained in:
Will Miao
2026-09-27 10:05:18 +08:00
parent 485679223b
commit e7c1c07db0
7 changed files with 293 additions and 164 deletions
@@ -111,22 +111,6 @@
</div>
</div>
<!-- Sidecar Migration Result Modal
Self-managed by SettingsManager: shown after a migration run with the
outcome counters and the storage location; closing it reloads the page
so cards pick up the new paths. -->
<div id="sidecarMigrationResultModal" class="modal delete-modal">
<div class="modal-content delete-modal-content">
<h2 data-role="title"></h2>
<p class="delete-message" data-role="message"></p>
<p class="delete-message sidecar-migration-destination" data-role="destination" style="display: none;"></p>
<div class="modal-actions">
<button class="secondary-btn" data-action="open-sidecar-location" style="display: none;">{{ t('settings.sidecarStorage.openFolderButton') }}</button>
<button class="primary-btn" data-action="close-sidecar-result">{{ t('common.actions.close') }}</button>
</div>
</div>
</div>
<!-- Sidebar Folder Delete Confirmation Modal -->
<!-- Shared by two states: 'confirm' (model-free folder) and 'blocked' (the
subtree still holds models, so a cascade delete is refused). -->