Commit c96b848f authored by Edgar Z. Alvarenga's avatar Edgar Z. Alvarenga

Changes in style, add default static assets and upgrade Vuetify

parent b3592d17
......@@ -16702,9 +16702,14 @@
"dev": true
},
"vuetify": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.1.13.tgz",
"integrity": "sha512-7EuKQdFfKi6LEu+y5OtVvErfXBJT0aL1MtXEvnPALRM6ynAVcXVUi8PLxccBiOfTRHTTdcbijp5gx6XvL3rECQ=="
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.2.3.tgz",
"integrity": "sha512-ssMsLVwth62T4usPAFbn8yk69qqBDp4VWPmlY4XiYZ7aGMPoa/sQ08BlAeG8J81y+K60bY88FZ2gquQKlGqlsg=="
},
"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",
......
......@@ -35,7 +35,8 @@
"vue-cordova": "^0.1.2",
"vue-head": "^2.0.12",
"vue-router": "^3.0.1",
"vuetify": "^1.0.18"
"vuetify": "^1.2.3",
"vuex": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^8.5.0",
......
<template>
<v-app light>
<v-toolbar fixed app class="light-green">
<router-link to="/"><v-toolbar-title v-text="title"></v-toolbar-title></router-link>
<v-toolbar fixed app class="white">
<router-link to="/"><img class="header_logo" src="/static/img/aula_old_logo.svg"/></router-link>
<v-spacer></v-spacer>
<Menu v-if="$auth.ready()"></Menu>
</v-toolbar>
......@@ -72,4 +72,8 @@
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
}
.header_logo {
width: 100px;
}
</style>
......@@ -2,33 +2,37 @@
<v-container fluid grid-list-md>
<v-slide-y-transition mode="out-in">
<v-layout row wrap align-center>
<!-- Default Idea Space -->
<v-flex d-flex xs12 sm4 pa-2>
<v-card v-for="space in idea_space" :key="space.id">
<v-card>
<div class="idea-space-teaser">
<img
src="/static/img/school_teaser.svg"
></img>
</div>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0">{{ space.title }}</h3>
<h3 class="headline mb-0">School</h3>
</div>
</v-card-title>
</v-card>
</v-flex>
<v-flex d-flex xs12 sm4 pa-2>
<v-card v-for="space in idea_space" :key="space.id">
<div class="idea-space-teaser">
<img
src="/static/img/class_teaser.png"
></img>
</div>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0">{{ space.title }}</h3>
</div>
</v-card-title>
</v-card>
</v-flex>
<v-flex d-flex xs12 sm4 pa-2>
<v-card v-for="space in idea_space" :key="space.id">
<v-card-title primary-title>
<div>
<h3 class="headline mb-0">{{ space.title }}</h3>
<router-link :to="`/space/${space.title}/ideas`"><h3 class="headline mb-0">{{ space.title }}</h3></router-link>
</div>
</v-card-title>
</v-card>
</v-flex>
</v-layout>
</v-slide-y-transition>
</v-container>
......@@ -38,7 +42,8 @@
export default {
name: 'IdeaSpaces',
data: () => ({
idea_space: []
idea_space: [],
user: {}
}),
props: {
......@@ -48,8 +53,7 @@
this.$http({ url: 'http://localhost/api/idea_space', method: 'GET' })
.then((res) => {
this.idea_space = res.data
let user = this.$auth.user()
console.log(user)
this.user = this.$auth.user()
})
},
......@@ -57,3 +61,16 @@
}
}
</script>
<style scoped lang="scss">
.idea-space-teaser {
display: flex;
justify-content: center;
padding-top: 20px;
padding-bottom: 20px;
background-color: #ededed;
margin: auto;
height: 150px;
}
</style>
<template>
<v-container fluid grid-list-md>
<v-slide-y-transition mode="out-in">
<v-layout row wrap align-center>
{{ $route.params['spaceSlug'] }}
</v-layout>
</v-slide-y-transition>
</v-container>
</template>
<script>
export default {
name: 'Ideas',
data: () => ({
}),
props: {
spaceSlug: ''
},
beforeMount: function () {
},
methods: {
}
}
</script>
<template>
<v-menu bottom left>
<v-menu bottom right>
<v-btn
slot="activator"
dark
icon
class="light-green"
>
<v-icon>more_vert</v-icon>
<v-icon>more_vert</v-icon>
User
</v-btn>
......@@ -19,7 +18,7 @@
<v-list-tile v-if="$auth.user().role.indexOf('admin') >= 0 || $auth.user().role.indexOf('school_admin') >= 0">
<router-link to="/admin">Prozessverwaltung</router-link>
</v-list-tile>
<v-list-tile>
<v-list-tile @click="logout">
Logout
</v-list-tile>
</v-list>
......@@ -40,6 +39,9 @@
},
methods: {
logout: function () {
this.$auth.logout({ redirect: '/login' })
}
}
}
</script>
<template>
<v-container fluid grid-list-md>
<v-slide-y-transition mode="out-in">
<v-layout row wrap align-center>
<v-layout column align-start>
<v-flex d-flex xs12 sm12 pa-2>
<h2 class="title">{{ $vuetify.t('$vuetify.AdminPhaseTime.phaseWorking') }}</h2>
</v-flex>
<v-flex d-flex xs12 sm12 pa-2>
<v-text-field
:label="$vuetify.t('$vuetify.AdminPhaseTime.days')"
v-model='phaseWorking'
></v-text-field>
</v-flex>
<v-flex d-flex xs12 sm12 pa-2>
<h2 class="title">{{ $vuetify.t('$vuetify.AdminPhaseTime.phaseVoting') }}</h2>
</v-flex>
<v-flex d-flex xs12 sm12 pa-2>
<v-text-field
:label="$vuetify.t('$vuetify.AdminPhaseTime.days')"
v-model='phaseVoting'
></v-text-field>
</v-flex>
<v-flex d-flex xs12 sm12 pa-2>
<v-btn
@click="submit"
>
{{ $vuetify.t('$vuetify.UserSettings.save') }}
</v-btn>
</v-flex>
</v-layout>
</v-slide-y-transition>
......@@ -16,12 +37,17 @@
export default {
name: 'Phase',
data: () => ({
phaseVoting: 1,
phaseWorking: 1
}),
props: {
},
methods: {
submit: function () {
console.log(this.phaseWorking, this.phaseVoting)
}
}
}
</script>
......@@ -165,8 +165,9 @@ export default {
'termsOfUse': 'Nutzungsbedingungen ändern'
},
AdminPhaseTime: {
'phase.working': 'Wie viele Tage soll die Ausarbeitungphase dauern?',
'phase.voting': 'Wie viele Tage soll die Abstimmungphase dauren?'
'phaseWorking': 'Wie viele Tage soll die Ausarbeitungphase dauern?',
'phaseVoting': 'Wie viele Tage soll die Abstimmungphase dauren?',
'days': 'Tage'
},
AdminQuorum: {
'school.quorum': 'Wie hoch soll das Quorum schulweit sein?',
......
......@@ -14,6 +14,7 @@ import de from './locale/de'
import App from './App'
import router from './router'
import store from './store'
Vue.use(Vuetify, {
lang: {
......@@ -38,6 +39,7 @@ Vue.router = router
Vue.use(VueAuth, {
auth: require('@websanova/vue-auth/drivers/auth/bearer.js'),
tokenDefaultName: 'auth_token',
http: require('@websanova/vue-auth/drivers/http/axios.1.x.js'),
router: require('@websanova/vue-auth/drivers/router/vue-router.2.x.js'),
loginData: {url: 'http://localhost/api/rpc/login', method: 'POST', redirect: '/', fetchUser: true},
......@@ -52,6 +54,7 @@ Vue.use(VueAuth, {
new Vue({
el: '#app',
router,
store,
template: '<App/>',
components: { App },
head: {
......
......@@ -3,6 +3,7 @@ import Router from 'vue-router'
import IdeaSpaces from '@/components/IdeaSpaces'
import Admin from '@/components/Admin'
import Login from '@/components/Login'
import Ideas from '@/components/Ideas'
Vue.use(Router)
......@@ -14,6 +15,12 @@ export default new Router({
component: IdeaSpaces,
meta: {auth: true}
},
{
path: '/space/:spaceSlug/ideas',
name: 'Ideas',
component: Ideas,
meta: {auth: true}
},
{
path: '/login',
name: 'Login',
......
const getters = {
school_id: state => state.user.school_id,
user_id: state => state.user.user_id
}
export default getters
import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import getters from './getters'
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
user
},
getters
})
export default store
const user = {
state: {
user: {},
roles: []
},
mutations: {
SET_USER: (state, user) => {
state.user = user
},
SET_ROLES: (state, roles) => {
state.roles = roles
}
},
actions: {
}
}
export default user
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="195px" height="83px" viewBox="0 0 195 83" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.6 (26304) - http://www.bohemiancoding.com/sketch -->
<title>Group 6</title>
<desc>Created with Sketch.</desc>
<defs/>
<g id="Klickdummy-Moderator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="1.-Rooms-overview-" transform="translate(-91.000000, -136.000000)">
<g id="Group-7" transform="translate(43.000000, 108.000000)">
<g id="Group-6" transform="translate(48.000000, 28.000000)">
<rect id="Rectangle-677" fill="#F6A623" x="5.90909091" y="32.5045045" width="185.397727" height="49.4954955"/>
<g id="Group-5">
<g id="Group-4">
<g id="Group-3">
<rect id="Rectangle-678" fill="#D98E12" x="5.90909091" y="32.5045045" width="185.397727" height="3.69369369"/>
<path d="M7.38636364,0 L187.613636,0 L195,32.5045045 L0,32.5045045 L7.38636364,0 Z" id="Rectangle-679" fill="#8B572A"/>
<path d="M68.6931818,28.8108108 L97.8162259,8.12612613 L127.784091,28.8108108 L127.784091,43.5855856 L68.6931818,43.5855856 L68.6931818,28.8108108 Z" id="Rectangle-679" fill="#F6A623"/>
<path d="M68.6931818,34.7207207 L68.6931818,82 L67.2159091,82 L67.2159091,34.7207207 L68.6931818,34.7207207 L68.6931818,34.7207207 Z" id="Rectangle-678" fill="#D98E12"/>
<path d="M129.261364,34.7207207 L129.261364,82 L127.784091,82 L127.784091,34.7207207 L129.261364,34.7207207 L129.261364,34.7207207 Z" id="Rectangle-678" fill="#D98E12"/>
<ellipse id="Oval-135" stroke="#BA7E1B" stroke-width="3" fill="#FFFFFF" cx="97.8693182" cy="30.6576577" rx="9.23295455" ry="9.23423423"/>
<rect id="Rectangle-682" fill="#BA7E1B" x="92.3295455" y="30.2882883" width="6.64772727" height="1.47747748" rx="100"/>
<path d="M98.2386364,25.1171171 C98.646574,25.1171171 98.9772727,25.4468246 98.9772727,25.854042 L98.9772727,31.0288409 C98.9772727,31.4358333 98.649418,31.7657658 98.2386364,31.7657658 L98.2386364,31.7657658 C97.8306988,31.7657658 97.5,31.4360582 97.5,31.0288409 L97.5,25.854042 C97.5,25.4470496 97.8278547,25.1171171 98.2386364,25.1171171 L98.2386364,25.1171171 L98.2386364,25.1171171 Z" id="Rectangle-682" fill="#BA7E1B"/>
<g id="Group-2" transform="translate(14.772727, 45.063063)" stroke="#FFFFFF">
<g id="Group" transform="translate(24.375000, 16.990991)">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
<g id="Group" transform="translate(0.000000, 16.990991)">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
<g id="Group">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
<g id="Group" transform="translate(24.375000, 0.000000)">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
</g>
<g id="Group-2" transform="translate(138.863636, 45.801802)" stroke="#FFFFFF">
<g id="Group" transform="translate(24.375000, 16.990991)">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
<g id="Group" transform="translate(0.000000, 16.990991)">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
<g id="Group">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
<g id="Group" transform="translate(24.375000, 0.000000)">
<rect id="Rectangle-689" fill="#E3E3F0" x="0" y="0" width="18.4659091" height="11.0810811"/>
<path d="M9.23295455,0.369369369 L9.23295455,10.7117117" id="Line" stroke-linecap="square"/>
<path d="M0.369318182,5.54054054 L18.0965909,5.54054054" id="Line" stroke-linecap="square"/>
</g>
</g>
<rect id="Rectangle-684" fill="#8B572A" x="84.9431818" y="54.6666667" width="27.3295455" height="27.3333333"/>
<rect id="Rectangle-685" fill="#FFFFFF" x="87.8977273" y="59.8378378" width="8.125" height="11.0810811"/>
<rect id="Rectangle-685" fill="#FFFFFF" x="101.931818" y="59.8378378" width="8.125" height="11.0810811"/>
<path d="M98.4825342,2.16337187 L132.737905,26.3684348 L129.772254,30.6044102 L95.2840909,6.45219165 L98.4825342,2.16337187 L98.4825342,2.16337187 Z" id="Rectangle-680" fill="#532F0F"/>
<path d="M98.4835261,2.1480416 L64.2613636,26.3684348 L67.2270145,30.6044102 L101.715177,6.45219165 L98.4835261,2.1480416 L98.4835261,2.1480416 Z" id="Rectangle-680" fill="#532F0F"/>
<path d="M69.0513195,29.4994105 L98.5823475,13.2338119 L127.916815,29.4510751 L98.484067,8.68604175 L69.0513195,29.4994105 Z" id="Path-164" fill="#D98E12"/>
<path d="M98.6079545,55.036036 L98.6079545,81.6716391" id="Line" stroke="#532F0F" stroke-linecap="square"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment