fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
+2 -8
View File
@@ -13,12 +13,10 @@ class UiStyleService
$prefs = Preferences::query()->where('user_id', $userId)->first();
if ($prefs) {
$prefs->fill($updates)->save();
return $prefs->fresh();
}
$updates['user_id'] = $userId;
return Preferences::query()->create($updates);
}
@@ -61,7 +59,6 @@ class UiStyleService
private function sanitizePaletteKey(?string $value): ?string
{
$value = trim((string) $value);
return $value === '' ? null : $value;
}
@@ -71,7 +68,6 @@ class UiStyleService
if (in_array($mode, ['light', 'dark', 'auto'], true)) {
return $mode;
}
return 'auto';
}
@@ -82,19 +78,17 @@ class UiStyleService
return null;
}
if ($h[0] !== '#') {
$h = '#'.$h;
$h = '#' . $h;
}
if (preg_match('/^#([0-9a-fA-F]{3})$/', $h, $m)) {
$r = $m[1][0];
$g = $m[1][1];
$b = $m[1][2];
return strtoupper('#'.$r.$r.$g.$g.$b.$b);
return strtoupper('#' . $r . $r . $g . $g . $b . $b);
}
if (preg_match('/^#([0-9a-fA-F]{6})$/', $h)) {
return strtoupper($h);
}
return null;
}
}