-
Notifications
You must be signed in to change notification settings - Fork 34
feat: configurable main page #1903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nitrosx
wants to merge
7
commits into
master
Choose a base branch
from
configurable-main-page
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e1b4a86
added configurable main page
nitrosx 98bdda9
Merge branch 'configuration-singleton' into configurable-main-page
nitrosx 42959fa
added new files and fixed linting
nitrosx 06d9518
resolving issues to get successful tests
nitrosx 85ef21a
Fixed tests for app config
nitrosx 5c30dac
fixed linting
nitrosx 6a62134
Merge branch 'master' into configurable-main-page
nitrosx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// dummy.component.ts | ||
import { Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "app-dummy", | ||
template: ` | ||
<div class="dummy-wrapper"> | ||
<div class="spinner"></div> | ||
<p>Redirecting, please wait...</p> | ||
</div> | ||
`, | ||
styles: [ | ||
` | ||
Comment on lines
+1
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dummy naming is a bit misleading here, which is generally used for mock something |
||
.dummy-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
al0ign-items: center; | ||
justify-content: center; | ||
height: 100vh; | ||
font-family: Arial, sans-serif; | ||
color: #444; | ||
} | ||
|
||
.spinner { | ||
border: 4px solid #f3f3f3; | ||
border-top: 4px solid #3f51b5; | ||
border-radius: 50%; | ||
width: 40px; | ||
height: 40px; | ||
animation: spin 1s linear infinite; | ||
margin-bottom: 10px; | ||
} | ||
|
||
@keyframes spin { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
`, | ||
], | ||
}) | ||
export class DummyComponent {} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Injectable } from "@angular/core"; | ||
import { CanActivate, Router } from "@angular/router"; | ||
import { AppConfigService } from "app-config.service"; | ||
|
||
@Injectable({ providedIn: "root" }) | ||
export class MainPageGuard implements CanActivate { | ||
constructor( | ||
private router: Router, | ||
private appConfigService: AppConfigService, | ||
) {} | ||
|
||
canActivate(): boolean { | ||
const defaultMainPage = this.appConfigService.getConfig().defaultMainPage; | ||
|
||
this.router.navigate([defaultMainPage]); | ||
return false; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it named as DummyComponent? it seems like a reusable loading or buffering component?