feat: daily timeline advanced UI and calendar integration

This commit is contained in:
2026-06-03 04:08:13 -05:00
parent e944594e06
commit ad8622e243
34 changed files with 2088 additions and 788 deletions
+40 -14
View File
@@ -1,10 +1,11 @@
import React, { useState, useCallback } from 'react';
import { Save, AlertCircle, Crown } from 'lucide-react';
import { Save, AlertCircle, Crown, FolderOpen, Sparkles } from 'lucide-react';
import { DesignMD, CompanyProfile } from '../types';
import { BrandTabGeneral } from './brand/BrandTabGeneral';
import { BrandTabVisual } from './brand/BrandTabVisual';
import { BrandTabTypography } from './brand/BrandTabTypography';
import { BrandTabMedia } from './brand/BrandTabMedia';
import { BrandTabGenerated } from './brand/BrandTabGenerated';
import { BrandPreview } from './brand/BrandPreview';
import { Toast } from './ui/Toast';
@@ -22,6 +23,7 @@ const TABS = [
{ id: 'visual', label: 'Visual y Colores', icon: '🎨' },
{ id: 'typography', label: 'Tipografía', icon: '🔤' },
{ id: 'media', label: 'Video y Audio', icon: '🎬' },
{ id: 'generated', label: 'Generados', icon: '✨' },
] as const;
type TabId = typeof TABS[number]['id'];
@@ -59,7 +61,13 @@ export const BrandArchitecture: React.FC<BrandArchitectureProps> = ({ company, h
};
const handleOpenFolder = async () => {
if (window.electronAPI && company?.id) {
const workspacePath = await window.electronAPI.fs.getWorkspacePath();
const folderPath = `${workspacePath}/${company.id}`;
await window.electronAPI.fs.openFolder(folderPath);
}
};
return (
<div className="flex-1 flex flex-col w-full overflow-hidden">
{/* ═══ Sticky Header: Title + Brand Identity ═══ */}
@@ -120,6 +128,14 @@ export const BrandArchitecture: React.FC<BrandArchitectureProps> = ({ company, h
</div>
</div>
<button
onClick={handleOpenFolder}
title="Abrir carpeta local"
className="flex items-center gap-2 px-3 py-2.5 rounded-xl bg-neutral-800/80 hover:bg-neutral-700/80 border border-neutral-700/50 text-neutral-300 text-sm font-medium transition-all"
>
<FolderOpen size={16} />
</button>
{/* Save Button */}
<button
onClick={handleSave}
@@ -185,6 +201,7 @@ export const BrandArchitecture: React.FC<BrandArchitectureProps> = ({ company, h
)}
{activeTab === 'visual' && (
<BrandTabVisual
company={company}
designMD={designMD}
handleDesignChange={handleDesignChange}
onEditAsset={onEditAsset}
@@ -195,28 +212,37 @@ export const BrandArchitecture: React.FC<BrandArchitectureProps> = ({ company, h
)}
{activeTab === 'media' && (
<BrandTabMedia
company={company}
designMD={designMD}
handleDesignChange={handleDesignChange}
onEditAsset={onEditAsset}
/>
)}
{activeTab === 'generated' && (
<BrandTabGenerated company={company} />
)}
</div>
</div>
{/* Preview Column */}
<BrandPreview
designMD={designMD}
company={company}
activeTab={activeTab}
zoom={zoom}
setZoom={setZoom}
aspectRatio={aspectRatio}
setAspectRatio={setAspectRatio}
handleDesignChange={handleDesignChange}
/>
{activeTab === 'generated' ? (
<div className="flex-1 bg-neutral-950 flex flex-col items-center justify-center text-neutral-500">
<Sparkles className="w-12 h-12 mb-4 opacity-50" />
<p>Selecciona un archivo generado para previsualizarlo.</p>
</div>
) : (
<BrandPreview
designMD={designMD}
company={company}
activeTab={activeTab}
zoom={zoom}
setZoom={setZoom}
aspectRatio={aspectRatio}
setAspectRatio={setAspectRatio}
handleDesignChange={handleDesignChange}
/>
)}
</div>
{/* Success Toast */}