Complete 0.7.1 fixes

This commit is contained in:
hnzio committed 2026-10-26 09:35:19 +01:00
1 parent a08b02c34b
commit 64f55a8b1f
26 files changed
+610 -168

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@
</header>
<div class="shared-rundown">
{#each data.share.sections as section (section)}
<section class="shared-section">
<section class="quiet-panel shared-section">
<header>
<div>
{#if section.category}<small
+7 -10
View File
@@ -121,8 +121,8 @@
if (
control instanceof HTMLInputElement &&
control.name === 'presentationMode' &&
['link', 'video'].includes(control.value) &&
draft.presentationSourcePosition === null
((['link', 'video'].includes(control.value) && draft.presentationSourcePosition === null) ||
(control.value === 'image' && !draft.presentationMediaId))
) {
return;
}
@@ -673,6 +673,7 @@
<input type="hidden" name="presentationSiteName" value={draft.presentationSiteName} />
<input type="hidden" name="presentationProvider" value={draft.presentationProvider} />
<input type="hidden" name="presentationProviderId" value={draft.presentationProviderId} />
<input type="hidden" name="presentationMediaId" value={draft.presentationMediaId ?? ''} />
<input
type="hidden"
name="presentationMetadataFetchedAtUtc"
@@ -693,12 +694,10 @@
</div>
<small>JPEG, PNG, WebP oder GIF bis 5 MB</small>
</div>
{#if data.piece.media.length}<label class="media-none"
{#if draft.media.length && draft.presentationMode === 'text'}<label class="media-none"
><input
form="piece-editor-form"
type="radio"
name="presentationMediaId"
value=""
name="presentationMediaChoice"
checked={!draft.presentationMediaId}
onchange={() => {
draft.presentationMediaId = null;
@@ -707,13 +706,11 @@
/> Kein hochgeladenes Bild</label
>
<div class="media-grid">
{#each data.piece.media as media (media.id)}<figure>
{#each draft.media as media (media.id)}<figure>
<label class="media-presentation-choice"
><input
form="piece-editor-form"
type="radio"
name="presentationMediaId"
value={media.id}
name="presentationMediaChoice"
checked={draft.presentationMediaId === media.id}
onchange={() => {
draft.presentationMediaId = media.id;
@@ -14,10 +14,12 @@
<div class="presentation-test-status" role="status">Isolierte Testansicht</div>
<PresentationDisplay
content={data.content}
imageSrc={data.content.images.length
? data.content.mode === 'text'
? '/media'
: `/media/${data.content.images[0].id}`
: `/fundus/${data.pieceId}/praesentation/preview-image`}
imageSrc={data.content.mode === 'text' && data.content.images.length
? '/media'
: data.content.mode === 'image' && data.content.images.length
? `/media/${data.content.images[0].id}`
: data.content.mode === 'link' && data.content.imageUrl
? `/fundus/${data.pieceId}/praesentation/preview-image`
: ''}
/>
</main>
@@ -7,7 +7,9 @@ import { fetchPresentationImage } from '#lib/server/presentation.js';
export const GET: RequestHandler = async ({ locals, params }) => {
requireUser(locals.user);
const piece = getPiece(params.id);
if (!piece?.presentationImageUrl) error(404, 'Vorschaubild nicht verfügbar');
if (piece?.presentationMode !== 'link' || !piece.presentationImageUrl) {
error(404, 'Vorschaubild nicht verfügbar');
}
try {
const image = await fetchPresentationImage(piece.presentationImageUrl);
return new Response(new Uint8Array(image.data), {
+4 -1
View File
@@ -129,7 +129,7 @@ export const load: PageServerLoad = ({ locals, params, url }) => {
};
}
const pieces = listPieces({
statuses: ['ready'],
statuses: ['preparing', 'ready'],
query: url.searchParams.get('q') ?? '',
categoryId: url.searchParams.get('category') ?? ''
});
@@ -338,6 +338,9 @@ export const actions = {
presentationDescription: text(data, 'presentationDescription'),
presentationImageUrl: text(data, 'presentationImageUrl'),
presentationSiteName: text(data, 'presentationSiteName'),
preparationStatus: text(data, 'preparationStatus') as PieceUsageUpdate['preparationStatus'],
preparationEffort: (text(data, 'preparationEffort') ||
null) as PieceUsageUpdate['preparationEffort'],
presentationMediaId: text(data, 'presentationMediaId') || null,
tools: toolIds.map((id, index) => ({
id,
+1 -1
View File
@@ -431,7 +431,7 @@
<header class="pane-heading">
<div>
<p class="eyebrow">Quelle</p>
<h2 id="source-title">Sendefertiger Fundus</h2>
<h2 id="source-title">Planbarer Fundus</h2>
</div>
<span>{visiblePieces.length}</span>
</header>
+2 -2
View File
@@ -32,7 +32,6 @@
>
{form.success}
</div>{/if}
<ShareManagement shows={data.shows} shares={data.shares} {form} />
<h2 class="section-heading">Schnittstellen</h2>
<section class="quiet-panel integration-panel">
<div class="panel-heading">
@@ -312,7 +311,8 @@
</section>
</div>
<h2 class="section-heading">Werkzeuge</h2>
<h2 class="section-heading">Werkzeuge & Freigaben</h2>
<ShareManagement shows={data.shows} shares={data.shares} {form} catalogPanel />
<section class="quiet-panel tool-management">
<div class="panel-heading">
<div>