-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from cobbler/implement-settings
Cobbler-Frontend: Implement Settings CRUD
- Loading branch information
Showing
31 changed files
with
639 additions
and
361 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
projects/cobbler-frontend/src/app/app-settings/app-settings.component.html
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
projects/cobbler-frontend/src/app/app-settings/app-settings.component.spec.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
projects/cobbler-frontend/src/app/app-settings/app-settings.component.spec.js.map
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
projects/cobbler-frontend/src/app/app-settings/app-settings.component.spec.ts
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
projects/cobbler-frontend/src/app/app-settings/app-settings.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,13 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
|
||
import {CobblerApiService} from 'cobbler-api'; | ||
import {UserService} from './services/user.service'; | ||
import {Component} from '@angular/core'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'], | ||
providers: [ | ||
CobblerApiService, | ||
{provide: 'COBBLER_URL', useFactory: () => { | ||
const value = localStorage.getItem("COBBLER_URL") | ||
if (value) { | ||
return new URL(value); | ||
} | ||
return new URL("http://localhost/cobbler_api") | ||
}}, | ||
UserService | ||
] | ||
providers: [] | ||
}) | ||
export class AppComponent implements OnInit { | ||
userStatus = { | ||
loggedin: false, | ||
}; | ||
|
||
export class AppComponent { | ||
constructor() { | ||
} | ||
|
||
ngOnInit(): void { | ||
const is_user_logged_in = window.sessionStorage.getItem('loggedIn'); | ||
if (is_user_logged_in) { | ||
this.userStatus.loggedin = (is_user_logged_in === 'true'); | ||
window.localStorage.userStatus = this.userStatus; | ||
} | ||
} | ||
} |
Oops, something went wrong.