Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
passit-frontend
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
50
Issues
50
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
passit
passit-frontend
Commits
e0ab30aa
Commit
e0ab30aa
authored
Nov 25, 2018
by
David Burke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mobile
parent
f8ad0457
Pipeline
#37851947
passed with stages
in 5 minutes and 48 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
1 deletion
+61
-1
src/app/account/account.module.tns.ts
src/app/account/account.module.tns.ts
+4
-0
src/app/account/login/login.component.tns.html
src/app/account/login/login.component.tns.html
+0
-1
src/app/account/login/login.component.tns.ts
src/app/account/login/login.component.tns.ts
+39
-0
src/app/account/login/tns-login-effects.tns.ts
src/app/account/login/tns-login-effects.tns.ts
+18
-0
No files found.
src/app/account/account.module.tns.ts
View file @
e0ab30aa
...
...
@@ -34,6 +34,8 @@ import {
ChangePasswordComponent
,
ChangePasswordContainer
}
from
"
./change-password
"
;
import
{
TNSLoginEffects
}
from
"
./login/tns-login-effects
"
;
import
{
MobileMenuModule
}
from
"
../mobile-menu
"
;
export
const
COMPONENTS
=
[
LoginContainer
,
...
...
@@ -60,9 +62,11 @@ export const SERVICES = [BackupCodePdfService, UserService, ConfirmEmailGuard];
NgrxFormsModule
,
SharedModule
,
ProgressIndicatorModule
,
MobileMenuModule
,
StoreModule
.
forFeature
(
"
account
"
,
reducers
),
EffectsModule
.
forFeature
([
LoginEffects
,
TNSLoginEffects
,
LoginFormEffects
,
RegisterEffects
,
ConfirmEmailEffects
,
...
...
src/app/account/login/login.component.tns.html
View file @
e0ab30aa
...
...
@@ -31,7 +31,6 @@
returnKeyType=
"next"
[isFormSubmitted]=
"form.isSubmitted"
[ngrxFormControl]=
"form.controls.email"
(returnPress)=
"focusPassword()"
></app-text-field>
<Label
...
...
src/app/account/login/login.component.tns.ts
0 → 100644
View file @
e0ab30aa
import
{
Component
,
EventEmitter
,
Input
,
Output
,
ViewChild
,
ElementRef
}
from
"
@angular/core
"
;
import
{
FormGroupState
,
MarkAsSubmittedAction
}
from
"
ngrx-forms
"
;
import
{
ActionsSubject
}
from
"
@ngrx/store
"
;
import
{
ILoginForm
}
from
"
./interfaces
"
;
@
Component
({
selector
:
"
login-component
"
,
moduleId
:
module
.
id
,
templateUrl
:
"
./login.component.html
"
,
styleUrls
:
[
"
../shared/auth.styles.css
"
]
})
export
class
LoginComponent
{
@
Input
()
form
:
FormGroupState
<
ILoginForm
>
;
@
Input
()
errorMessage
:
string
;
@
Input
()
hasLoginStarted
:
boolean
;
@
Input
()
hasLoginFinished
:
boolean
;
@
Output
()
login
=
new
EventEmitter
<
ILoginForm
>
();
@
Output
()
goToRegister
=
new
EventEmitter
();
@
ViewChild
(
"
password
"
)
password
:
ElementRef
;
constructor
(
private
actionsSubject
:
ActionsSubject
)
{}
onSubmit
()
{
if
(
this
.
form
.
isValid
)
{
this
.
login
.
emit
();
}
else
if
(
this
.
form
.
isUnsubmitted
)
{
this
.
actionsSubject
.
next
(
new
MarkAsSubmittedAction
(
this
.
form
.
id
));
}
}
}
src/app/account/login/tns-login-effects.tns.ts
0 → 100644
View file @
e0ab30aa
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
Effect
,
Actions
,
ofType
}
from
"
@ngrx/effects
"
;
import
{
AccountActionTypes
}
from
"
../account.actions
"
;
import
{
RouterExtensions
}
from
"
nativescript-angular/router
"
;
import
{
tap
}
from
"
rxjs/operators
"
;
@
Injectable
()
export
class
TNSLoginEffects
{
@
Effect
({
dispatch
:
false
})
loginSuccess$
=
this
.
actions$
.
pipe
(
ofType
(
AccountActionTypes
.
LOGIN_SUCCESS
),
tap
(()
=>
{
this
.
router
.
navigate
([
"
/list
"
],
{
clearHistory
:
true
});
})
);
constructor
(
private
actions
$
:
Actions
,
private
router
:
RouterExtensions
)
{}
}
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