Add confirmation dialog for restoring default config
- Add Restore Default confirmation modal to settings.html - Add translation strings to store.js - Update claude-config.js to trigger modal instead of immediate restore Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -543,6 +543,33 @@
|
||||
<span x-show="loading" class="loading loading-spinner loading-xs"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Restore Defaults Confirmation Modal -->
|
||||
<dialog id="restore_defaults_modal" class="modal">
|
||||
<div class="modal-box bg-space-900 border-2 border-red-500/50">
|
||||
<h3 class="font-bold text-lg text-red-400 flex items-center gap-2">
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
||||
</svg>
|
||||
<span x-text="$store.global.t('confirmRestoreTitle')">Confirm Restore</span>
|
||||
</h3>
|
||||
<p class="py-4 text-gray-300" x-text="$store.global.t('confirmRestoreMessage')">
|
||||
Are you sure you want to restore Claude CLI to default settings? This will remove proxy configuration.
|
||||
</p>
|
||||
<div class="modal-action">
|
||||
<button class="btn btn-ghost text-gray-400" onclick="document.getElementById('restore_defaults_modal').close()"
|
||||
x-text="$store.global.t('cancel')">Cancel</button>
|
||||
<button class="btn bg-red-500 hover:bg-red-600 border-none text-white" @click="executeRestore()"
|
||||
:disabled="restoring"
|
||||
:class="{ 'loading': restoring }">
|
||||
<span x-text="$store.global.t('confirmRestore')" x-show="!restoring">Confirm Restore</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>close</button>
|
||||
</form>
|
||||
</dialog>
|
||||
</div>
|
||||
|
||||
<!-- Tab 3: Models Configuration -->
|
||||
|
||||
Reference in New Issue
Block a user