Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalWebpage
Commits
ed1d192a
Commit
ed1d192a
authored
Jul 02, 2018
by
Lukas Burgey
Browse files
Make some minor changes
parent
db59f40d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/app/dialogues/profile/profile.component.html
View file @
ed1d192a
...
...
@@ -7,7 +7,7 @@
</ng-container>
<ng-container
matColumnDef=
"info"
>
<mat-header-cell
*matHeaderCellDef
>
Info
</mat-header-cell>
<mat-cell
*matCellDef=
"let element"
>
{{ element.info }}
</mat-cell>
<mat-cell
*matCellDef=
"let element"
>
{{ element.info
| json
}}
</mat-cell>
</ng-container>
<mat-header-row
*matHeaderRowDef=
"columns"
></mat-header-row>
<mat-row
*matRowDef=
"let row; columns: columns;"
></mat-row>
...
...
src/app/login/login.component.html
View file @
ed1d192a
<div>
<span
*ngIf=
"userService.
userState
? false : true"
>
<span
*ngIf=
"userService.
loggedIn()
? false : true"
>
<form
*ngIf=
"idps"
(ngSubmit)=
"userService.login(selectedIdP)"
#loginForm
="
ngForm
"
>
<mat-form-field>
...
...
@@ -12,16 +12,19 @@
<button
mat-raised-button
[disabled]=
"!loginForm.form.valid"
color=
"accent"
type=
"submit"
>
Login
</button>
</form>
</span>
<span
*ngIf=
"userService.
userState
"
>
<span
*ngIf=
"userService.
loggedIn()
"
>
<button
mat-button
mat-icon-button
(click)=
"dialog.openAccount()"
>
<mat-icon>
settings
</mat-icon>
</button>
<button
mat-button
mat-icon-button
(click)=
"dialog.openSshKeys()"
>
<mat-icon>
vpn_key
</mat-icon>
</button>
<button
mat-button
(click)=
"dialog.openProfile()"
>
<button
*ngIf=
"userService.user != null"
mat-button
(click)=
"dialog.openProfile()"
>
{{ userService.user?.email }}
</button>
<button
*ngIf=
"userService.user == null"
mat-button
(click)=
"dialog.openProfile()"
>
Profile
</button>
<button
mat-raised-button
color=
"accent"
(click)=
"userService.logout()"
>
Logout
</button>
</span>
</div>
src/app/login/login.component.ts
View file @
ed1d192a
...
...
@@ -18,6 +18,7 @@ export class LoginComponent {
public
userService
:
UserService
,
public
dialog
:
DialogService
,
)
{
if
(
!
userService
.
loggedIn
())
{
this
.
userService
.
getIdPPreference
().
subscribe
(
(
allAuthInfo
:
AllAuthInfo
)
=>
{
if
(
allAuthInfo
===
null
)
{
...
...
@@ -27,5 +28,6 @@ export class LoginComponent {
this
.
selectedIdP
=
allAuthInfo
.
selected
;
}
);
}
}
}
src/app/user.service.ts
View file @
ed1d192a
...
...
@@ -251,7 +251,6 @@ export class UserService {
return
this
.
http
.
post
(
'
/backend/api/questionnaire?id=
'
+
String
(
stateItemID
),
answers
).
subscribe
(
(
data
:
t
.
UserState
)
=>
{
this
.
snackBar
.
open
(
'
Uploaded questionnaire
'
);
//this.snackBar.open('Deployed key ' + key.name);
this
.
updateUserState
(
data
);
},
(
err
)
=>
{
...
...
@@ -263,10 +262,12 @@ export class UserService {
}
public
deleteUser
()
{
return
this
.
http
.
delete
(
'
/backend/api/delete_user/
'
).
subscribe
(
(
data
:
t
.
UserState
)
=>
{
this
.
snackBar
.
open
(
'
Deleted user from server
'
);
this
.
updateUserState
(
data
);
return
this
.
http
.
delete
(
'
/backend/api/delete_user
'
).
subscribe
(
(
data
:
{
deleted
:
boolean
})
=>
{
if
(
data
&&
data
.
deleted
)
{
this
.
_logout
();
this
.
snackBar
.
open
(
'
Deleted user from server
'
);
}
},
(
err
)
=>
{
this
.
snackBar
.
open
(
'
Error deleting user from server
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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