Line

ui/client/features/directory-browser/domain/DirectoryListing

Cockpit client (features), v0.9. Source: ui/client/features/directory-browser/domain/DirectoryListing.tsx.

Functions#

badgesFor()#

badgesFor(flags): DirBadge[]

Defined in: ui/client/features/directory-browser/domain/DirectoryListing.tsx:6

Pure mapper: which human-readable marker badges a directory earns. A Construct project (architecture.yml) is the strongest signal; a folder without one says so plainly ("not a Construct project yet", #568), and React / plain package.json are shown alongside so a human can tell what they are about to pick.

Parameters#

flags

Pick<RawDirEntry, "isConstructProject" | "isReact" | "hasPackageJson">

Returns#

DirBadge[]


toEntryView()#

toEntryView(entry): DirEntryView

Defined in: ui/client/features/directory-browser/domain/DirectoryListing.tsx:15

Parameters#

entry

RawDirEntry

Returns#

DirEntryView


toListingView()#

toListingView(raw): DirListingView

Defined in: ui/client/features/directory-browser/domain/DirectoryListing.tsx:20

Maps the server listing to what the presentational list renders.

Parameters#

raw

RawDirListing

Returns#

DirListingView