Logo
Explore Help
Register Sign In
cameleer/cameleer-saas
2
0
Fork 0
You've already forked cameleer-saas
Code Issues 24 Pull Requests Actions Packages Projects Releases Wiki Activity
Files
186f7639add07276380aab308b8a9590dba04348
cameleer-saas/ui/src/utils/slug.ts

11 lines
264 B
TypeScript
Raw Normal View History

feat: per-app resource limits, auto-slug, and polished create dialogs Add per-app memory limit and CPU shares (stored on AppEntity, used by DeploymentService with fallback to global defaults). JAR upload is now optional at creation time. Both create modals show the computed slug in the dialog title and use consistent Cancel-left/Action-right button layout with inline styles to avoid Modal CSS conflicts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:53:57 +02:00
/** Derive a URL-friendly slug from a display name. */
export function toSlug(name: string): string {
return name
.toLowerCase()
.trim()
.replace(/[^a-z0-9\s-]/g, '')
.replace(/[\s]+/g, '-')
.replace(/-+/g, '-')
.replace(/^-|-$/g, '');
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 52ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API