This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
a1e8da40
Commit
a1e8da40
authored
4 years ago
by
Daniel Rainer
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused dependency from navbar component
parent
b04608cc
2 merge requests
!17
Initial Merge to Prepare Release 1.0.0
,
!3
Component refactoring
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/webapp/app/layouts/navbar/navbar.component.ts
+16
-29
16 additions, 29 deletions
src/main/webapp/app/layouts/navbar/navbar.component.ts
with
16 additions
and
29 deletions
src/main/webapp/app/layouts/navbar/navbar.component.ts
+
16
−
29
View file @
a1e8da40
...
...
@@ -4,8 +4,6 @@ import { Router } from '@angular/router';
import
{
JhiLanguageService
}
from
'
ng-jhipster
'
;
import
{
SessionStorageService
}
from
'
ngx-webstorage
'
;
import
{
SearchComponent
}
from
'
app/shared/search/search.component
'
;
import
{
VERSION
}
from
'
app/app.constants
'
;
import
{
LANGUAGES
}
from
'
app/core/language/language.constants
'
;
import
{
AccountService
}
from
'
app/core/auth/account.service
'
;
...
...
@@ -14,7 +12,6 @@ import { ProfileService } from 'app/layouts/profiles/profile.service';
import
{
OAuth2ConfigService
}
from
'
app/core/auth/oauth2-config.service
'
;
import
{
OAuth2Config
}
from
'
app/core/auth/oauth2-config.model
'
;
import
{
Location
}
from
'
@angular/common
'
;
@
Component
({
...
...
@@ -37,30 +34,27 @@ export class NavbarComponent implements OnInit {
rememberMe
:
[
false
],
});
public
configs
:
OAuth2Config
[]
;
public
configs
:
OAuth2Config
[];
constructor
(
private
loginService
:
LoginService
,
public
searchComponent
:
SearchComponent
,
private
languageService
:
JhiLanguageService
,
private
sessionStorage
:
SessionStorageService
,
private
accountService
:
AccountService
,
private
fb
:
FormBuilder
,
// private loginModalService: LoginModalService,
private
fb
:
FormBuilder
,
// private loginModalService: LoginModalService,
private
profileService
:
ProfileService
,
private
router
:
Router
,
private
location
:
Location
,
// for redirect in OAuth2
public
oAuth2ConfigService
:
OAuth2ConfigService
)
{
this
.
configs
=
[];
this
.
oAuth2ConfigService
.
getAllConfigs
().
subscribe
(
(
loadedConfigs
:
OAuth2Config
[])
=>
{
this
.
configs
=
loadedConfigs
;
});
public
oAuth2ConfigService
:
OAuth2ConfigService
)
{
this
.
configs
=
[];
this
.
oAuth2ConfigService
.
getAllConfigs
().
subscribe
((
loadedConfigs
:
OAuth2Config
[])
=>
{
this
.
configs
=
loadedConfigs
;
});
this
.
version
=
VERSION
?
(
VERSION
.
toLowerCase
().
startsWith
(
'
v
'
)
?
VERSION
:
'
v
'
+
VERSION
)
:
''
;
this
.
version
=
VERSION
?
(
VERSION
.
toLowerCase
().
startsWith
(
'
v
'
)
?
VERSION
:
'
v
'
+
VERSION
)
:
''
;
}
ngOnInit
():
void
{
...
...
@@ -83,9 +77,9 @@ export class NavbarComponent implements OnInit {
return
this
.
accountService
.
isAuthenticated
();
}
// login(): void {
// this.loginModalService.open();
// }
// login(): void {
// this.loginModalService.open();
// }
login
():
void
{
this
.
loginService
...
...
@@ -109,17 +103,11 @@ export class NavbarComponent implements OnInit {
);
}
loginWithGitLab
(
registrationId
:
string
):
void
{
location
.
href
=
`
${
location
.
origin
}${
this
.
location
.
prepareExternalUrl
(
'
oauth2/authorization/
'
+
registrationId
)}
`
;
loginWithGitLab
(
registrationId
:
string
):
void
{
location
.
href
=
`
${
location
.
origin
}${
this
.
location
.
prepareExternalUrl
(
'
oauth2/authorization/
'
+
registrationId
)}
`
;
// If you have configured multiple OIDC providers, then, you can update this URL to /login.
// It will show a Spring Security generated login page with links to configured OIDC providers.
}
searchChanged
():
void
{
this
.
searchComponent
.
searchChanged
();
}
}
logout
():
void
{
this
.
collapseNavbar
();
...
...
@@ -135,4 +123,3 @@ export class NavbarComponent implements OnInit {
return
this
.
isAuthenticated
()
?
this
.
accountService
.
getImageUrl
()
:
''
;
}
}
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment