Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ARSnova
arsnova-lite
Commits
0827e401
Commit
0827e401
authored
Sep 30, 2019
by
Lukas Mauß
Committed by
Klaus-Dieter Quibeldey-Cirkel
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Do not show the registration form, but let the session creator continue as a guest."
parent
d26f8375
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
35 deletions
+8
-35
src/app/components/home/new-landing/new-landing.component.ts
src/app/components/home/new-landing/new-landing.component.ts
+3
-27
src/app/components/shared/login/login.component.html
src/app/components/shared/login/login.component.html
+4
-7
src/app/components/shared/login/login.component.scss
src/app/components/shared/login/login.component.scss
+1
-1
No files found.
src/app/components/home/new-landing/new-landing.component.ts
View file @
0827e401
...
...
@@ -7,7 +7,6 @@ import { LanguageService } from '../../../services/util/language.service';
import
{
AuthenticationService
}
from
'
../../../services/http/authentication.service
'
;
import
{
User
}
from
'
../../../models/user
'
;
import
{
UserRole
}
from
'
../../../models/user-roles.enum
'
;
import
{
LoginComponent
}
from
'
../../shared/login/login.component
'
;
@
Component
({
selector
:
'
app-new-landing
'
,
...
...
@@ -33,18 +32,9 @@ export class NewLandingComponent implements OnInit {
createSession
()
{
if
(
!
this
.
user
)
{
this
.
openLoginDialog
();
return
;
}
else
if
(
this
.
user
.
role
===
0
)
{
if
(
this
.
user
.
isGuest
)
{
this
.
authenticationService
.
logout
();
this
.
authenticationService
.
guestLogin
(
1
).
subscribe
(
login
=>
{
this
.
openCreateRoomDialog
();
});
}
else
{
this
.
authenticationService
.
logout
();
this
.
openLoginDialog
();
}
this
.
authenticationService
.
guestLogin
(
UserRole
.
CREATOR
).
subscribe
(
()
=>
{
this
.
openCreateRoomDialog
();
});
}
else
{
this
.
openCreateRoomDialog
();
}
...
...
@@ -56,20 +46,6 @@ export class NewLandingComponent implements OnInit {
});
}
openLoginDialog
():
void
{
const
dialogRef
=
this
.
dialog
.
open
(
LoginComponent
,
{
width
:
'
350px
'
});
dialogRef
.
componentInstance
.
role
=
UserRole
.
CREATOR
;
dialogRef
.
componentInstance
.
isStandard
=
false
;
dialogRef
.
afterClosed
()
.
subscribe
(
result
=>
{
if
(
this
.
user
)
{
this
.
openCreateRoomDialog
();
}
});
}
cookiesDisabled
():
boolean
{
return
localStorage
.
getItem
(
'
cookieAccepted
'
)
===
'
false
'
;
}
...
...
src/app/components/shared/login/login.component.html
View file @
0827e401
<div
fxLayout=
"column"
fxLayoutAlign=
"space-around"
>
<button
id=
"focus_button_guest"
(click)=
"guestLogin()"
class=
"guest"
mat-flat-button
type=
"button"
aria-labelledby=
"guest-login-description"
matTooltip=
"{{'login.guest-login-tooltip' | translate}}"
>
{{ 'login.guest-login' | translate }}
</button>
</div>
<mat-divider></mat-divider>
<form
fxLayout=
"column"
fxLayoutGap=
"10px"
...
...
@@ -32,6 +25,10 @@
<button
id=
"focus_button_user"
class=
"login"
mat-flat-button
type=
"submit"
aria-labelledby=
"login-description"
>
{{ 'login.login' | translate }}
</button>
<button
id=
"focus_button_guest"
(click)=
"guestLogin()"
class=
"guest"
mat-flat-button
type=
"button"
aria-labelledby=
"guest-login-description"
matTooltip=
"{{'login.guest-login-tooltip' | translate}}"
>
{{ 'login.guest-login' | translate }}
</button>
<div
class=
"forgot-password"
>
<a
href=
""
...
...
src/app/components/shared/login/login.component.scss
View file @
0827e401
...
...
@@ -10,7 +10,7 @@
.guest
{
background-color
:
var
(
--
primary
);
color
:
var
(
--
on-primary
);
margin
:
10px
0
20px
0
!
important
;
margin
-bottom
:
10px
;
}
.login
{
...
...
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