Skip to content

Commit f4d46ac

Browse files
lane711claude
andcommitted
fix: show warning instead of validation error on WIP settings tabs
The Save All Changes button in Admin Settings was triggering a confusing "Site name and description are required" error when clicked on non-General tabs because all tabs routed to the /general endpoint which validates those fields. Now the saveAllSettings() function checks if the current tab has save functionality implemented. For WIP tabs (Appearance, Security, Notifications, Storage), it shows a warning notification explaining that saving is not yet available for that section. Fixes #345 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 511b3ec commit f4d46ac

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/core/src/templates/pages/admin-settings.template.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ export function renderSettingsPage(data: SettingsPageData): string {
153153
const currentTab = '${activeTab}';
154154
155155
async function saveAllSettings() {
156+
// Tabs with implemented save functionality
157+
const saveableTabs = ['general'];
158+
159+
// Check if current tab supports saving
160+
if (!saveableTabs.includes(currentTab)) {
161+
showNotification('Saving is not yet available for this settings section. This feature is under development.', 'warning');
162+
return;
163+
}
164+
156165
// Collect all form data
157166
const formData = new FormData();
158167

0 commit comments

Comments
 (0)