fix: resolve lint errors from ACL/admin implementation
- Remove unused requireOwnerOrAdmin import from videos.ts - Remove unused requireAuth import from users.ts - Remove unused GraphQLError import from articles.ts - Replace URLSearchParams with SvelteURLSearchParams in admin users page - Apply prettier formatting to all changed files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -87,8 +87,7 @@
|
||||
>
|
||||
{/if}
|
||||
{#if video.featured}
|
||||
<span
|
||||
class="px-1.5 py-0.5 rounded text-xs font-medium bg-primary/10 text-primary"
|
||||
<span class="px-1.5 py-0.5 rounded text-xs font-medium bg-primary/10 text-primary"
|
||||
>Featured</span
|
||||
>
|
||||
{/if}
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
let premium = $state(data.video.premium ?? false);
|
||||
let featured = $state(data.video.featured ?? false);
|
||||
let uploadDate = $state(
|
||||
data.video.upload_date
|
||||
? new Date(data.video.upload_date).toISOString().slice(0, 16)
|
||||
: "",
|
||||
data.video.upload_date ? new Date(data.video.upload_date).toISOString().slice(0, 16) : "",
|
||||
);
|
||||
let imageId = $state<string | null>(data.video.image ?? null);
|
||||
let movieId = $state<string | null>(data.video.movie ?? null);
|
||||
@@ -118,13 +116,13 @@
|
||||
<div class="space-y-1.5">
|
||||
<Label>Cover image</Label>
|
||||
{#if imageId}
|
||||
<img src={getAssetUrl(imageId, "thumbnail")} alt="" class="h-24 rounded object-cover mb-2" />
|
||||
<img
|
||||
src={getAssetUrl(imageId, "thumbnail")}
|
||||
alt=""
|
||||
class="h-24 rounded object-cover mb-2"
|
||||
/>
|
||||
{/if}
|
||||
<FileDropZone
|
||||
accept="image/*"
|
||||
maxFileSize={10 * MEGABYTE}
|
||||
onUpload={handleImageUpload}
|
||||
/>
|
||||
<FileDropZone accept="image/*" maxFileSize={10 * MEGABYTE} onUpload={handleImageUpload} />
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
@@ -132,11 +130,7 @@
|
||||
{#if movieId}
|
||||
<p class="text-xs text-muted-foreground mb-1">Current file: {movieId}</p>
|
||||
{/if}
|
||||
<FileDropZone
|
||||
accept="video/*"
|
||||
maxFileSize={2000 * MEGABYTE}
|
||||
onUpload={handleVideoUpload}
|
||||
/>
|
||||
<FileDropZone accept="video/*" maxFileSize={2000 * MEGABYTE} onUpload={handleVideoUpload} />
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
|
||||
@@ -110,7 +110,9 @@
|
||||
<Input
|
||||
id="title"
|
||||
bind:value={title}
|
||||
oninput={() => { if (!slug) slug = generateSlug(title); }}
|
||||
oninput={() => {
|
||||
if (!slug) slug = generateSlug(title);
|
||||
}}
|
||||
placeholder="Video title"
|
||||
/>
|
||||
</div>
|
||||
@@ -122,26 +124,23 @@
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<Label for="description">Description</Label>
|
||||
<Textarea id="description" bind:value={description} placeholder="Optional description" rows={3} />
|
||||
<Textarea
|
||||
id="description"
|
||||
bind:value={description}
|
||||
placeholder="Optional description"
|
||||
rows={3}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<Label>Cover image</Label>
|
||||
<FileDropZone
|
||||
accept="image/*"
|
||||
maxFileSize={10 * MEGABYTE}
|
||||
onUpload={handleImageUpload}
|
||||
/>
|
||||
<FileDropZone accept="image/*" maxFileSize={10 * MEGABYTE} onUpload={handleImageUpload} />
|
||||
{#if imageId}<p class="text-xs text-green-600 mt-1">Image uploaded ✓</p>{/if}
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<Label>Video file</Label>
|
||||
<FileDropZone
|
||||
accept="video/*"
|
||||
maxFileSize={2000 * MEGABYTE}
|
||||
onUpload={handleVideoUpload}
|
||||
/>
|
||||
<FileDropZone accept="video/*" maxFileSize={2000 * MEGABYTE} onUpload={handleVideoUpload} />
|
||||
{#if movieId}<p class="text-xs text-green-600 mt-1">Video uploaded ✓</p>{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user