Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import AuthService from './services/AuthService'
import { TNSFontIcon, fonticon } from 'nativescript-fonticon'
import Home from './components/Home'
import Login from './components/Login'
//import { setStatusBarColors } from './utils/statusBar'
const backendService = new BackendService()
const authService = new AuthService()
const store = new Vuex.Store(storeConf)
Vue.prototype.$store = store;
Vue.prototype.$routes = routes;
Vue.prototype.$authService = authService
//route manually
Vue.prototype.$changeRoute = (to) => {
Vue.navigateTo(routes[to])
}
//TNSFontIcon.debug = true;
TNSFontIcon.paths = {
'fa': './font-awesome.css'
};
TNSFontIcon.loadCss();
Vue.filter('fonticon', fonticon)
Vue.use(Vuex)
firebase.init({
onAuthStateChanged: data => { // optional
const store = new Vuex.Store({
state: {
// array of grocery items
items: [],
// array of ongoing tasks. We keep track of the tasks to show/hide the
// activity indicator in the groceries page.
processingTasks: []
},
mutations,
actions,
getters,
strict: debug,
});
Vue.prototype.$store = store;
export default store;
import { State } from './state'
// import firebase from 'nativescript-plugin-firebase'
Vue.use(Vuex)
const debug = process.env.NODE_ENV !== 'production'
const store = new Vuex.Store({
state: new State(),
mutations,
getters,
actions,
strict: debug
})
Vue.prototype.$store = store
export default store
import Groceries from './components/Groceries/Groceries.vue'
import Login from './components/Login/Login.vue'
import { setStatusBarColors } from './utils/statusBar'
import './app.css'
import storeConf from './store/store.js'
global.process = { env: { } } // hack! a build process should replace process.env's with static strings.
const backendService = new BackendService()
setStatusBarColors()
const store = new Vuex.Store(storeConf);
// Adding the vuex store to the main vue object does not work. See:
// https://github.com/rigor789/nativescript-vue/issues/46#issuecomment-331925815
Vue.prototype.$store = store
const router = new VueRouter({
routes: [
{
path: '/login',
component: Login,
meta: { hiddenActionBar: true }
},
{
path: '/groceries',
component: Groceries,
meta: { requiresAuth: true }
},
{ path: '*', redirect: '/login' }
]
})
import Vue from 'nativescript-vue';
import Vuex from 'vuex';
import counter from './modules/counter';
Vue.use(Vuex);
const store = new Vuex.Store({
modules: {
counter,
},
strict: DEBUG_MODE,
});
Vue.prototype.$store = store;
export default store;
import Vuex from 'vuex';
import counter from './modules/counter';
Vue.use(Vuex);
const debug = process.env.NODE_ENV !== 'production';
const store = new Vuex.Store({
modules: {
counter,
},
strict: debug,
});
Vue.prototype.$store = store;
module.exports = store;
import storeConf from './store';
import Vuex from 'vuex';
import firebase from 'nativescript-plugin-firebase'
import BackendService from './services/BackendService'
import AuthService from './services/AuthService'
import { TNSFontIcon, fonticon } from 'nativescript-fonticon'
import Home from './components/Home'
import Login from './components/Login'
//import { setStatusBarColors } from './utils/statusBar'
const backendService = new BackendService()
const authService = new AuthService()
const store = new Vuex.Store(storeConf)
Vue.prototype.$store = store;
Vue.prototype.$routes = routes;
Vue.prototype.$authService = authService
//route manually
Vue.prototype.$changeRoute = (to) => {
Vue.navigateTo(routes[to])
}
//TNSFontIcon.debug = true;
TNSFontIcon.paths = {
'fa': './font-awesome.css'
};
TNSFontIcon.loadCss();
Vue.filter('fonticon', fonticon)
Vue.use(Vuex)
import firebase from 'nativescript-plugin-firebase'
import BackendService from './services/BackendService'
import AuthService from './services/AuthService'
import { TNSFontIcon, fonticon } from 'nativescript-fonticon'
import Home from './components/Home'
import Login from './components/Login'
//import { setStatusBarColors } from './utils/statusBar'
const backendService = new BackendService()
const authService = new AuthService()
const store = new Vuex.Store(storeConf)
Vue.prototype.$store = store;
Vue.prototype.$routes = routes;
Vue.prototype.$authService = authService
//route manually
Vue.prototype.$changeRoute = (to) => {
Vue.navigateTo(routes[to])
}
//TNSFontIcon.debug = true;
TNSFontIcon.paths = {
'fa': './font-awesome.css'
};
TNSFontIcon.loadCss();
Vue.filter('fonticon', fonticon)
Vue.use(Vuex)
import Vuex from 'vuex';
import firebase from 'nativescript-plugin-firebase'
import BackendService from './services/BackendService'
import AuthService from './services/AuthService'
import { TNSFontIcon, fonticon } from 'nativescript-fonticon'
import Home from './components/Home'
import Login from './components/Login'
//import { setStatusBarColors } from './utils/statusBar'
const backendService = new BackendService()
const authService = new AuthService()
const store = new Vuex.Store(storeConf)
Vue.prototype.$store = store;
Vue.prototype.$routes = routes;
Vue.prototype.$authService = authService
//route manually
Vue.prototype.$changeRoute = (to) => {
Vue.navigateTo(routes[to])
}
//TNSFontIcon.debug = true;
TNSFontIcon.paths = {
'fa': './font-awesome.css'
};
TNSFontIcon.loadCss();
Vue.filter('fonticon', fonticon)
Vue.use(Vuex)