Skip to content

Commit 4d804e5

Browse files
committed
WIP FEATURE: Configuration ui tab rendering
1 parent 1a92265 commit 4d804e5

File tree

8 files changed

+191
-63
lines changed

8 files changed

+191
-63
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Neos.Neos.Module.Administration.ConfigurationController.index = Neos.Fusion:Component {
2+
/// array
3+
flashMessages = ${flashMessages}
4+
5+
/// Neos\Flow\I18n\EelHelper\TranslationParameterToken
6+
i18n = ${I18n.id('').source('Main').package('Neos.Workspace.Ui')}
7+
8+
/// string
9+
type = ${type}
10+
11+
/// string[]
12+
availableConfigurationTypes = ${availableConfigurationTypes}
13+
14+
// array
15+
configuration = ${configuration}
16+
17+
// array
18+
validationResult = ${validationResult}
19+
20+
renderer = afx`
21+
<Neos.Workspace.Ui:Component.ModuleWrapper
22+
flashMessages={props.flashMessages}
23+
>
24+
<main class="neos-content neos-container-fluid">
25+
<div class="neos-row-fluid">
26+
<Neos.Neos:Common.SubNavigation>
27+
<Neos.Fusion:Loop items={props.availableConfigurationTypes} @if={request.format != 'htmx'}>
28+
<Neos.Neos:Component.LinkButton
29+
label={item}
30+
isActive={item == props.type ? 'page' : null}
31+
>
32+
<Neos.Fusion:ActionUri
33+
@path="attributes.href"
34+
controller="Module\\Administration\\Configuration"
35+
action="index"
36+
format="html"
37+
arguments.type={item}
38+
/>
39+
</Neos.Neos:Component.LinkButton>
40+
</Neos.Fusion:Loop>
41+
</Neos.Neos:Common.SubNavigation>
42+
<Neos.Neos:Common.Container>
43+
<Neos.Neos:Component.ConfigurationTabContent
44+
type={props.type}
45+
configuration={props.configuration}
46+
validationResult={props.validationResult}
47+
/>
48+
</Neos.Neos:Common.Container>
49+
</div>
50+
</main>
51+
<Neos.Workspace.Ui:Component.Footer>
52+
</Neos.Workspace.Ui:Component.Footer>
53+
</Neos.Workspace.Ui:Component.ModuleWrapper>
54+
`
55+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
prototype(Neos.Neos:Component.LinkButton) < prototype(Neos.Fusion:Component) {
2+
/// string
3+
title = ''
4+
/// string
5+
label = ''
6+
/// string
7+
href = ''
8+
/// boolean
9+
isDanger = false
10+
/// boolean
11+
isWarning = false
12+
/// boolean
13+
isPrimary = false
14+
///boolean
15+
isSuccess = false
16+
///boolean
17+
isActive = false
18+
/// string
19+
icon = ''
20+
/// array<string,mixed>
21+
attributes = Neos.Fusion:DataStructure
22+
23+
@private {
24+
classNames = Neos.Fusion:DataStructure {
25+
main = 'neos-button'
26+
danger = ${props.isDanger && 'neos-button-danger'}
27+
warning = ${props.isWarning && 'neos-button-warning'}
28+
primarry = ${props.isPrimary && 'neos-button-primary'}
29+
success = ${props.isSuccess && 'neos-button-success'}
30+
active = ${props.isActive && 'neos-active'}
31+
}
32+
}
33+
34+
renderer = afx`
35+
<a
36+
type="button"
37+
title={props.title}
38+
class={private.classNames}
39+
href={props.href}
40+
aria-current={props.isActive ? 'page' : null}
41+
{...props.attributes}
42+
>
43+
<Neos.Workspace.Ui:Component.Icon icon={props.icon} @if={props.icon}/>
44+
{props.icon ? ' ' : ''}{props.label}
45+
</a>
46+
`
47+
}

Neos.Neos/Resources/Private/Fusion/Backend/Configuration.Ui/Common/SubNavigation.fusion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ prototype(Neos.Neos:Common.SubNavigation) < prototype(Neos.Fusion:Component) {
22
content = ''
33

44
renderer = afx`
5-
<nav class="sub-navigation">
5+
<nav class="neos-flex-row">
66
{props.content}
77
</nav>
88
`
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include: resource://Neos.Fusion/Private/Fusion/Root.fusion
22
include: resource://Neos.Fusion.Form/Private/Fusion/Root.fusion
33
include: resource://Neos.Neos/Private/Fusion/SharedCoreComponents/*
4-
include: resource://Neos.Neos/Private/Fusion/Backend/*
54
include: resource://Neos.Neos/Private/Fusion/*
65
include: resource://Neos.Workspace.Ui/Private/Fusion/*
76
include: **/*

Neos.Neos/Resources/Private/Styles/Modules/Administration/_Configuration.scss

Lines changed: 0 additions & 56 deletions
This file was deleted.

Neos.Neos/Resources/Private/Styles/Modules/_Modules.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
&.neos-module {
2-
@import "Administration/Configuration";
32
@import "Administration/Packages";
43
@import "Administration/Sites";
5-
@import "Administration/Users";
4+
@import "Administration/Users";
65
@import "Management/Workspaces";
76
@include font;
87

Neos.Neos/Resources/Public/Styles/Module.Configuration.Ui.css

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,72 @@
99
.neos-py-2 {
1010
padding-block: 2rem;
1111
}
12+
13+
&.neos-module-administration-configuration {
14+
#configuration {
15+
> ul {
16+
&.neos-tree-container {
17+
display: block;
18+
19+
> li > span {
20+
display: none;
21+
}
22+
23+
.neos-tree-node {
24+
cursor: pointer;
25+
height: auto;
26+
27+
&.neos-tree-folder .neos-tree-title {
28+
user-select: none;
29+
}
30+
31+
.neos-tree-icon {
32+
display: none;
33+
}
34+
35+
.neos-tree-title {
36+
width: calc(100% - 24px);
37+
height: auto;
38+
white-space: normal;
39+
text-align: left;
40+
word-break: break-word;
41+
word-wrap: break-word;
42+
}
43+
}
44+
}
45+
}
46+
47+
.key,
48+
.value {
49+
display: inline;
50+
}
51+
52+
.value {
53+
&.-is-boolean,
54+
&.-is-NULL {
55+
<<<<<<<< Updated upstream:Neos.Neos/Resources/Private/Styles/Modules/Administration/_Configuration.scss
56+
color: $orange;
57+
========
58+
color: var(--orange);
59+
>>>>>>>> Stashed changes:Neos.Neos/Resources/Public/Styles/Module.Configuration.Ui.css
60+
}
61+
62+
&.-is-integer,
63+
&.-is-double {
64+
<<<<<<<< Updated upstream:Neos.Neos/Resources/Private/Styles/Modules/Administration/_Configuration.scss
65+
color: $warning;
66+
}
67+
68+
&.-is-string {
69+
color: $blue;
70+
========
71+
color: var(--warning);
72+
}
73+
74+
&.-is-string {
75+
color: var(--blue);
76+
>>>>>>>> Stashed changes:Neos.Neos/Resources/Public/Styles/Module.Configuration.Ui.css
77+
}
78+
}
79+
}
80+
}

Neos.Workspace.Ui/Resources/Private/Fusion/Common/Presentationals/Button.fusion

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ prototype(Neos.Workspace.Ui:Component.Button) < prototype(Neos.Fusion:Component)
1111
isPrimary = false
1212
///boolean
1313
isSuccess = false
14+
///boolean
15+
isActive = false
1416
/// boolean
1517
disabled = false
1618
/// string
@@ -20,14 +22,27 @@ prototype(Neos.Workspace.Ui:Component.Button) < prototype(Neos.Fusion:Component)
2022
/// array<string,mixed>
2123
attributes = Neos.Fusion:DataStructure
2224

25+
@private {
26+
classNames = Neos.Fusion:DataStructure {
27+
main = 'neos-button'
28+
danger = ${props.isDanger && 'neos-button-danger'}
29+
warning = ${props.isWarning && 'neos-button-warning'}
30+
primarry = ${props.isPrimary && 'neos-button-primary'}
31+
success = ${props.isSuccess && 'neos-button-success'}
32+
active = ${props.isActive && 'neos-active'}
33+
}
34+
}
35+
2336
renderer = afx`
2437
<button
2538
type="button"
2639
title={props.title}
27-
class={['neos-button', props.isDanger && 'neos-button-danger', props.isWarning && 'neos-button-warning', props.isPrimary && 'neos-button-primary', props.isSuccess && 'neos-button-success']}
40+
class={private.classNames}
2841
autofocus
29-
autofocus.@if={props.autofocus}
30-
disabled.@if={props.disabled}
42+
autofocus.@if={!props.isLink && props.autofocus}
43+
disabled
44+
disabled.@if={!props.isLink && props.disabled}
45+
aria-current={props.isActive ? 'page' : null}
3146
{...props.attributes}
3247
>
3348
<Neos.Workspace.Ui:Component.Icon icon={props.icon} @if={props.icon}/>

0 commit comments

Comments
 (0)