Users screen button fix

This commit is contained in:
An Phan 2016-01-06 19:19:00 +08:00
parent edfc1750f0
commit bca0e690f6

View file

@ -1,9 +1,16 @@
<template> <template>
<section id="usersWrapper"> <section id="usersWrapper">
<h1 class="heading"> <h1 class="heading">
<span>Users</span> <span>Users
<i class="fa fa-chevron-down toggler"
v-show="isPhone && !showingControls"
@click="showingControls = true"></i>
<i class="fa fa-chevron-up toggler"
v-show="isPhone && showingControls"
@click.prevent="showingControls = false"></i>
</span>
<div class="buttons"> <div class="buttons" v-show="!isPhone || showingControls">
<button class="btn-create" @click="creating = !creating"> <button class="btn-create" @click="creating = !creating">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
Add</button> Add</button>
@ -91,6 +98,7 @@
<script> <script>
import _ from 'lodash'; import _ from 'lodash';
import isMobile from 'ismobilejs';
import userStore from '../../../stores/user'; import userStore from '../../../stores/user';
@ -98,6 +106,8 @@
data() { data() {
return { return {
state: userStore.state, state: userStore.state,
isPhone: isMobile.phone,
showingControls: false,
creating: false, creating: false,
newUser: _.clone(userStore.stub), newUser: _.clone(userStore.stub),
editedUser: _.clone(userStore.stub), editedUser: _.clone(userStore.stub),