Hide template gallery from OfficeHome
Some checks failed
Automated Container Build / build-and-push (push) Failing after 9s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 9s
This commit is contained in:
parent
3d28f767e0
commit
a5dc61a1b4
1 changed files with 0 additions and 48 deletions
|
|
@ -268,54 +268,6 @@ export default function OfficeHome({ type, onFileSelect, onCreateBlank, onPinCha
|
||||||
<Plus className="w-12 h-12 text-gray-300 group-hover:text-blue-500 transition-colors" />
|
<Plus className="w-12 h-12 text-gray-300 group-hover:text-blue-500 transition-colors" />
|
||||||
</button>
|
</button>
|
||||||
<span className="text-sm font-medium" style={{ color: 'var(--color-text-primary)' }}>Blank</span>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Reference in a new issue