♻️ Lint
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<p v-for="ball in store.ballsInFeed" :key="ball.id">
|
<p v-for="ball in store.ballsInFeed" :key="ball.id">
|
||||||
<span>{{ ball.author_name }}:</span>
|
<span> {{ ball.author_name }}:</span>
|
||||||
{{ ball.message }}
|
{{ ball.message }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { store } from "../functions/store";
|
import { store } from "../../functions/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<form @submit.prevent="formPost">
|
<form @submit.prevent="formPost">
|
||||||
<input type="text" autofocus ref="inputMessage" v-model="message" />
|
<input type="text" autofocus ref="inputMessage" v-model="message" />
|
||||||
<input type="submit" value="DUNK!" />
|
<input :disabled="!this.message" type="submit" value="DUNK!" />
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { store } from "../functions/store";
|
import { store } from "../../functions/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -7,19 +7,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import firebase from "firebase/app";
|
import firebase from "firebase/app";
|
||||||
import "firebase/auth";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
signInWithGoogle() {
|
signInWithGoogle() {
|
||||||
var provider = new firebase.auth.GoogleAuthProvider();
|
const provider = new firebase.auth.GoogleAuthProvider();
|
||||||
firebase
|
firebase
|
||||||
.auth()
|
.auth()
|
||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
.catch(err => alert(err.message || err));
|
.catch(err => alert(err.message || err));
|
||||||
},
|
},
|
||||||
signInWithGithub() {
|
signInWithGithub() {
|
||||||
var provider = new firebase.auth.GithubAuthProvider();
|
const provider = new firebase.auth.GithubAuthProvider();
|
||||||
firebase
|
firebase
|
||||||
.auth()
|
.auth()
|
||||||
.signInWithPopup(provider)
|
.signInWithPopup(provider)
|
||||||
@@ -4,7 +4,7 @@ import "firebase/firestore";
|
|||||||
import "firebase/auth";
|
import "firebase/auth";
|
||||||
|
|
||||||
// Initialize Firebase, copied from cloud console
|
// Initialize Firebase, copied from cloud console
|
||||||
var config = {
|
const firebaseConfig = {
|
||||||
apiKey: "AIzaSyCMsFreESs58-hRxTtiqQrIcimh4i1wbsM",
|
apiKey: "AIzaSyCMsFreESs58-hRxTtiqQrIcimh4i1wbsM",
|
||||||
authDomain: "postwoman-api.firebaseapp.com",
|
authDomain: "postwoman-api.firebaseapp.com",
|
||||||
databaseURL: "https://postwoman-api.firebaseio.com",
|
databaseURL: "https://postwoman-api.firebaseio.com",
|
||||||
@@ -14,7 +14,7 @@ var config = {
|
|||||||
appId: "1:421993993223:web:ec0baa8ee8c02ffa1fc6a2",
|
appId: "1:421993993223:web:ec0baa8ee8c02ffa1fc6a2",
|
||||||
measurementId: "G-ERJ6025CEB"
|
measurementId: "G-ERJ6025CEB"
|
||||||
};
|
};
|
||||||
firebase.initializeApp(config);
|
firebase.initializeApp(firebaseConfig);
|
||||||
|
|
||||||
// a reference to the Balls collection
|
// a reference to the Balls collection
|
||||||
const ballsCollection = firebase.firestore().collection("balls");
|
const ballsCollection = firebase.firestore().collection("balls");
|
||||||
|
|||||||
@@ -346,16 +346,12 @@
|
|||||||
</v-popover>
|
</v-popover>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<login v-if="!store.currentUser" />
|
||||||
|
<div v-else>
|
||||||
<Login v-if="!store.currentUser" />
|
<button @click="logout">Log out</button>
|
||||||
<div v-else>
|
<inputform />
|
||||||
<button @click="logout">Log out</button>
|
<ballsfeed />
|
||||||
<InputForm />
|
</div>
|
||||||
<BallsFeed />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<nuxt />
|
<nuxt />
|
||||||
@@ -604,23 +600,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import intializePwa from "../assets/js/pwa";
|
import intializePwa from "../assets/js/pwa";
|
||||||
import * as version from "../.postwoman/version.json";
|
import * as version from "../.postwoman/version.json";
|
||||||
|
import firebase from "firebase/app";
|
||||||
|
import { store } from "../functions/store";
|
||||||
import firebase from 'firebase/app';
|
|
||||||
import 'firebase/auth';
|
|
||||||
|
|
||||||
import { store } from '../functions/store';
|
|
||||||
import Login from '../components/Login';
|
|
||||||
import InputForm from '../components/InputForm';
|
|
||||||
import BallsFeed from '../components/BallsFeed';
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
logo: () => import("../components/logo"),
|
logo: () => import("../components/logo"),
|
||||||
modal: () => import("../components/modal"),
|
modal: () => import("../components/modal"),
|
||||||
|
login: () => import("../components/firebase/login"),
|
||||||
Login, InputForm, BallsFeed
|
inputform: () => import("../components/firebase/inputform"),
|
||||||
|
ballsfeed: () => import("../components/firebase/feeds")
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -631,11 +620,12 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
firebase.auth().signOut()
|
firebase
|
||||||
.catch((err) => alert(err.message || err));
|
.auth()
|
||||||
},
|
.signOut()
|
||||||
|
.catch(err => alert(err.message || err));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
Reference in New Issue
Block a user