Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
irsyadpahlapi committed Mar 28, 2018
1 parent 7048593 commit a1a5aa2
Show file tree
Hide file tree
Showing 48 changed files with 11,465 additions and 21 deletions.
Empty file modified .babelrc
100644 → 100755
Empty file.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .eslintignore
100644 → 100755
Empty file.
Empty file modified .eslintrc.js
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .postcssrc.js
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified build/build.js
100644 → 100755
Empty file.
Empty file modified build/check-versions.js
100644 → 100755
Empty file.
Empty file modified build/dev-client.js
100644 → 100755
Empty file.
Empty file modified build/dev-server.js
100644 → 100755
Empty file.
Empty file modified build/service-worker-dev.js
100644 → 100755
Empty file.
Empty file modified build/service-worker-prod.js
100644 → 100755
Empty file.
Empty file modified build/utils.js
100644 → 100755
Empty file.
Empty file modified build/vue-loader.conf.js
100644 → 100755
Empty file.
Empty file modified build/webpack.base.conf.js
100644 → 100755
Empty file.
Empty file modified build/webpack.dev.conf.js
100644 → 100755
Empty file.
Empty file modified build/webpack.prod.conf.js
100644 → 100755
Empty file.
Empty file modified config/dev.env.js
100644 → 100755
Empty file.
Empty file modified config/index.js
100644 → 100755
Empty file.
Empty file modified config/prod.env.js
100644 → 100755
Empty file.
Empty file modified index.html
100644 → 100755
Empty file.
11,426 changes: 11,426 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"axios": "^0.16.1",
"firebase": "^4.0.0",
"router": "^1.3.2",
"vue": "^2.3.3",
"vue-material": "^0.7.1",
"vue-router": "^2.3.1",
Expand Down
10 changes: 5 additions & 5 deletions src/App.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
</template>

<script>
export {
name: 'app'
export default{
name: 'app',
methods: {
toggleSideNavLeft(route) {
if (typeof (route) == 'object') {
toggleSideNavLeft (route) {
if (typeof (route) === 'object') {
this.$refs.leftSidenav.toggle()
} else {
this.$refs.leftSidenav.toggle()
this.router.push(route)
this.$router.push(route)
}
}
}
Expand Down
Empty file modified src/assets/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/Detail.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export default {
return {
cat: {
asObject: true,
source: this.$db.ref('cats').child(this.id),
source: this.$db.ref('cats').child(this.id)
}
},
}
}
}
</script>
Expand Down
13 changes: 7 additions & 6 deletions src/components/Home.vue
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template lang="html">
<div id="home">
<h1>Home</h1>
<md-card v-for="cat in latestCats" :key="cat['.key']">
<md-card v-for="cat in cats.slice().reverse()" v-bind:key="cat['.key']">
<md-card-media>
<img src="cat.url" :alt="cat.comment">
<img :src="cat.url" :alt="cat.comment">
</md-card-media>

<md-card-header>
<div class="md-title">{{ cat.comment }}</div>
</md-card-header>

<md-card-actions>
<router-link to="'/detail/'+cat['.key']">
<router-link :to="'/detail/'+cat['.key']">
<md-button>Details</md-button>
</router-link>
</md-card-actions>
Expand All @@ -22,12 +22,13 @@
<script>
export default {
firebase () {
{
cats: this.$db.ref('cats');
return {
cats: this.$db.ref('cats')
}
},
computed: {
latestCats: {
latestCats: function () {
console.log(this.cats)
this.cats.reverse()
}
}
Expand Down
15 changes: 8 additions & 7 deletions src/components/Post.vue
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,29 @@ export default {
detail: ''
},
loading: true,
err: false,
err: false
}
},
methods: {
getCat() {
this.$http.get('http://random.cat/meow')
getCat () {
this.$http.get('https://yesno.wtf/api')
.then((response) => {
this.randomCat.url = response.data.file
console.log(response)
this.randomCat.url = response.data.image
setTimeout(() => { this.loading = false }, 1000)
})
.catch((err) => {
this.err = err
})
},
postCat() {
postCat () {
console.log('postCat ', this.randomCat)
this.$db.ref('cats').push(this.randomCat, () => {
this.$router.push('/');
this.$router.push('/')
})
}
},
mounted: {
mounted: function () {
this.getCat()
}
}
Expand Down
15 changes: 15 additions & 0 deletions src/components/firebase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { initializeApp } from 'firebase'

const app = initializeApp({
apiKey: `AIzaSyCJP2lXoXb1eUxXK0Wh81T1DLbDmZN7jZY`,
authDomain: `eksa-projects.firebaseapp.com`,
databaseURL: `https://eksa-projects.firebaseio.com`,
projectId: `eksa-projects`,
storageBucket: ``,
messagingSenderId: `677299954434`
})

export const db = app.database()
export const roomRefs = db.ref('rooms')
export const charRefs = db.ref('characters')
export const userRefs = db.ref('users')
Empty file modified src/data/index.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/main.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Vue from 'vue'
import VueFire from 'vuefire'
import axios from 'axios'
import App from './App'
import router from 'router'
import router from './router'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.css'
import firebase from 'firebase'
Expand Down
Empty file modified src/router/index.js
100644 → 100755
Empty file.
Empty file modified static/img/icons/android-chrome-192x192.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/android-chrome-512x512.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/apple-touch-icon-120x120.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/apple-touch-icon-152x152.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/apple-touch-icon-180x180.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/apple-touch-icon-60x60.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/apple-touch-icon-76x76.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/apple-touch-icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/favicon-16x16.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/favicon-32x32.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/favicon.ico
100644 → 100755
Empty file.
Empty file modified static/img/icons/mstile-150x150.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/img/icons/safari-pinned-tab.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified static/manifest.json
100644 → 100755
Empty file.
Empty file modified yarn.lock
100644 → 100755
Empty file.

0 comments on commit a1a5aa2

Please sign in to comment.