dodanie central store

This commit is contained in:
pawlaczyk 2019-01-05 15:36:36 +01:00
parent ee23f27209
commit 0b6618c234
10 changed files with 47 additions and 7 deletions

View File

@ -10510,6 +10510,11 @@
"loader-utils": "^1.1.0"
}
},
"vuex": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.0.1.tgz",
"integrity": "sha512-wLoqz0B7DSZtgbWL1ShIBBCjv22GV5U+vcBFox658g6V0s4wZV9P4YjCNyoHSyIBpj1f29JBoNQIqD82cR4O3w=="
},
"watchpack": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",

View File

@ -11,7 +11,8 @@
"date-fns": "^1.30.1",
"vue": "^2.5.21",
"vue-router": "^3.0.1",
"vuetify": "^1.3.0"
"vuetify": "^1.3.0",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.2.0",

View File

@ -46,7 +46,7 @@
<v-avatar size ="100" color="white">
<img src="/cylinder-okragly.png">
</v-avatar>
<p class="white--text mt-3 subheading">Edżentelmen</p>
<p class="white--text mt-3 subheading">Edżentelmeni</p>
</v-flex>
<v-flex class="mb-3">
<Popup @projectAdded="snackbar = true"/>
@ -75,14 +75,14 @@ export default {
data(){
return{
drawer: false, //niepokazywac na poczatku
links: [
{ icon: 'dashboard', text: 'Rozgrywka', route: '/'},
{ icon: "folder", text: 'Karty', route: '/projects'},
{ icon: 'person', text: 'Dżentelmani', route: '/team'}
],
snackbar: false
}
},
computed:{
links(){
return this.$store.state.links;
}
},
methods:{
userLogout(){
//wylogowanie

View File

@ -2,10 +2,12 @@ import Vue from 'vue'
import './plugins/vuetify'
import App from './App.vue'
import router from './router'
import {store} from './store/store'
Vue.config.productionTip = false
new Vue({
router,
store: store,
render: h => h(App)
}).$mount('#app')

View File

@ -0,0 +1,17 @@
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
export const store = new Vuex.Store({
state: {
links:[
{ icon: 'dashboard', text: 'Gra', route: '/'},
{ icon: "folder", text: 'Karty', route: '/karty'},
{ icon: 'person', text: 'Dżentelmani', route: '/dzentelmani'},
// { icon: 'exit_to_app', text: 'Wyloguj', route: '/logout'},
// { icon: 'get_app', text: 'Zaloguj', route: '/login'},
// { icon: 'account_circle', text: 'Rejestracja', route: '/register'},
]
}
})

View File

@ -0,0 +1,3 @@
<template>
<h1>Karty z bazy</h1>
</template>

View File

@ -0,0 +1,3 @@
<template>
<h1>Cała planasza gry z kartami</h1>
</template>

View File

@ -0,0 +1,3 @@
<template>
<h1>Logowanie</h1>
</template>

View File

@ -0,0 +1,3 @@
<template>
<h1>Wylogowanie</h1>
</template>

View File

@ -0,0 +1,3 @@
<template>
<h1>KWszyscy zatrejestrowani użytkownicy</h1>
</template>