Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/new-project/domain/NewProjectName

Pure (DOMAIN-001): what the New project form says about the name typed so far.

Cockpit client (features), next. Source: ui/client/features/new-project/domain/NewProjectName.ts.

Variables#

FRAMEWORK_CHOICES#

const FRAMEWORK_CHOICES: ReadonlyArray<{ id: NewProjectFramework; label: string; }>

Defined in: ui/client/features/new-project/domain/NewProjectName.ts:7


MAX_PROJECT_NAME_LENGTH#

const MAX_PROJECT_NAME_LENGTH: 100 = 100

Defined in: ui/client/features/new-project/domain/NewProjectName.ts:5

Functions#

canCreateProject()#

canCreateProject(name, creating): boolean

Defined in: ui/client/features/new-project/domain/NewProjectName.ts:26

Can the button be pressed for this form? (Advice only: the server decides.)

Parameters#

name

string

creating

boolean

Returns#

boolean


projectDestination()#

projectDestination(workspaceRoot, name): string

Defined in: ui/client/features/new-project/domain/NewProjectName.ts:31

Where the project will be made, for the line under the field: <workspace>/<name>.

Parameters#

workspaceRoot

string | null

name

string

Returns#

string


projectNameProblem()#

projectNameProblem(name): string | null

Defined in: ui/client/features/new-project/domain/NewProjectName.ts:13

A plain problem with name as a project name, or null (an empty name is not a problem yet, just not ready).

Parameters#

name

string

Returns#

string | null