-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
23,995 additions
and
27 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,5 +60,8 @@ export class HomeComponent { | |
{ | ||
name: 'firebase-storage', | ||
}, | ||
{ | ||
name: 'firebase-ui', | ||
}, | ||
]; | ||
} |
8 changes: 8 additions & 0 deletions
8
apps/demo-angular/src/plugin-demos/firebase-ui.component.html
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<ActionBar title="firebase-ui" class="action-bar"> </ActionBar> | ||
<StackLayout class="p-20"> | ||
<ScrollView class="h-full"> | ||
<StackLayout> | ||
<Button text="Test firebase-ui" (tap)="demoShared.testIt()" class="btn btn-primary"></Button> | ||
</StackLayout> | ||
</ScrollView> | ||
</StackLayout> |
17 changes: 17 additions & 0 deletions
17
apps/demo-angular/src/plugin-demos/firebase-ui.component.ts
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component, NgZone } from '@angular/core'; | ||
import { DemoSharedFirebaseUi } from '@demo/shared'; | ||
import {} from '@nativescript/firebase-ui'; | ||
|
||
@Component({ | ||
selector: 'demo-firebase-ui', | ||
templateUrl: 'firebase-ui.component.html', | ||
}) | ||
export class FirebaseUiComponent { | ||
demoShared: DemoSharedFirebaseUi; | ||
|
||
constructor(private _ngZone: NgZone) {} | ||
|
||
ngOnInit() { | ||
this.demoShared = new DemoSharedFirebaseUi(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; | ||
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; | ||
import { FirebaseUiComponent } from './firebase-ui.component'; | ||
|
||
@NgModule({ | ||
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: FirebaseUiComponent }])], | ||
declarations: [FirebaseUiComponent], | ||
schemas: [NO_ERRORS_SCHEMA], | ||
}) | ||
export class FirebaseUiModule {} |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<Page> | ||
<ActionBar> | ||
<Label text="firebase-ui"/> | ||
</ActionBar> | ||
|
||
<GridLayout> | ||
<Button class="info" :text="message"/> | ||
</GridLayout> | ||
</Page> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from "nativescript-vue"; | ||
import { DemoSharedFirebaseUi } from '@demo/shared'; | ||
import { } from '@nativescript/firebase-ui'; | ||
export default Vue.extend({ | ||
computed: { | ||
message() { | ||
return "Test firebase-ui"; | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.info { | ||
font-size: 20; | ||
horizontal-align: center; | ||
vertical-align: center; | ||
} | ||
</style> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Observable, EventData, Page } from '@nativescript/core'; | ||
import { DemoSharedFirebaseUi } from '@demo/shared'; | ||
import { firebase } from '@nativescript/firebase-core'; | ||
import { AppleProvider, EmailProvider, GithubProvider, GoogleProvider, MicrosoftProvider, TwitterProvider, YahooProvider } from '@nativescript/firebase-ui'; | ||
|
||
export function navigatingTo(args: EventData) { | ||
const page = <Page>args.object; | ||
page.bindingContext = new DemoModel(); | ||
} | ||
|
||
export class DemoModel extends DemoSharedFirebaseUi { | ||
show() { | ||
firebase() | ||
.ui() | ||
.show({ | ||
providers: [new AppleProvider(), new GoogleProvider(), new TwitterProvider(), new GithubProvider(), new EmailProvider(), new MicrosoftProvider(), new YahooProvider()], | ||
}) | ||
.then((result) => { | ||
console.log(result.user); | ||
console.log(result.hasCredentialForLinking); | ||
console.log(result.providerType); | ||
}) | ||
.catch((error) => { | ||
console.error('show error:', error); | ||
}); | ||
} | ||
|
||
signOut() { | ||
firebase() | ||
.ui() | ||
.signOut() | ||
.then(() => { | ||
console.log('signOut complete'); | ||
}) | ||
.catch((e) => { | ||
console.error('signOut error:', e); | ||
}); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page"> | ||
<Page.actionBar> | ||
<ActionBar title="firebase-ui" icon="" class="action-bar"> | ||
</ActionBar> | ||
</Page.actionBar> | ||
<StackLayout class="p-20"> | ||
<ScrollView class="h-full"> | ||
<StackLayout> | ||
<Button text="Show UI" tap="{{ show }}" class="btn btn-primary"/> | ||
<Button text="Sign out" tap="{{ signOut }}" class="btn btn-primary"/> | ||
|
||
</StackLayout> | ||
</ScrollView> | ||
</StackLayout> | ||
</Page> |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
platform :ios, '12.0' | ||
pod 'FirebaseFirestore', '~>10.7.0' | ||
pod 'Firebase/Firestore', '~>10.7.0' |
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
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
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
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
Oops, something went wrong.