-
-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/15 login #187
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
Merged
Merged
Feature/15 login #187
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f3fe7e1
#15 - Refactored navbar component
nathcouret 2de344e
Merge remote-tracking branch 'origin/develop' into feature/15-login
nathcouret 869851f
#15 - Login card with auth token in local storage
nathcouret 428e617
Merge remote-tracking branch 'origin/develop' into feature/15-login
nathcouret 0e6ab86
#15 - remove legacy login page
nathcouret eb556ef
#15 - Add login providers from auth uservice
nathcouret 786aad1
Merge remote-tracking branch 'origin/develop' into feature/15-login
nathcouret 6359460
#15 - improve login dialog design
nathcouret 1709e4e
Merge remote-tracking branch 'origin/develop' into feature/15-login
nathcouret 1f889ab
Merge remote-tracking branch 'origin/develop' into feature/15-login
nathcouret a4efb91
Login dialog gaps
nathcouret c3f9383
Add translations
nathcouret b6521c1
Merge remote-tracking branch 'origin/develop' into feature/15-login
nathcouret 35ae7e8
feature/15 - closeable login dialog on mobile
nathcouret b2850c5
PR feedbacks
nathcouret 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,50 @@ | ||
| <template> | ||
| <v-card> | ||
| <v-card-title>Login</v-card-title> | ||
| <v-divider></v-divider> | ||
| <v-card class="login-card"> | ||
| <v-card-title class="custom-login-card-title"> | ||
| <div>{{ $t('navigation.login.card.title') }}</div> | ||
| <v-btn icon @click="closeHandler" v-if="isMobile"> | ||
| <v-icon>fa-times</v-icon> | ||
| </v-btn> | ||
| </v-card-title> | ||
| <v-card-text> | ||
| <h4>Please select a realm to log in with</h4> | ||
| <provider-block v-for="(provider, name) in providers" | ||
| :provider-name="name" :provider="provider" :key="name"> | ||
| </provider-block> | ||
| </v-card-text> | ||
| <v-card-actions> | ||
| <v-btn color="primary" @click="authEU" depressed> | ||
| EU | ||
| </v-btn> | ||
| <v-btn color="primary" @click="authNA" depressed> | ||
| NA | ||
| </v-btn> | ||
| <v-btn color="primary" @click="authASIA" depressed> | ||
| ASIA | ||
| </v-btn> | ||
| <v-btn color="primary" @click="authRU" depressed> | ||
| CIS | ||
| </v-btn> | ||
| </v-card-actions> | ||
| </v-card> | ||
| </template> | ||
|
|
||
| <script lang="ts"> | ||
| import { Component, Vue } from 'vue-property-decorator' | ||
| import { Component, Emit, Prop, Vue } from 'vue-property-decorator' | ||
| import { namespace } from 'vuex-class' | ||
| import { Namespaces } from '@/store' | ||
| import { AuthenticationActions, JWTRegion } from '@/store/modules/authentication' | ||
| import { AuthenticationActions, AuthenticationGetters } from '@/store/modules/authentication' | ||
| import { Providers } from '@/util/ProvidersUtil' | ||
| import ProviderBlock from '@/components/navigation/login/ProviderBlock.vue' | ||
|
|
||
| const authNamespace = namespace(Namespaces.AUTH) | ||
|
|
||
| @Component({ | ||
| name: 'g-login-card' | ||
| name: 'LoginCard', | ||
| components: { | ||
| ProviderBlock | ||
| } | ||
| }) | ||
| export default class extends Vue { | ||
| @authNamespace.Action(AuthenticationActions.LOGIN_WG) authenticate!: (region: string) => void; | ||
| authEU () { | ||
| this.authenticate(JWTRegion.EU) | ||
| } | ||
| authNA () { | ||
| this.authenticate(JWTRegion.NA) | ||
| } | ||
| authASIA () { | ||
| this.authenticate(JWTRegion.SA) | ||
| } | ||
| authRU () { | ||
| this.authenticate(JWTRegion.RU) | ||
| } | ||
| @authNamespace.Action(AuthenticationActions.LOGIN_WG) authenticate!: (endpoint: string) => void | ||
| @authNamespace.Getter(AuthenticationGetters.PROVIDERS) providers!: Providers | ||
| @Prop({ default: false }) isMobile!: boolean | ||
|
|
||
| @Emit() closeHandler () { | ||
| return null | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| .custom-login-card-title { | ||
| font-weight: bold; | ||
| display: flex; | ||
| justify-content: space-between; | ||
| } | ||
| </style> |
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,50 @@ | ||
| <template> | ||
| <div class="custom-provider-container"> | ||
| <h3>{{providerName}}</h3> | ||
| <v-divider> | ||
bryansamuel1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </v-divider> | ||
| <div class="custom-login-btn-container"> | ||
| <v-btn v-for="entry of entries" @click="authenticate(entry.endpoint)" :key="entry.key" | ||
nathcouret marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| class="login-btn" color="primary"> | ||
| {{entry.key}} | ||
NikoGrano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </v-btn> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script lang="ts"> | ||
|
|
||
| import { Component, Prop, Vue } from 'vue-property-decorator' | ||
| import { AuthenticationActions } from '@/store/modules/authentication' | ||
| import { namespace } from 'vuex-class' | ||
| import { Namespaces } from '@/store' | ||
| import { Provider } from '@/util/ProvidersUtil' | ||
|
|
||
| const authNamespace = namespace(Namespaces.AUTH) | ||
|
|
||
| @Component({ | ||
| name: 'ProviderBlock' | ||
| }) | ||
| export default class extends Vue { | ||
| @Prop() providerName!: string | ||
| @Prop() provider!: Provider | ||
| @authNamespace.Action(AuthenticationActions.LOGIN_WG) authenticate!: (endpoint: string) => void | ||
|
|
||
| get entries () { | ||
| return this.provider.entries | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| <style scoped lang="scss"> | ||
| .custom-login-btn-container { | ||
| margin-top: 5px; | ||
| display: grid; | ||
| grid-template-columns: repeat(4, 1fr); | ||
| grid-column-gap: 5px; | ||
| } | ||
|
|
||
| .custom-provider-container { | ||
| margin-top: 10px; | ||
| } | ||
| </style> | ||
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.
Uh oh!
There was an error while loading. Please reload this page.