feat: add worker operations and fix gitea actions
Some checks failed
docker-images / build-and-push (admin, admin, termi-astro-admin, admin/Dockerfile) (push) Successful in 29s
docker-images / build-and-push (backend, backend, termi-astro-backend, backend/Dockerfile) (push) Successful in 33m13s
docker-images / build-and-push (frontend, frontend, termi-astro-frontend, frontend/Dockerfile) (push) Successful in 58s
ui-regression / playwright-regression (push) Failing after 13m24s

This commit is contained in:
2026-04-02 03:43:37 +08:00
parent ee0bec4a78
commit a516be2e91
37 changed files with 3890 additions and 879 deletions

View File

@@ -47,6 +47,51 @@ export function resolveFileRef(ref: string): string {
return `/uploads/${ref}`;
}
function resolveTaxonomyToken(
value:
| string
| null
| undefined
| {
slug?: string | null;
name?: string | null;
},
): string {
if (typeof value === 'string') {
return value.trim();
}
return (value?.slug || value?.name || '').trim();
}
export function buildCategoryUrl(
value:
| string
| null
| undefined
| {
slug?: string | null;
name?: string | null;
},
): string {
const token = resolveTaxonomyToken(value);
return token ? `/categories/${encodeURIComponent(token)}` : '/categories';
}
export function buildTagUrl(
value:
| string
| null
| undefined
| {
slug?: string | null;
name?: string | null;
},
): string {
const token = resolveTaxonomyToken(value);
return token ? `/tags/${encodeURIComponent(token)}` : '/tags';
}
/**
* Generate a unique ID
*/