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

Fix error color contrast in dark theme #2778

Merged
merged 2 commits into from
Nov 9, 2023
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
3 changes: 2 additions & 1 deletion web/src/components/atomic/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
color === 'gray',
'bg-wp-control-ok-100 hover:bg-wp-control-ok-200 border-wp-control-ok-300 text-white': color === 'green',
'bg-wp-control-info-100 hover:bg-wp-control-info-200 border-wp-control-info-300 text-white': color === 'blue',
'bg-wp-control-error-100 hover:bg-wp-control-error-200 border-wp-control-error-300 text-white': color === 'red',
'bg-wp-control-error-100 hover:bg-wp-control-error-200 border-wp-control-error-300 text-white dark:text-dark-300':
color === 'red',
...passedClasses,
}"
:title="title"
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/form/RadioField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const id = (Math.random() + 1).toString(36).substring(7);
display: block;
top: 50%;
left: 50%;
width: 7px;
height: 7px;
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
transform: translate(-50%, -50%);
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/repo/settings/ActionsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<div class="flex flex-wrap items-center">
<Button
class="mr-4 my-1"
color="blue"
start-icon="heal"
:is-loading="isRepairingRepo"
:text="$t('repo.settings.actions.repair.repair')"
Expand All @@ -13,7 +12,6 @@
<Button
v-if="isActive"
class="mr-4 my-1"
color="blue"
start-icon="turn-off"
:is-loading="isDeactivatingRepo"
:text="$t('repo.settings.actions.disable.disable')"
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- TODO: Should use vue notifications. -->
<div
v-if="errorMessage"
class="bg-wp-control-error-100 border-l-6 border-l-wp-control-error-300 text-white p-4 rounded-md"
class="bg-wp-control-error-100 border-l-6 border-l-wp-control-error-300 text-white dark:text-dark-300 p-4 rounded-md"
>
{{ errorMessage }}
</div>
Expand Down
8 changes: 4 additions & 4 deletions web/windi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ export default defineConfig({
300: colors.red[900],
},
'int-wp-control-error-dark': {
100: tinycolor(colors.red[700]).desaturate(25).toString(),
200: tinycolor(colors.red[800]).desaturate(25).toString(),
300: tinycolor(colors.red[900]).desaturate(25).toString(),
100: tinycolor(colors.red[700]).saturate(100).brighten(40).toString(),
200: tinycolor(colors.red[800]).saturate(80).brighten(30).toString(),
300: tinycolor(colors.red[900]).saturate(80).brighten(30).toString(),
},

'int-wp-state-error': {
100: colors.red[700],
},
'int-wp-state-error-dark': {
100: tinycolor(colors.red[700]).desaturate(25).toString(),
100: tinycolor(colors.red[700]).saturate(100).brighten(40).toString(),
},
'int-wp-state-neutral': {
100: colors.gray[600],
Expand Down