Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dad
FFDS-register-front
Commits
f00f48cb
Commit
f00f48cb
authored
Nov 09, 2020
by
cazenave
Browse files
ffds title in setting
parent
c9cb766a
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/app/AppConfiguration.ts
View file @
f00f48cb
...
...
@@ -4,6 +4,7 @@ import { environment } from 'src/environments/environment.prod';
@
Injectable
()
export
class
AppConfiguration
{
title
:
string
;
fdpurl
:
string
;
fdpemail
:
string
;
fdppassword
:
string
;
...
...
src/app/app.component.html
View file @
f00f48cb
...
...
@@ -6,7 +6,7 @@
<a
routerLink=
"/"
routerLinkActive=
"active"
>
<img
width=
"80"
alt=
"Angular Logo"
src=
"assets/images/logo.png"
/>
</a>
<h3
style=
"width: 100%;text-align: center;"
>
<strong>
EOSC-Pillar Federated FAIR Data Space
</strong></h3>
<h3
style=
"width: 100%;text-align: center;"
>
<strong>
{{settingtitle}}
</strong></h3>
<nb-user
style=
"white-space: pre;"
name=
"Paulo Pimenta"
...
...
src/app/app.component.ts
View file @
f00f48cb
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'
@angular/forms
'
;
import
{
NbMenuItem
,
NbSidebarService
}
from
'
@nebular/theme
'
;
import
{
AppConfiguration
}
from
'
./AppConfiguration
'
;
@
Component
({
...
...
@@ -10,7 +11,9 @@ import { NbMenuItem, NbSidebarService } from '@nebular/theme';
})
export
class
AppComponent
{
title
=
'
register-front
'
;
settingtitle
=
this
.
appConfig
.
title
;
items
:
NbMenuItem
[]
=
[
{
title
:
'
Home
'
,
...
...
@@ -67,8 +70,10 @@ export class AppComponent {
},
];
constructor
(
private
readonly
sidebarService
:
NbSidebarService
)
{
}
constructor
(
private
readonly
sidebarService
:
NbSidebarService
,
private
appConfig
:
AppConfiguration
)
{}
toggleSidebar
():
boolean
{
this
.
sidebarService
.
toggle
(
true
);
...
...
src/app/settingfdp/settingfdp.component.html
View file @
f00f48cb
...
...
@@ -2,6 +2,9 @@
<form
[formGroup]=
"Form"
(ngSubmit)=
"SaveFdpSetting()"
>
<div
class=
"form-group"
>
<label>
FFDS Title
<input
matInput
placeholder=
"FFDS title"
type=
"text"
class=
"form-control"
formControlName=
"title"
required
>
</label>
<label>
FAIR data point Url
<input
matInput
placeholder=
"fdp url http://"
type=
"text"
class=
"form-control"
formControlName=
"fdpurl"
required
>
</label>
...
...
src/app/settingfdp/settingfdp.component.ts
View file @
f00f48cb
...
...
@@ -16,6 +16,7 @@ import { environment } from 'src/environments/environment.prod';
export
class
SettingfdpComponent
implements
OnInit
{
Form
=
new
FormGroup
({
title
:
new
FormControl
(),
fdpurl
:
new
FormControl
(),
fdpemail
:
new
FormControl
(),
fdppassword
:
new
FormControl
(),
...
...
@@ -29,6 +30,7 @@ export class SettingfdpComponent implements OnInit {
ngOnInit
()
{
this
.
Form
.
setValue
({
title
:
this
.
appConfig
.
title
,
fdpurl
:
this
.
appConfig
.
fdpurl
,
fdpemail
:
this
.
appConfig
.
fdpemail
,
fdppassword
:
this
.
appConfig
.
fdppassword
...
...
@@ -40,6 +42,7 @@ export class SettingfdpComponent implements OnInit {
let
data
:
string
;
data
=
'
\
{
\n\
"title": "
'
+
this
.
Form
.
value
.
title
+
'
",
\n\
"fdpurl": "
'
+
this
.
Form
.
value
.
fdpurl
+
'
",
\n\
"fdpemail": "
'
+
this
.
Form
.
value
.
fdpemail
+
'
",
\n\
"fdppassword": "
'
+
this
.
Form
.
value
.
fdppassword
+
'
",
\n\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment