Hide template gallery from OfficeHome
Some checks failed
Automated Container Build / build-and-push (push) Failing after 9s

This commit is contained in:
Elijah 2026-05-24 19:52:13 -07:00
parent 3d28f767e0
commit a5dc61a1b4

View file

@ -269,54 +269,6 @@ export default function OfficeHome({ type, onFileSelect, onCreateBlank, onPinCha
</button>
<span className="text-sm font-medium" style={{ color: 'var(--color-text-primary)' }}>Blank</span>
</div>
{type === 'docs' && (
<>
<div className="flex flex-col gap-3">
<button
onClick={async () => {
try {
const res = await api.createFromTemplate('apa.docx');
const newFile: FileItem = { name: res.name, path: res.path, is_dir: false, size: 0, mime_type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', is_pinned: false, is_trashed: false, mod_time: new Date().toISOString() };
onCreateBlank(newFile);
} catch (err) { console.error("Failed to create template", err); }
}}
className="w-40 h-52 rounded-lg border hover:border-blue-500 transition-colors flex items-center justify-center shadow-sm relative overflow-hidden"
style={{ backgroundColor: 'var(--color-bg-elevated)', borderColor: 'var(--color-border)' }}
>
<div className="absolute inset-x-0 top-0 h-16 bg-blue-50 border-b border-blue-100 flex items-center px-4">
<div className="w-1/2 h-2 bg-blue-200 rounded"></div>
</div>
<div className="w-full h-full pt-20 px-4 flex flex-col gap-2">
<div className="w-full h-1.5 bg-gray-100 rounded"></div>
<div className="w-full h-1.5 bg-gray-100 rounded"></div>
<div className="w-3/4 h-1.5 bg-gray-100 rounded"></div>
</div>
</button>
<span className="text-sm font-medium" style={{ color: 'var(--color-text-primary)' }}>APA Paper</span>
</div>
<div className="flex flex-col gap-3">
<button
onClick={async () => {
try {
const res = await api.createFromTemplate('resume.docx');
const newFile: FileItem = { name: res.name, path: res.path, is_dir: false, size: 0, mime_type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', is_pinned: false, is_trashed: false, mod_time: new Date().toISOString() };
onCreateBlank(newFile);
} catch (err) { console.error("Failed to create template", err); }
}}
className="w-40 h-52 rounded-lg border hover:border-blue-500 transition-colors flex flex-col items-center justify-center shadow-sm relative overflow-hidden p-4"
style={{ backgroundColor: 'var(--color-bg-elevated)', borderColor: 'var(--color-border)' }}
>
<div className="w-12 h-12 bg-gray-200 rounded-full mb-4"></div>
<div className="w-full h-1.5 bg-gray-200 rounded mb-2"></div>
<div className="w-2/3 h-1.5 bg-gray-200 rounded mb-4"></div>
<div className="w-full h-1.5 bg-gray-100 rounded mb-1"></div>
<div className="w-full h-1.5 bg-gray-100 rounded mb-1"></div>
</button>
<span className="text-sm font-medium" style={{ color: 'var(--color-text-primary)' }}>Resume</span>
</div>
</>
)}
</div>
</div>
</div>