refactor: align article author with VideoModel, streamline selects, fix flyout inert
- Remove ArticleAuthor type; article.author now reuses VideoModel (id, artist_name, slug, avatar) - updateArticle accepts authorId; author selectable in admin article edit page - Article edit: single Select with bind:value + $derived selectedAuthor display - Video edit: replace pill toggles with Select type="multiple" bind:value for models - Video table: replace inline badge spans with Badge component - Magazine: display artist_name throughout, author bio links to model profile - Fix flyout aria-hidden warning: replace with inert attribute Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
<!-- Flyout panel -->
|
||||
<div
|
||||
class={`fixed inset-y-0 left-0 z-50 w-80 max-w-[85vw] bg-card/95 backdrop-blur-xl shadow-2xl shadow-primary/20 border-r border-border/30 transform transition-transform duration-300 ease-in-out lg:hidden overflow-y-auto flex flex-col ${isMobileMenuOpen ? "translate-x-0" : "-translate-x-full"}`}
|
||||
aria-hidden={!isMobileMenuOpen}
|
||||
inert={!isMobileMenuOpen || undefined}
|
||||
>
|
||||
<!-- Panel header -->
|
||||
<div class="flex items-center px-5 h-16 shrink-0 border-b border-border/30">
|
||||
|
||||
@@ -229,10 +229,10 @@ const ARTICLES_QUERY = gql`
|
||||
category
|
||||
featured
|
||||
author {
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
artist_name
|
||||
slug
|
||||
avatar
|
||||
description
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,10 +259,10 @@ const ARTICLE_BY_SLUG_QUERY = gql`
|
||||
category
|
||||
featured
|
||||
author {
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
artist_name
|
||||
slug
|
||||
avatar
|
||||
description
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1387,8 +1387,9 @@ const ADMIN_LIST_ARTICLES_QUERY = gql`
|
||||
featured
|
||||
content
|
||||
author {
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
artist_name
|
||||
slug
|
||||
avatar
|
||||
}
|
||||
}
|
||||
@@ -1467,6 +1468,7 @@ const UPDATE_ARTICLE_MUTATION = gql`
|
||||
$excerpt: String
|
||||
$content: String
|
||||
$imageId: String
|
||||
$authorId: String
|
||||
$tags: [String!]
|
||||
$category: String
|
||||
$featured: Boolean
|
||||
@@ -1479,6 +1481,7 @@ const UPDATE_ARTICLE_MUTATION = gql`
|
||||
excerpt: $excerpt
|
||||
content: $content
|
||||
imageId: $imageId
|
||||
authorId: $authorId
|
||||
tags: $tags
|
||||
category: $category
|
||||
featured: $featured
|
||||
@@ -1498,6 +1501,7 @@ export async function updateArticle(input: {
|
||||
excerpt?: string;
|
||||
content?: string;
|
||||
imageId?: string;
|
||||
authorId?: string | null;
|
||||
tags?: string[];
|
||||
category?: string;
|
||||
featured?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user