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:
@@ -144,7 +144,11 @@ window.Components.claudeConfig = () => ({
|
||||
}
|
||||
},
|
||||
|
||||
async restoreDefaultClaudeConfig() {
|
||||
restoreDefaultClaudeConfig() {
|
||||
document.getElementById('restore_defaults_modal').showModal();
|
||||
},
|
||||
|
||||
async executeRestore() {
|
||||
this.restoring = true;
|
||||
const password = Alpine.store('global').webuiPassword;
|
||||
try {
|
||||
@@ -157,6 +161,9 @@ window.Components.claudeConfig = () => ({
|
||||
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
||||
Alpine.store('global').showToast(Alpine.store('global').t('claudeConfigRestored'), 'success');
|
||||
|
||||
// Close modal
|
||||
document.getElementById('restore_defaults_modal').close();
|
||||
|
||||
// Reload the config to reflect the changes
|
||||
await this.fetchConfig();
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user