3.06 Template Library Redenumire, Versionare, Multi-format
- Renamed from 'Sabloane Word' to 'Biblioteca Sabloane' (Template Library) - Multi-format support: Word, Excel, PDF, DWG, Archicad with auto-detection - Auto versioning: 'Revizie Noua' button archives current version, bumps semver - Version history dialog: browse and download any previous version - Simplified UX: file upload vs external link toggle, auto-detect placeholders silently for .docx, hide placeholders section for non-Word formats - File type icons: distinct icons for docx, xlsx, archicad, dwg, pdf - Updated stats cards: Word/Excel count, DWG/Archicad count, versioned count - Backward compatible: old entries without fileType/versionHistory get defaults
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import { useSignatureConfig } from '../hooks/use-signature-config';
|
||||
import { useSavedSignatures } from '../hooks/use-saved-signatures';
|
||||
import { SignatureConfigurator } from './signature-configurator';
|
||||
import { SignaturePreview } from './signature-preview';
|
||||
import { SavedSignaturesPanel } from './saved-signatures-panel';
|
||||
import { Separator } from '@/shared/components/ui/separator';
|
||||
import { Button } from '@/shared/components/ui/button';
|
||||
import { RotateCcw } from 'lucide-react';
|
||||
import type { SignatureBanner } from '../types';
|
||||
import { useSignatureConfig } from "../hooks/use-signature-config";
|
||||
import { useSavedSignatures } from "../hooks/use-saved-signatures";
|
||||
import { SignatureConfigurator } from "./signature-configurator";
|
||||
import { SignaturePreview } from "./signature-preview";
|
||||
import { SavedSignaturesPanel } from "./saved-signatures-panel";
|
||||
import { Separator } from "@/shared/components/ui/separator";
|
||||
import { Button } from "@/shared/components/ui/button";
|
||||
import { RotateCcw } from "lucide-react";
|
||||
import type { SignatureBanner } from "../types";
|
||||
|
||||
export function EmailSignatureModule() {
|
||||
const {
|
||||
config, updateField, updateColor, updateLayout,
|
||||
setVariant, setCompany, setAddress, resetToDefaults, loadConfig,
|
||||
config,
|
||||
updateField,
|
||||
updateColor,
|
||||
updateLayout,
|
||||
setVariant,
|
||||
setCompany,
|
||||
setAddress,
|
||||
resetToDefaults,
|
||||
loadConfig,
|
||||
} = useSignatureConfig();
|
||||
|
||||
const { saved, loading, save, remove } = useSavedSignatures();
|
||||
|
||||
const setBanner = (banner: SignatureBanner | undefined) => {
|
||||
updateField('banner', banner);
|
||||
updateField("banner", banner);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -42,7 +49,9 @@ export function EmailSignatureModule() {
|
||||
<SavedSignaturesPanel
|
||||
saved={saved}
|
||||
loading={loading}
|
||||
onSave={async (label, cfg) => { await save(label, cfg); }}
|
||||
onSave={async (label, cfg) => {
|
||||
await save(label, cfg);
|
||||
}}
|
||||
onLoad={loadConfig}
|
||||
onRemove={remove}
|
||||
currentConfig={config}
|
||||
@@ -50,7 +59,12 @@ export function EmailSignatureModule() {
|
||||
|
||||
<Separator />
|
||||
|
||||
<Button variant="outline" size="sm" onClick={resetToDefaults} className="w-full">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={resetToDefaults}
|
||||
className="w-full"
|
||||
>
|
||||
<RotateCcw className="mr-1.5 h-3.5 w-3.5" />
|
||||
Resetare la valorile implicite
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user