Skip to content

Commit 037edfc

Browse files
committed
feat(ionic-authentication): added source code
1 parent 57cada9 commit 037edfc

11 files changed

+226
-0
lines changed

src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './module/ionic-auth-firebase-u-i.module';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<ion-header>
2+
<ion-navbar no-border-bottom>
3+
<ion-title>
4+
Segments
5+
</ion-title>
6+
</ion-navbar>
7+
8+
<ion-toolbar no-border-top>
9+
<ion-segment [(ngModel)]="authType">
10+
<ion-segment-button value="login">
11+
Sign in
12+
</ion-segment-button>
13+
<ion-segment-button value="register">
14+
Register
15+
</ion-segment-button>
16+
<!--<ion-segment-button value="ducklings">-->
17+
<!--Ducklings-->
18+
<!--</ion-segment-button>-->
19+
</ion-segment>
20+
</ion-toolbar>
21+
</ion-header>
22+
23+
<ion-content>
24+
<div [ngSwitch]="authType">
25+
<ion-list *ngSwitchCase="'login'">
26+
<ion-item>
27+
<ion-label floating>
28+
<ion-icon name="mail" padding-right="5px"></ion-icon>
29+
E-mail
30+
</ion-label>
31+
<ion-input type="text" clearInput></ion-input>
32+
</ion-item>
33+
34+
<ion-item>
35+
<ion-label floating>
36+
<ion-icon name="lock" padding-right="5px"></ion-icon>
37+
Password
38+
</ion-label>
39+
<ion-input type="password" clearInput></ion-input>
40+
</ion-item>
41+
42+
<div padding>
43+
<button ion-button color="primary" block>Log in</button>
44+
45+
<div padding>
46+
<button clear ion-button small color="primary" block>Forgot password?</button>
47+
</div>
48+
</div>
49+
</ion-list>
50+
51+
<ion-list *ngSwitchCase="'register'">
52+
<ion-item>
53+
<ion-label floating>
54+
<ion-icon name="contact" padding-right="5px"></ion-icon>
55+
Name
56+
</ion-label>
57+
<ion-input type="text" clearInput></ion-input>
58+
</ion-item>
59+
60+
<ion-item>
61+
<ion-label floating>
62+
<ion-icon name="mail" padding-right="5px"></ion-icon>
63+
E-mail
64+
</ion-label>
65+
<ion-input type="text" clearInput></ion-input>
66+
</ion-item>
67+
68+
<ion-item>
69+
<ion-label floating>
70+
<ion-icon name="lock" padding-right="5px"></ion-icon>
71+
Password
72+
</ion-label>
73+
<ion-input type="password" clearInput></ion-input>
74+
</ion-item>
75+
76+
<div padding>
77+
<button ion-button color="primary" block>Register</button>
78+
79+
<div padding>
80+
<ion-buttons>
81+
<button ion-button icon-only clear block>
82+
<ion-icon name="finger-print"></ion-icon>
83+
</button>
84+
</ion-buttons>
85+
</div>
86+
</div>
87+
88+
</ion-list>
89+
90+
</div>
91+
</ion-content>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ion-auth-firebase-ui {
2+
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import {Component} from '@angular/core';
2+
3+
/**
4+
* Generated class for the IonAuthFirebaseUiComponent component.
5+
*
6+
* See https://angular.io/api/core/Component for more info on Angular
7+
* Components.
8+
*/
9+
@Component({
10+
selector: 'ion-auth-firebaseui',
11+
templateUrl: 'ion-auth-firebaseui.component.html'
12+
})
13+
export class IonAuthFirebaseUiComponent {
14+
15+
authType = 'login';
16+
17+
constructor() {
18+
console.log('Hello IonAuthFirebaseUiComponent Component');
19+
}
20+
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!-- Generated template for the IonAuthFirebaseuiProvidersComponent component -->
2+
<div>
3+
{{text}}
4+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ion-auth-firebaseui-providers {
2+
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Component } from '@angular/core';
2+
3+
/**
4+
* Generated class for the IonAuthFirebaseuiProvidersComponent component.
5+
*
6+
* See https://angular.io/api/core/Component for more info on Angular
7+
* Components.
8+
*/
9+
@Component({
10+
selector: 'ion-auth-firebaseui-providers',
11+
templateUrl: 'ion-auth-firebaseui-providers.component.html'
12+
})
13+
export class IonAuthFirebaseuiProvidersComponent {
14+
15+
text: string;
16+
17+
constructor() {
18+
console.log('Hello IonAuthFirebaseuiProvidersComponent Component');
19+
this.text = 'Hello World';
20+
}
21+
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {CommonModule} from '@angular/common';
2+
import {NgModule, ModuleWithProviders} from '@angular/core';
3+
4+
import {IonicModule} from 'ionic-angular';
5+
import {IonAuthFirebaseUiComponent} from './components/main/ion-auth-firebaseui.component';
6+
7+
// Export module's public API
8+
export {IonAuthFirebaseUiComponent} from './components/main/ion-auth-firebaseui.component';
9+
10+
@NgModule({
11+
imports: [
12+
CommonModule,
13+
IonicModule
14+
],
15+
exports: [IonAuthFirebaseUiComponent],
16+
declarations: [IonAuthFirebaseUiComponent]
17+
})
18+
export class IonicAuthFirebaseUIModule {
19+
static forRoot(): ModuleWithProviders {
20+
return {
21+
ngModule: IonicAuthFirebaseUIModule,
22+
providers: []
23+
};
24+
}
25+
}

src/tsconfig.lib.es5.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "./tsconfig.lib.json",
3+
"compilerOptions": {
4+
"target": "es5",
5+
"outDir": "../tmp/lib-es5/",
6+
"baseUrl": "",
7+
"types": []
8+
},
9+
"files": [
10+
"./index.ts"
11+
],
12+
"angularCompilerOptions": {
13+
"strictMetadataEmit": true,
14+
"skipTemplateCodegen": true,
15+
"genDir": "../tmp/lib-gen-dir/",
16+
"flatModuleOutFile": "ionic-authentication.js",
17+
"flatModuleId": "@firebaseui/ionic-authentication",
18+
"annotateForClosureCompiler": true
19+
}
20+
}

src/tsconfig.lib.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../tmp/lib-es2015/",
5+
"target": "es2015",
6+
"rootDir": "./",
7+
"baseUrl": "",
8+
"types": [ "node"]
9+
},
10+
"files": [
11+
"./index.ts"
12+
],
13+
"angularCompilerOptions": {
14+
"strictMetadataEmit": true,
15+
"skipTemplateCodegen": true,
16+
"genDir": "../tmp/lib-gen-dir/",
17+
"flatModuleOutFile": "ionic-authentication.js",
18+
"flatModuleId": "@firebaseui/ionic-authentication",
19+
"annotateForClosureCompiler": true
20+
}
21+
}

src/tsconfig.spec.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"baseUrl": "",
5+
"module": "commonjs",
6+
"declaration": false,
7+
"emitDecoratorMetadata": true,
8+
"typeRoots": [
9+
"../node_modules/@types"
10+
]
11+
},
12+
"awesomeTypescriptLoaderOptions": {
13+
"useWebpackText": true
14+
}
15+
}

0 commit comments

Comments
 (0)