Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/lib/nav/DetailedMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
<Menu
conf={{
width: "200px",
right: "92px",
right:
page.url?.pathname.startsWith("/person") ||
page.url?.pathname.startsWith("/discover")
? "12px"
: "92px",
arrowLeft: page.url?.pathname.startsWith("/search") ? "84px" : "3px",
}}
>
Expand Down
19 changes: 15 additions & 4 deletions src/lib/poster/ExtraDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
store.userSettings.ratingSystem === RatingSystem.Thumbs,
);

let statusColorMap = {
FINISHED: "var(--status-finished-color)",
PLANNED: "var(--status-planned-color)",
WATCHING: "var(--status-watching-color)",
HOLD: "var(--status-hold-color)",
DROPPED: "var(--status-dropped-color)",
};

let backgroundColor = status !== undefined ? statusColorMap[status] : "";

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backgroundColor is computed once at component initialization, so it won’t update when status changes (e.g., after the user updates the watched status). Make this value reactive (e.g., derive it from status) so the background color stays in sync.

Suggested change
let backgroundColor = status !== undefined ? statusColorMap[status] : "";
let backgroundColor = $derived(
status !== undefined ? statusColorMap[status] : "",
);

Copilot uses AI. Check for mistakes.

function formatDate(e: number) {
if (!e) {
return "Unknown";
Expand All @@ -36,8 +46,8 @@
}
</script>

{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search")) && store.wlDetailedView && store.wlDetailedView.length > 0}
<div class="extra-details">
{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")) && details && store.wlDetailedView && store.wlDetailedView.length > 0}

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

details is referenced in this {#if ...} condition but it isn’t defined anywhere in this component (it’s not part of PosterExtraDetails and isn’t destructured from $props()). This will cause a compile/runtime error. Remove the details && guard or replace it with the correct prop/variable you intended to check.

Suggested change
{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")) && details && store.wlDetailedView && store.wlDetailedView.length > 0}
{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")) && store.wlDetailedView && store.wlDetailedView.length > 0}

Copilot uses AI. Check for mistakes.
<div class="extra-details" style="background-color: {backgroundColor}">
<!--
Comment on lines +50 to 51

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline style="background-color: {backgroundColor}" will override the SCSS background-color: $poster-extra-detail-bg-color;. When status is undefined or not in the map, backgroundColor becomes an empty/undefined value and the element may end up with no background (hurting readability). Consider falling back to $poster-extra-detail-bg-color or only applying the inline background color when a mapped status color exists.

Copilot uses AI. Check for mistakes.
The `if` statements can't be on their own line to look pretty
because that will cause whitespace in the generated markup,
Expand Down Expand Up @@ -99,16 +109,17 @@

<style lang="scss">
.extra-details {
$bot: 6px;
bottom: $bot;
position: absolute;
bottom: 5px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
font-size: 14px;
width: 160px;
width: calc(100% - $bot * 2);
color: white;
background-color: $poster-extra-detail-bg-color;
border-radius: 10px;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
</div>
<div class="btns">
<!-- Detailed posters only supported on own watched list currently -->
{#if page.url?.pathname === "/" || page.url?.pathname.startsWith("/search")}
{#if page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")}
<button
class="plain other detailedView"
onclick={() => {
Expand Down
65 changes: 65 additions & 0 deletions src/vars.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
:root {
--bg-color: white;
--bg-color-accent: rgb(180, 180, 180);
--nav-color: rgba(255, 255, 255, 0.8);
--text-color: black;
--text-color-accent: rgb(90, 90, 90);
--accent-color: rgba(128, 128, 128, 0.226);
--accent-color-hover: rgba(46, 46, 46);
--backdrop-filter: blur(4px) grayscale(80%);
--backdrop-mix-blend-mode: multiply;
--rating-color: black;
--placeholder-color: #8e8e8e;
--poster-rating-color: gold;
--img-blend-multiply-bg-col: rgba(0, 0, 0, 0.85);

--status-finished-color: rgba(123, 213, 85, 0.8);
--status-planned-color: rgba(247, 154, 99, 0.8);
--status-watching-color: rgba(61, 100, 242, 0.8);
--status-hold-color: rgba(232, 93, 117, 0.8);
--status-dropped-color: rgba(232, 93, 117, 0.8);
Comment on lines +1 to +20

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file defines the CSS custom properties used for status colors (e.g. --status-finished-color), but the app’s global CSS variables appear to be defined in src/styles/norm.scss (imported from src/routes/+layout.svelte), and SCSS globals are prepended from src/styles/_vars.scss via svelte.config.js. src/vars.scss doesn’t appear to be imported anywhere, so these --status-* variables likely won’t exist at runtime and the new poster coloring won’t work. Either move these :root additions into src/styles/norm.scss or ensure this file is included in the global stylesheet.

Copilot uses AI. Check for mistakes.
}

:root.theme-dark {
--bg-color: rgb(15, 15, 15);
--bg-color-accent: rgb(70, 70, 70);
--nav-color: rgba(15, 15, 15, 0.438);
--text-color: white;
--text-color-accent: rgb(180, 180, 180);
--accent-color: rgba(46, 46, 46);
--accent-color-hover: rgba(255, 255, 255, 0.8);
--backdrop-filter: blur(0.5px) grayscale(50%);
--backdrop-mix-blend-mode: difference;
--rating-color: gold;
--placeholder-color: #8e8e8e;
--poster-rating-color: black;
--img-blend-multiply-bg-col: rgba(255, 255, 255, 0.03);
}

$bg-color: var(--bg-color);
$bg-color-accent: var(--bg-color-accent);
$text-color: var(--text-color);
$text-color-accent: var(--text-color-accent);
$placeholder-color: var(--placeholder-color);
$accent-color: var(--accent-color);
$accent-color-hover: var(--accent-color-hover);
$backdrop-filter: var(--backdrop-filter);
$backdrop-mix-blend-mode: var(--backdrop-mix-blend-mode);
$backdrop-mask-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 1) 80%,
rgba(0, 0, 0, 0)
);
$nav-color: var(--nav-color);
$nav-height: 71px; // How tall the nav is naturally, usefull in some places.
$poster-rating-color: var(--poster-rating-color);
$poster-extra-detail-bg-color: rgba(46, 46, 46, 0.5);
// Bg col of elements with image behind with mix-blend-mode: multiply where we want a little of image to come through.
$img-blend-multiply-bg-col: var(--img-blend-multiply-bg-col);
$warn: #f38755;
$error: #f3555a;
$success: #28a745;
$success-hover: #1e7e34;

// For ratings that are on bg-color.
$rating-color: var(--rating-color);