Feat: Live thumbnails for office files
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m26s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m26s
This commit is contained in:
parent
b80abdbefb
commit
80d60d540a
10 changed files with 244 additions and 106 deletions
|
|
@ -8,8 +8,6 @@ import api from '@/lib/api';
|
|||
interface SettingsData {
|
||||
theme: string;
|
||||
grid_size: string;
|
||||
thumbnail_images: string;
|
||||
thumbnail_videos: string;
|
||||
trash_auto_purge_days: string;
|
||||
}
|
||||
|
||||
|
|
@ -55,8 +53,6 @@ export default function SettingsPage({ onLogout }: SettingsPageProps) {
|
|||
const loaded = {
|
||||
theme: s.theme || 'dark',
|
||||
grid_size: s.grid_size || '200',
|
||||
thumbnail_images: s.thumbnail_images || 'true',
|
||||
thumbnail_videos: s.thumbnail_videos || 'true',
|
||||
trash_auto_purge_days: s.trash_auto_purge_days || '14',
|
||||
};
|
||||
setSettings(loaded);
|
||||
|
|
@ -200,35 +196,7 @@ export default function SettingsPage({ onLogout }: SettingsPageProps) {
|
|||
</form>
|
||||
)
|
||||
},
|
||||
{
|
||||
id: 'thumbnails',
|
||||
title: 'Media & Thumbnails',
|
||||
icon: <ImageIcon className="w-5 h-5" />,
|
||||
content: (
|
||||
<div className="space-y-4">
|
||||
<label className="flex items-center gap-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={settings.thumbnail_images === 'true'}
|
||||
onChange={(e) => setSettings({ ...settings, thumbnail_images: e.target.checked ? 'true' : 'false' })}
|
||||
className="w-4 h-4 rounded text-accent focus:ring-accent"
|
||||
style={{ accentColor: 'var(--color-accent)' }}
|
||||
/>
|
||||
<span className="text-sm font-medium" style={{ color: 'var(--color-text-primary)' }}>Generate thumbnails for images</span>
|
||||
</label>
|
||||
<label className="flex items-center gap-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={settings.thumbnail_videos === 'true'}
|
||||
onChange={(e) => setSettings({ ...settings, thumbnail_videos: e.target.checked ? 'true' : 'false' })}
|
||||
className="w-4 h-4 rounded text-accent focus:ring-accent"
|
||||
style={{ accentColor: 'var(--color-accent)' }}
|
||||
/>
|
||||
<span className="text-sm font-medium" style={{ color: 'var(--color-text-primary)' }}>Generate thumbnails for videos (requires FFmpeg)</span>
|
||||
</label>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
id: 'trash',
|
||||
|
|
|
|||
Reference in a new issue