feat #10

Merged
ssa merged 4 commits from feat into main 2026-02-20 17:33:45 +03:00
Showing only changes of commit 70e0545fef - Show all commits

View File

@@ -17,6 +17,9 @@ export function Content({ config, env, onTemplateSaved }: ContentProps) {
// Validate placeholders for warning badge // Validate placeholders for warning badge
const missingPlaceholders = config.validatePlaceholders(); const missingPlaceholders = config.validatePlaceholders();
const hasValidationWarnings = missingPlaceholders.length > 0; const hasValidationWarnings = missingPlaceholders.length > 0;
const warningMessage = hasValidationWarnings
? `Missing params: ${missingPlaceholders.join(', ')}`
: '';
const tabs: Array<{ id: string; label: string; badge?: string | number; badgeVariant?: 'warning' | 'danger' }> = [ const tabs: Array<{ id: string; label: string; badge?: string | number; badgeVariant?: 'warning' | 'danger' }> = [
{ id: 'env', label: 'Env' }, { id: 'env', label: 'Env' },
@@ -33,7 +36,15 @@ export function Content({ config, env, onTemplateSaved }: ContentProps) {
return ( return (
<div className="bg-white rounded-xl shadow-lg border border-slate-200 overflow-hidden h-full flex flex-col"> <div className="bg-white rounded-xl shadow-lg border border-slate-200 overflow-hidden h-full flex flex-col">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<div className="flex items-center justify-between border-b border-slate-200 px-4 py-2">
<Tabs tabs={tabs} activeTab={activeTab} onChange={setActiveTab} /> <Tabs tabs={tabs} activeTab={activeTab} onChange={setActiveTab} />
{activeTab === 'template' && hasValidationWarnings && (
<div className="flex items-center gap-2 text-sm text-amber-600 bg-amber-50 px-3 py-1.5 rounded-lg">
<span className="font-medium">Warning:</span>
<span>{warningMessage}</span>
</div>
)}
</div>
</div> </div>
<div className="flex-1 overflow-y-auto p-4 min-h-0"> <div className="flex-1 overflow-y-auto p-4 min-h-0">