fix: save button

This commit is contained in:
2026-03-22 16:52:23 +01:00
parent 72311ddb97
commit 2d9ca44c26
4 changed files with 19 additions and 5 deletions

View File

@@ -32,12 +32,15 @@ $resolveToneClass = static function (string $tone, string $detailActionKind, str
if (in_array($normalizedActionKind, ['delete', 'danger', 'purge', 'revoke'], true)) {
return 'app-action-danger';
}
if (in_array($normalizedActionKind, ['save', 'save-close', 'create', 'create-close'], true)) {
return 'app-action-success';
}
$normalizedName = strtolower(trim($name));
$normalizedValue = strtolower(trim($value));
if (
$normalizedName === 'action'
&& in_array($normalizedValue, ['create', 'create_close', 'save_close'], true)
&& in_array($normalizedValue, ['create', 'create_close', 'save', 'save_close'], true)
) {
return 'app-action-success';
}

View File

@@ -43,12 +43,15 @@ $resolveToneClass = static function (string $tone, string $detailActionKind, str
if (in_array($normalizedActionKind, ['delete', 'danger', 'purge', 'revoke'], true)) {
return 'app-action-danger';
}
if (in_array($normalizedActionKind, ['save', 'save-close', 'create', 'create-close'], true)) {
return 'app-action-success';
}
$normalizedName = strtolower(trim($name));
$normalizedValue = strtolower(trim($value));
if (
$normalizedName === 'action'
&& in_array($normalizedValue, ['create', 'create_close', 'save_close'], true)
&& in_array($normalizedValue, ['create', 'create_close', 'save', 'save_close'], true)
) {
return 'app-action-success';
}