refactor: UX and styling improvements across frontend
- Fix login spinner (isLoading never set to true before await) - Extract PageHero component, replace copy-pasted hero sections on videos/models/tags pages - Replace inline plasma blobs with SexyBackground on videos/models/tags pages - Make video/model/tag cards fully clickable (wrap in <a>), remove redundant Watch/View Profile buttons - Convert inner overlay anchors to divs to avoid nested <a> elements - Fix home page model avatar preset: mini → thumbnail (correct size for 96px display) - Reduce home hero height: min-h-screen → min-h-[70vh] - Remove dead hideName prop from Logo, simplify component - Add brand name to mobile flyout panel header with gradient styling - Remove dead _relatedVideos array, isBookmarked state, _handleBookmark from video detail page - Clean up commented-out code blocks in video detail and models pages - Note: tag card inner tag links converted to spans to avoid nested anchors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
let isLiked = $state(data.likeStatus.liked);
|
||||
let likesCount = $state(data.video.likes_count || 0);
|
||||
let isLikeLoading = $state(false);
|
||||
let isBookmarked = $state(false);
|
||||
let newComment = $state("");
|
||||
let showComments = $state(true);
|
||||
let isCommentLoading = $state(false);
|
||||
@@ -40,41 +39,6 @@
|
||||
let currentPlayId = $state<string | null>(null);
|
||||
let lastTrackedTime = $state(0);
|
||||
|
||||
const _relatedVideos = [
|
||||
{
|
||||
id: 2,
|
||||
title: "Sunset Dreams",
|
||||
thumbnail: "/placeholder.svg?size=wide",
|
||||
duration: "8:45",
|
||||
views: "1.8M",
|
||||
model: "Luna Belle",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "Intimate Moments",
|
||||
thumbnail: "/placeholder.svg?size=wide",
|
||||
duration: "15:22",
|
||||
views: "3.2M",
|
||||
model: "Aria Divine",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: "Morning Light",
|
||||
thumbnail: "/placeholder.svg?size=wide",
|
||||
duration: "10:15",
|
||||
views: "956K",
|
||||
model: "Maya Starlight",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: "Passionate Dance",
|
||||
thumbnail: "/placeholder.svg?size=wide",
|
||||
duration: "7:33",
|
||||
views: "1.4M",
|
||||
model: "Zara Moon",
|
||||
},
|
||||
];
|
||||
|
||||
async function handleLike() {
|
||||
if (!data.authStatus.authenticated) {
|
||||
toast.error("Please sign in to like videos");
|
||||
@@ -101,10 +65,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function _handleBookmark() {
|
||||
isBookmarked = !isBookmarked;
|
||||
}
|
||||
|
||||
async function handleDeleteComment(id: number) {
|
||||
try {
|
||||
await deleteComment(id);
|
||||
@@ -289,16 +249,6 @@
|
||||
type: "video" as const,
|
||||
}}
|
||||
/>
|
||||
<!-- <Button
|
||||
variant={isBookmarked ? "default" : "outline"}
|
||||
onclick={_handleBookmark}
|
||||
class="flex items-center gap-2 {isBookmarked
|
||||
? 'bg-gradient-to-r from-primary to-accent'
|
||||
: 'border-primary/20 hover:bg-primary/10'}"
|
||||
>
|
||||
<span class="icon-[ri--bookmark-{isBookmarked ? 'fill' : 'line'}] w-4 h-4"></span>
|
||||
Save
|
||||
</Button> -->
|
||||
</div>
|
||||
|
||||
<!-- Model Info -->
|
||||
@@ -329,15 +279,8 @@
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
<!-- <p class="text-sm text-muted-foreground">
|
||||
{data.video.model.subscribers} subscribers
|
||||
</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <Button
|
||||
class="bg-gradient-to-r from-primary to-accent hover:from-primary/90 hover:to-accent/90"
|
||||
>Subscribe</Button
|
||||
> -->
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user