Merge pull request #7306 from firefly-iii/improve-contrast

Improved contrast for dark mode
This commit is contained in:
James Cole
2023-04-01 07:09:59 +02:00
committed by GitHub
19 changed files with 66 additions and 29 deletions

View File

@@ -83,13 +83,13 @@ class Amount
if (true === $coloured) {
if (1 === bccomp($rounded, '0')) {
return sprintf('<span class="text-success">%s</span>', $result);
return sprintf('<span class="text-success money-positive">%s</span>', $result);
}
if (-1 === bccomp($rounded, '0')) {
return sprintf('<span class="text-danger">%s</span>', $result);
return sprintf('<span class="text-danger money-negative">%s</span>', $result);
}
return sprintf('<span style="color:#999">%s</span>', $result);
return sprintf('<span class="money-neutral">%s</span>', $result);
}
return $result;

View File

@@ -97,7 +97,7 @@ class TransactionGroupTwig extends AbstractExtension
$result = app('amount')->formatFlat($array['currency_symbol'], (int)$array['currency_decimal_places'], $amount, $colored);
if ($type === TransactionType::TRANSFER) {
$result = sprintf('<span class="text-info">%s</span>', $result);
$result = sprintf('<span class="text-info money-transfer">%s</span>', $result);
}
return $result;
@@ -151,7 +151,7 @@ class TransactionGroupTwig extends AbstractExtension
}
$result = app('amount')->formatFlat($array['foreign_currency_symbol'], (int)$array['foreign_currency_decimal_places'], $amount, $colored);
if ($type === TransactionType::TRANSFER) {
$result = sprintf('<span class="text-info">%s</span>', $result);
$result = sprintf('<span class="text-info money-transfer">%s</span>', $result);
}
return $result;
@@ -203,7 +203,7 @@ class TransactionGroupTwig extends AbstractExtension
}
$result = app('amount')->formatFlat($currency->symbol, (int)$currency->decimal_places, $amount, $colored);
if ($type === TransactionType::TRANSFER) {
$result = sprintf('<span class="text-info">%s</span>', $result);
$result = sprintf('<span class="text-info money-transfer">%s</span>', $result);
}
return $result;
@@ -246,7 +246,7 @@ class TransactionGroupTwig extends AbstractExtension
}
$result = app('amount')->formatFlat($currency->symbol, (int)$currency->decimal_places, $amount, $colored);
if ($type === TransactionType::TRANSFER) {
$result = sprintf('<span class="text-info">%s</span>', $result);
$result = sprintf('<span class="text-info money-transfer">%s</span>', $result);
}
return $result;