refactor: remove clear cache functionality and associated modal from settings manager

This commit is contained in:
Will Miao
2025-09-11 15:21:06 +08:00
parent 21941521a0
commit c66cbc800b
3 changed files with 0 additions and 91 deletions

View File

@@ -1275,32 +1275,6 @@ export class SettingsManager {
modalManager.showModal('clearCacheModal');
}
async executeClearCache() {
try {
// Call the API endpoint to clear cache files
const response = await fetch('/api/clear-cache', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
}
});
const result = await response.json();
if (result.success) {
showToast('toast.settings.cacheCleared', {}, 'success');
} else {
showToast('toast.settings.cacheClearFailed', { error: result.error }, 'error');
}
// Close the confirmation modal
modalManager.closeModal('clearCacheModal');
} catch (error) {
showToast('toast.settings.cacheClearError', { message: error.message }, 'error');
modalManager.closeModal('clearCacheModal');
}
}
async reloadContent() {
if (this.currentPage === 'loras') {
// Reload the loras without updating folders