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
import Vue from 'vue' | |
import App from './App.vue' | |
import router from './router' | |
import { CometChat } from '@cometchat-pro/chat' | |
import { auth } from './firebase' | |
Vue.config.productionTip = false | |
router.beforeEach((to, from, next) => { | |
const requiresAuth = to.matched.some((record) => record.meta.requiresAuth) |
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
import Vue from 'vue' | |
import Router from 'vue-router' | |
Vue.use(Router) | |
const routes = [ | |
{ | |
path: '/', | |
component: () => import(/* webpackChunkName: "home" */ './views/Home.vue'), | |
name: 'home', |
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
import firebase from 'firebase/app' | |
import 'firebase/auth' | |
const firebaseConfig = { | |
apiKey: process.env.VUE_APP_BASE_APIKEY, | |
authDomain: process.env.VUE_APP_BASE_AUTHDOMAIN, | |
projectId: process.env.VUE_APP_BASE_PROJECTID, | |
storageBucket: process.env.VUE_APP_BASE_STORAGEBUCKET, | |
messagingSenderId: process.env.VUE_APP_BASE_MESSAGINGSENDERID, | |
appId: process.env.VUE_APP_BASE_APPID, |
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
<template> | |
<div id="app"> | |
<router-view :key="$route.path"/> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "app", | |
}; |
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
<template> | |
<div class="register__box"> | |
<h2>Register</h2> | |
<form @submit.prevent="onSubmit"> | |
<div class="user__box"> | |
<input type="text" required minlength="5" v-model="form.fullname" /> | |
<label>Fullname</label> | |
</div> | |
<div class="user__box"> |
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
<template> | |
<div class="login__box"> | |
<h2>Login</h2> | |
<form @submit.prevent="onSubmit"> | |
<div class="user__box"> | |
<input type="email" required v-model="form.email" /> | |
<label>Email</label> | |
</div> | |
<div class="user__box"> |
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
<template> | |
<div class="forget__box"> | |
<h2>Forget</h2> | |
<form @submit.prevent="onSubmit"> | |
<div class="user__box"> | |
<input type="email" required v-model="form.email" /> | |
<label>Email</label> | |
</div> | |
<button type="submit"> | |
<span></span> |
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
<template> | |
<div id="main-header"> | |
<router-link class="header__icon mobile--only" to="/friends"> | |
<AccountGroupIcon fillColor="#989898" :size="30" /> | |
</router-link> | |
<router-link class="header__icon" to="/"> | |
<FireIcon fillColor="#fd5068" :size="40" /> | |
</router-link> |
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
<template> | |
<div class="sidebar__messages"> | |
<h4 class="message__title">{{ title }}</h4> | |
<router-link | |
:to="'/chats/' + user.uid" | |
v-for="user in users" | |
:key="user.uid" | |
:class="[uid == user.uid ? 'active' : '', 'sidebar__message']" | |
> | |
<div class="message__left"> |
OlderNewer