Skip to content
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

Use different color for horizontal queue #221

Merged
merged 1 commit into from
Dec 7, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
script: |
const images_grid = '${{steps.pr_playwright-upload.outputs.pr_playwright_images}}'
.split(',')
.map(i => '<img src="' + i.replace("https://i.ibb.co/", "https://kbats.ru/imgbb/") + '" width="400" />')
.map(i => '<img src="' + i + '" width="400" />') // .replace("https://i.ibb.co/", "https://kbats.ru/imgbb/")
.join(' ');

github.rest.issues.createComment({
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/overlay/src/components/organisms/widgets/Queue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ const QueueScoreLabel = styled(ShrinkingBox)`
const QueueProblemLabel = styled(ProblemLabel)`
width: ${c.QUEUE_ROW_PROBLEM_LABEL_WIDTH}px;
font-size: ${c.QUEUE_PROBLEM_LABEL_FONT_SIZE};
font-family: ${c.GLOBAL_DEFAULT_FONT_FAMILY};
font-family: ${c.GLOBAL_DEFAULT_FONT_FAMILY};
line-height: ${c.QUEUE_ROW_HEIGHT}px;
flex-shrink: 0;
background-image: ${({ isFts }) => isFts ? `url(${star})` : null};
Expand Down Expand Up @@ -427,11 +427,11 @@ export const QueueRow = ({ runInfo }) => {
</StyledQueueRow>;
};

const QueueWrap = styled.div<{ hasFeatured: boolean }>`
const QueueWrap = styled.div<{ hasFeatured: boolean; variant: "vertical" | "horizontal" }>`
width: 100%;
height: 100%;
position: absolute;
background-color: ${c.QUEUE_BACKGROUND_COLOR};
background-color: ${({ variant }) => variant === "horizontal" ? c.QUEUE_HORIZONTAL_BACKGROUND_COLOR : c.QUEUE_BACKGROUND_COLOR};
background-repeat: no-repeat;
border-radius: ${c.GLOBAL_BORDER_RADIUS};
border-top-right-radius: ${props => props.hasFeatured ? "0" : c.GLOBAL_BORDER_RADIUS};
Expand All @@ -458,7 +458,7 @@ const HorizontalRowsContainer = styled.div`
const QueueHeader = styled.div`
font-size: ${c.QUEUE_HEADER_FONT_SIZE};
font-weight: ${c.GLOBAL_DEFAULT_FONT_WEIGHT_BOLD};
font-family: ${c.GLOBAL_DEFAULT_FONT_FAMILY};
font-family: ${c.GLOBAL_DEFAULT_FONT_FAMILY};
line-height: ${c.QUEUE_HEADER_LINE_HEIGHT};
color: white;
width: fit-content;
Expand Down Expand Up @@ -562,7 +562,7 @@ const QueueComponent = (VARIANT: "vertical" | "horizontal") => ({ location, shou
return (
<>
<HorizontalFeatured runInfo={featured}/>
<QueueWrap hasFeatured={!!featured}>
<QueueWrap hasFeatured={!!featured} variant={VARIANT}>
<QueueHeader ref={(el) => (el != null) && setHeaderWidth(el.getBoundingClientRect().width)}>
<Title>
{c.QUEUE_TITLE}
Expand Down
1 change: 1 addition & 0 deletions src/frontend/overlay/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ config.QUEUE_HORIZONTAL_ROW_X_PADDING = config.QUEUE_WRAP_PADDING; // px
config.QUEUE_OPACITY = 0.95;
config.QUEUE_FEATURED_RUN_ASPECT = 16 / 9;
config.QUEUE_BACKGROUND_COLOR = config.CONTEST_COLOR;
config.QUEUE_HORIZONTAL_BACKGROUND_COLOR = config.QUEUE_BACKGROUND_COLOR;
config.QUEUE_ROW_PROBLEM_LABEL_WIDTH = 28; // px
config.QUEUE_HEADER_FONT_SIZE = "32px";
config.QUEUE_HEADER_LINE_HEIGHT = "44px";
Expand Down
Loading