前端极简黑白重设计,并纳入客户端注册、站点设置与后台相关改动
- storefront 全站改为极简黑白配色:直角、细线分隔、卡片 hover 浅底、深色模式(跟随系统+手动切换) - 抽出 storefront/partials/card 复用卡片 - 一并提交此前暂存的客户端注册 API、站点设置、后台页面与测试 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -155,7 +155,7 @@ class VersionPublishService
|
||||
throw new RuntimeException('manifest slug does not match package slug');
|
||||
}
|
||||
|
||||
if (!preg_match('/^[A-Za-z][A-Za-z0-9]*$/', (string) ($manifest['slug'] ?? ''))) {
|
||||
if (!$this->isValidSlug((string) ($manifest['slug'] ?? ''))) {
|
||||
throw new RuntimeException('manifest slug format invalid');
|
||||
}
|
||||
|
||||
@@ -213,6 +213,11 @@ class VersionPublishService
|
||||
return $base === '' ? $path : $base . $path;
|
||||
}
|
||||
|
||||
private function isValidSlug(string $slug): bool
|
||||
{
|
||||
return preg_match('/^[A-Za-z][A-Za-z0-9_-]{0,63}$/', $slug) === 1;
|
||||
}
|
||||
|
||||
private function assertTopLevelStructure(array $topLevel, array $allowedTopLevel, string $message): void
|
||||
{
|
||||
$topLevelNames = array_keys($topLevel);
|
||||
|
||||
Reference in New Issue
Block a user