Skip to content

Commit a68c610

Browse files
committed
styling, locale in local storage
1 parent 180a0b4 commit a68c610

File tree

17 files changed

+45
-30
lines changed

17 files changed

+45
-30
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1.0">
6-
<title>Vue.js based CRUD</title>
6+
<title>Vue CRUD</title>
77
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel="stylesheet" type="text/css">
88
</head>
99
<body>

src/crud/components/ChildrenTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<!-- Search by fields -->
2626
<v-menu offset-y :close-on-content-click="false">
27-
<v-btn small fab dark slot="activator" :style="'background-color: ' + $store.state.primaryColor">
27+
<v-btn small fab dark slot="activator" class="primary">
2828
<v-icon>filter_list</v-icon>
2929
</v-btn>
3030
<v-list style="overflow-y:false;">
@@ -112,7 +112,7 @@
112112
</v-data-table>
113113
<div class="details-loader-container">
114114
<v-layout v-if="loader" class="details-loader" justify-center align-center>
115-
<v-progress-circular indeterminate :size="100" :width="3" :color="$store.state.primaryColor"></v-progress-circular>
115+
<v-progress-circular indeterminate :size="100" :width="3" color="primary"></v-progress-circular>
116116
</v-layout>
117117
</div>
118118
</v-card>

src/crud/components/Crud.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</div>
2020
<div class="details-loader-container">
2121
<v-layout v-if="detailsLoading" class="details-loader" justify-center align-center>
22-
<v-progress-circular indeterminate :size="100" :width="3" :class="$store.state.primaryColor"></v-progress-circular>
22+
<v-progress-circular indeterminate :size="100" :width="3" color="primary"></v-progress-circular>
2323
</v-layout>
2424
</div>
2525
</div>

src/crud/components/DataTableClientSide.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<v-flex xs12 lg8 text-xs-left text-lg-right>
6969
<!-- Search by fields -->
7070
<v-menu offset-y :close-on-content-click="false">
71-
<v-btn small fab dark slot="activator" :style="'background-color: ' + $store.state.primaryColor">
71+
<v-btn small fab dark slot="activator" class="primary">
7272
<v-icon>filter_list</v-icon>
7373
</v-btn>
7474
<v-list style="overflow-y:false;">

src/crud/components/DataTableServerSide.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
<!-- Search by fields -->
5050
<v-menu offset-y :close-on-content-click="false">
51-
<v-btn small fab dark slot="activator" :style="'background-color: ' + $store.state.primaryColor">
51+
<v-btn small fab dark slot="activator" class="primary">
5252
<v-icon>filter_list</v-icon>
5353
</v-btn>
5454
<v-list style="overflow-y:false;">

src/crud/components/ItemDetailsContainer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<v-dialog v-model="detailsDialog" fullscreen transition="dialog-bottom-transition" :overlay=true>
33
<v-card class="dialog-content">
4-
<v-toolbar style="flex: 0 0 auto;" dark :class="$store.state.primaryColor">
4+
<v-toolbar style="flex: 0 0 auto;" dark class="primary">
55
<v-toolbar-title>{{ title }}</v-toolbar-title>
66
<v-spacer></v-spacer>
77
<v-btn icon @click.native="close()" dark>
@@ -15,7 +15,7 @@
1515
</v-flex>
1616
<v-flex xs12 lg7 pa-3>
1717
<v-card class="children-tabs">
18-
<v-tabs :color="$store.state.secondaryColor" dark :slider-color="$store.state.primaryColor">
18+
<v-tabs color="secondary" dark slider-color="primary">
1919
<slot></slot>
2020
</v-tabs>
2121
</v-card>

src/crud/components/ItemDetailsExtended.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<v-card>
3-
<v-card-text dark :class="$store.state.secondaryColor" class="white--text">
3+
<v-card-text dark class="secondary white--text">
44
<h4 style="text-transform:uppercase;">{{ title }}</h4>
55
</v-card-text>
66
<v-card-text class="details-container">
77
<v-layout row wrap>
8-
<v-flex :class="field.grid" v-for="(field, i) in fields" :key="i" pr-2>
8+
<v-flex class="field" :class="field.grid" v-for="(field, i) in fields" :key="i" pr-2>
99

1010
<!-- divider -->
1111
<h3 v-if="field.type == 'divider'" class="text-xs-center section-header">{{ field.text }}</h3>
@@ -272,4 +272,9 @@ export default {
272272
color: rgba(0, 0, 0, 0.54);
273273
font-size: 16px;
274274
}
275+
.field {
276+
display: flex;
277+
flex-direction: column;
278+
justify-content: center;
279+
}
275280
</style>

src/locales/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ const messages = {
1313
}
1414

1515
export default new VueI18n({
16-
locale: store.state.locale,
16+
locale: store.getters.lng,
1717
messages,
1818
})

src/main.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ import { config } from '@/config.js'
1010

1111
Vue.config.productionTip = false
1212

13-
Vue.use(Vuetify)
13+
Vue.use(Vuetify, {
14+
theme: {
15+
primary: '#34495e',
16+
secondary: '#41b883',
17+
accent: '#82B1FF',
18+
error: '#FF5252',
19+
info: '#2196F3',
20+
success: '#4CAF50',
21+
warning: '#FFC107'
22+
}
23+
})
1424
Vue.use(vueResource)
1525

1626
Vue.http.options.emulateJSON = true;

src/routes/login/Index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<template>
22
<v-layout v-if="loginWait" class="login-loader" justify-center align-center>
3-
<v-progress-circular indeterminate v-bind:size="100" v-bind:width="5" :style="'color: ' + $store.state.primaryColor"></v-progress-circular>
3+
<v-progress-circular indeterminate v-bind:size="100" v-bind:width="5" color="primary"></v-progress-circular>
44
</v-layout>
5-
<v-layout v-else row wrap class="white" :style="'color: ' + $store.state.primaryColor" ma-3>
5+
<v-layout v-else row wrap class="white" color="primary" ma-3>
66
<v-flex xs10 offset-xs1 sm8 offset-sm2 md6 offset-md3 lg4 offset-lg4 xl2 offset-xl5 class="parent text-xs-center">
77
<img class="logo" :src="require(`@/assets/images/${$store.state.logoLg}`)">
88
<h1 class="app-title">{{ $t('login.title') }}</h1>
99
<template>
1010
<v-form v-model="valid" ref="form" lazy-validation v-on:submit.prevent>
1111
<v-menu bottom left v-if="$store.state.localeSelectable">
12-
<v-btn icon slot="activator" dark :style="'background-color: ' + $store.state.secondaryColor">
12+
<v-btn icon slot="activator" dark class="secondary">
1313
<v-icon>translate</v-icon>
1414
</v-btn>
1515
<v-list>
@@ -21,7 +21,7 @@
2121
<v-text-field :label="$t('login.email')" v-model="email" :rules="emailRules" required></v-text-field>
2222
<v-text-field :label="$t('login.password')" v-model="password" :rules="passwordRules" :counter="30" required :append-icon="passAppendIcon"
2323
:append-icon-cb="() => (passwordHidden = !passwordHidden)" :type="passTextFieldType"></v-text-field>
24-
<v-btn type="submit" @click="loginAttempt()" :disabled="!valid" :style="'background-color: ' + $store.state.primaryColor" class="white--text">
24+
<v-btn type="submit" @click="loginAttempt()" :disabled="!valid" class="primary white--text">
2525
{{ $t('login.submit') }}
2626
</v-btn>
2727
</v-form>

0 commit comments

Comments
 (0)