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
| import * as firebase from "nativescript-plugin-firebase"; | |
| trackingView() { | |
| return firebase.analytics | |
| .setScreenName({ | |
| screenName: "Home", | |
| }) | |
| .then( | |
| () => { | |
| console.log("Screen name set"); | |
| }, |
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
| import * as firebase from "nativescript-plugin-firebase"; | |
| setUserProperty({ key, value }) { | |
| firebase.analytics | |
| .setUserProperty({ | |
| key: key, | |
| value: value, | |
| }) | |
| .then( | |
| () => { | |
| console.log("Analytics user property set"); |
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
| import * as firebase from "nativescript-plugin-firebase"; | |
| // example of parameters | |
| // const parameters = [{ | |
| // key: "item_id", | |
| // value: "...some_uuid...", | |
| // }, | |
| // { | |
| // key: "item_name", | |
| // value: "Test log event", | |
| // }], |
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
| import * as firebase from "nativescript-plugin-firebase"; | |
| export default { | |
| initFirebase() { | |
| return firebase.init({}).then( | |
| () => { | |
| console.log("firebase.init done"); | |
| }, | |
| (error) => { | |
| console.log(`firebase.init error: ${error}`); | |
| } |
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
| import * as firebase from "nativescript-plugin-firebase"; | |
| firebase.init({}).then( | |
| (instance) => { | |
| console.log("firebase.init done"); | |
| }, | |
| (error) => { | |
| console.log(`firebase.init error: ${error}`); | |
| } | |
| ); |
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
| { | |
| "using_ios": true, | |
| "using_android": true, | |
| "analytics": true, | |
| "firestore": true, | |
| "realtimedb": true, | |
| "authentication": true, | |
| "remote_config": false, | |
| "performance_monitoring": false, | |
| "external_push_client_only": true, |
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
| <template> | |
| <v-layout column justify-center> | |
| <v-flex xs12 sm8 md6> | |
| <div class="container"> | |
| <h3 class="text-center">{{ username ? username : 'Messaging' }}</h3> | |
| <div v-if="!isLogin"> | |
| <v-row align="center"> | |
| <v-col class="text-center" cols="12" lg="8"> | |
| <v-text-field | |
| v-model="username" |
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
| import colors from 'vuetify/es5/util/colors' | |
| export default { | |
| /* | |
| ** Nuxt rendering mode | |
| ** See https://nuxtjs.org/api/configuration-mode | |
| */ | |
| mode: 'universal', | |
| /* | |
| ** Nuxt target |
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
| import Vue from 'vue' | |
| const moment = require('moment-timezone') | |
| // filter date | |
| Vue.filter('formatUnix', function (value) { | |
| if (value) { | |
| return moment | |
| .tz(value * 1000, 'Asia/Ho_Chi_Minh') | |
| .format('DD/MM/YYYY hh:mm:ss') | |
| } | |
| }) |
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
| // Your web app's Firebase configuration | |
| import firebase from 'firebase' | |
| const firebaseConfig = { | |
| apiKey: '...', | |
| authDomain: '...', | |
| databaseURL: '...', | |
| projectId: '...', | |
| storageBucket: '...', | |
| messagingSenderId: '...', | |
| appId: '...', |