Skip to content

Commit 64501ae

Browse files
committed
chore: icon color cleanup
The icons should not be using hard-coded color values. Bootc status icon switched to using the appropriate color variables. The red is a little bright and we lose the sky blue for building :( but these are the correct colors and now match Podman Desktop. Disk image icon uses #fff since the mask should be pure FFF (should not have been using the palette in the first place). Part of #975. Signed-off-by: Tim deBoer <[email protected]>
1 parent 0b8d634 commit 64501ae

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

packages/frontend/src/lib/BootcStatusIcon.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**********************************************************************
2-
* Copyright (C) 2024 Red Hat, Inc.
2+
* Copyright (C) 2024-2025 Red Hat, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ test('Expect running status to display correct background color', async () => {
2929
const icon = screen.getByRole('status');
3030
expect(icon).toBeInTheDocument();
3131
expect(icon).toHaveAttribute('title', status);
32-
expect(icon).toHaveClass('bg-sky-400');
32+
expect(icon).toHaveClass('bg-[var(--pd-status-created)]');
3333
});
3434

3535
test('Expect success status to display green background', async () => {
@@ -38,7 +38,7 @@ test('Expect success status to display green background', async () => {
3838
const icon = screen.getByRole('status');
3939
expect(icon).toBeInTheDocument();
4040
expect(icon).toHaveAttribute('title', status);
41-
expect(icon).toHaveClass('bg-green-600');
41+
expect(icon).toHaveClass('bg-[var(--pd-status-running)]');
4242
});
4343

4444
test('Expect error status to display red background', async () => {
@@ -47,7 +47,7 @@ test('Expect error status to display red background', async () => {
4747
const icon = screen.getByRole('status');
4848
expect(icon).toBeInTheDocument();
4949
expect(icon).toHaveAttribute('title', status);
50-
expect(icon).toHaveClass('bg-red-600');
50+
expect(icon).toHaveClass('bg-[var(--pd-status-terminated)]');
5151
});
5252

5353
test('If running, creating or deleting, expect an svg which is the spinner', async () => {
@@ -64,5 +64,5 @@ test('Expect lost status to display amber background', async () => {
6464
const icon = screen.getByRole('status');
6565
expect(icon).toBeInTheDocument();
6666
expect(icon).toHaveAttribute('title', status);
67-
expect(icon).toHaveClass('bg-amber-600');
67+
expect(icon).toHaveClass('bg-[var(--pd-status-degraded)]');
6868
});

packages/frontend/src/lib/BootcStatusIcon.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ $: solid =
2121
<div class="grid place-content-center" style="position:relative">
2222
<div
2323
class="grid place-content-center rounded-sm aspect-square text-xs"
24-
class:bg-green-600={status === 'success'}
25-
class:bg-sky-400={status === 'running'}
26-
class:bg-red-600={status === 'error'}
27-
class:bg-amber-600={status === 'lost'}
24+
class:bg-[var(--pd-status-running)]={status === 'success'}
25+
class:bg-[var(--pd-status-created)]={status === 'running'}
26+
class:bg-[var(--pd-status-terminated)]={status === 'error'}
27+
class:bg-[var(--pd-status-degraded)]={status === 'lost'}
2828
class:p-0.5={!solid}
2929
class:p-1={solid}
30-
class:border-gray-700={!solid}
30+
class:border-[var(--pd-status-not-running)]={!solid}
3131
class:text-[var(--pd-status-not-running)]={!solid}
3232
class:text-[var(--pd-status-contrast)]={solid}
3333
role="status"

packages/frontend/src/lib/DiskImageIcon.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export let solid = true;
3535
</g>
3636
<defs>
3737
<clipPath id="clip0_48_55">
38-
<rect width="15" height="16" fill="white" transform="matrix(-1 0 0 1 15 0)"></rect>
38+
<rect width="15" height="16" fill="#fff" transform="matrix(-1 0 0 1 15 0)"></rect>
3939
</clipPath>
4040
</defs>
4141
{:else}
@@ -52,7 +52,7 @@ export let solid = true;
5252
</g>
5353
<defs>
5454
<clipPath id="clip0_48_54">
55-
<rect width="14.5263" height="16" fill="white" transform="matrix(-1 0 0 1 15.5263 0)"></rect>
55+
<rect width="14.5263" height="16" fill="#fff" transform="matrix(-1 0 0 1 15.5263 0)"></rect>
5656
</clipPath>
5757
</defs>
5858
{/if}

0 commit comments

Comments
 (0)