diff --git a/classquiz/routers/storage.py b/classquiz/routers/storage.py index c7d6ae5..17e4792 100644 --- a/classquiz/routers/storage.py +++ b/classquiz/routers/storage.py @@ -209,6 +209,7 @@ async def list_images( storage_items = ( await StorageItem.objects.filter(user=user) .filter(StorageItem.uploaded_at > since) + .filter(StorageItem.deleted_at == None) # noqa: E711 .order_by(StorageItem.uploaded_at.desc()) .select_related([StorageItem.quizzes, StorageItem.quiztivities]) .all() diff --git a/frontend/src/lib/editor/uploader.svelte b/frontend/src/lib/editor/uploader.svelte index 2ee82b4..adec973 100644 --- a/frontend/src/lib/editor/uploader.svelte +++ b/frontend/src/lib/editor/uploader.svelte @@ -32,6 +32,7 @@ export let data: EditorData; export let selected_question: number; export let video_upload = false; + export let library_enabled = true; // eslint-disable-next-line no-undef let video_popup: undefined | WindowProxy = undefined; @@ -89,7 +90,6 @@ modalOpen = false; selected_type = null; }); - console.log(edit_id); onMount(() => { window.addEventListener('storage', (e) => { @@ -138,14 +138,15 @@ > {#if selected_type === null}
- The popup is open; have a look at it for further information + {$t('uploader.upload_video_popup_notice')}
{:else} -Size: {(image.size / (1024 * 1024)).toFixed(2)} Mib
-Caption: {image.alt_text ?? 'MISSING!'}
-Filename: {image.filename ?? 'Unset'}
-Uploaded: {new Date(image.uploaded_at).toLocaleString()}
-Imported: {image.imported ? 'Yes' : 'No'}
-+ {$t('file_dashboard.size', { + size: (image.size / (1024 * 1024)).toFixed(2) + })} +
++ {$t('file_dashboard.caption', { + caption: image.alt_text ?? $t('file_dashboard.missing') + })} +
++ {$t('file_dashboard.filename', { + filename: image.filename ?? $t('file_dashboard.missing') + })} +
++ {$t('file_dashboard.uploaded', { + date: new Date(image.uploaded_at).toLocaleString() + })} +
++ {$t('file_dashboard.imported', { + yes_or_no: image.imported ? $t('words.yes') : $t('words.no') + })} +
+