From 7bbc200c39483eded08d149d46c039faa89188ec Mon Sep 17 00:00:00 2001 From: Muhammad Iqbal Rifai Date: Wed, 4 Jul 2018 19:11:50 +0200 Subject: [PATCH] Upload files to 'client/src' --- client/src/App.vue | 38 +++++++++++++++++++++++++ client/src/main.js | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 client/src/App.vue create mode 100644 client/src/main.js diff --git a/client/src/App.vue b/client/src/App.vue new file mode 100644 index 0000000..14db525 --- /dev/null +++ b/client/src/App.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/client/src/main.js b/client/src/main.js new file mode 100644 index 0000000..f6b0536 --- /dev/null +++ b/client/src/main.js @@ -0,0 +1,70 @@ +// The Vue build version to load with the `import` command +// (runtime-only or standalone) has been set in webpack.base.conf with an alias. +import Vue from "vue"; +import App from "./App"; +import router from "./router"; +import axios from "axios"; +import firebase from "firebase"; +import firebaseui from "firebaseui"; +import { config } from "./helpers/firebaseConfig"; +import "./assets/css/app.css"; +import AsyncMethods from "vue-async-methods"; + +Vue.use(AsyncMethods); +Vue.config.productionTip = true; +let app; + +Vue.filter("suspensivos", function(texto) { + return texto.substring(0, 18) + "..."; +}); +Vue.filter("normalize", function(texto) { + return texto.toUpperCase(); +}); + +Vue.use(require("vue-script2")); +/* eslint-disable no-new */ +firebase.initializeApp(config); +firebase.auth().onAuthStateChanged(function(user) { + if (!app) { + /* eslint-disable no-new */ + app = new Vue({ + el: "#app", + template: "", + components: { App }, + router + }); + } +}); + +/* new Vue({ + el: "#app", + router, + created() { + firebase.initializeApp(config); + firebase.auth().onAuthStateChanged((user) => { + if (user) { + this.$router.push('/success') + }else { + this.$router.push('/auth') + } + }); + }, + components: { App }, + template: "" +}); + */ +/* +new Vue({ + router, + template: ` +
+
    +
  • App
  • +
  • home
  • +
  • user
  • +
+ +
+ ` +}).$mount('#app') + */