-
Notifications
You must be signed in to change notification settings - Fork 74
Color by status #672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Color by status #672
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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] : ""; | ||||||
|
|
||||||
| function formatDate(e: number) { | ||||||
| if (!e) { | ||||||
| return "Unknown"; | ||||||
|
|
@@ -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} | ||||||
|
||||||
| {#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
AI
Mar 2, 2026
There was a problem hiding this comment.
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.
| 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
|
||
| } | ||
|
|
||
| :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); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backgroundColoris computed once at component initialization, so it won’t update whenstatuschanges (e.g., after the user updates the watched status). Make this value reactive (e.g., derive it fromstatus) so the background color stays in sync.