Skip to content

Commit 0fc6680

Browse files
Merge pull request #4 from JuampiRombola/improve-design [ok:FdelMazo]
Improve design
2 parents 3cd9c29 + 63a772e commit 0fc6680

File tree

13 files changed

+173
-29
lines changed

13 files changed

+173
-29
lines changed

public/favicon.ico

12.5 KB
Binary file not shown.

src/App.vue

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,43 @@
11
<template>
22
<v-app>
3-
<v-app-bar app dense flat clipped-left color="primary">
4-
<v-app-bar-nav-icon color="white" @click="mini = !mini"></v-app-bar-nav-icon>
3+
<v-app-bar app clipped-left color="white" class="elevation-1" height="56">
4+
<v-app-bar-nav-icon @click="mini = !mini"></v-app-bar-nav-icon>
5+
6+
<v-img
7+
max-width="28"
8+
:src="require('@/assets/frux-logo.svg')"
9+
alt="frux logo"
10+
class="ml-2 pointer"
11+
@click="redirect('Dashboard')"
12+
></v-img>
13+
14+
<v-img
15+
max-width="56"
16+
:src="require('@/assets/frux-name.svg')"
17+
alt="frux name"
18+
class="ml-2 pointer"
19+
@click="redirect('Dashboard')"
20+
></v-img>
521

6-
<v-toolbar-title>Frux</v-toolbar-title>
722
</v-app-bar>
823

924
<v-navigation-drawer
10-
color="accent"
1125
app
1226
v-model="drawer"
1327
:mini-variant.sync="mini"
1428
clipped
29+
color="#0D44511A"
1530
>
1631
<v-list dense>
1732
<v-list-item
1833
v-for="item in items"
1934
:key="item.title"
2035
link
21-
class="my-2"
36+
:class="['my-2', isCurrentRoute(item.route) ? 'selected' : '' ]"
2237
@click="redirect(item.route)"
2338
>
2439
<v-list-item-icon>
25-
<v-icon color="primary">{{ item.icon }}</v-icon>
40+
<v-icon :color="isCurrentRoute(item.route) ? 'primary' : ''">{{ item.icon }}</v-icon>
2641
</v-list-item-icon>
2742

2843
<v-list-item-content>
@@ -51,9 +66,9 @@ export default {
5166
{ title: 'Dashboard', icon: 'mdi-view-dashboard', route: 'Dashboard' },
5267
{ title: 'Usuarios', icon: 'mdi-account-group', route: 'Users' },
5368
{ title: 'Proyectos', icon: 'mdi-inbox-multiple', route: 'Projects' },
54-
{ title: 'Transacciones', icon: 'mdi-cash-multiple', route: 'Dashboard' },
55-
{ title: 'Métricas', icon: 'mdi-chart-pie', route: 'Dashboard' },
56-
{ title: 'Servidores', icon: 'mdi-server', route: 'Dashboard' }
69+
{ title: 'Transacciones', icon: 'mdi-cash-multiple', route: 'Transactions' },
70+
{ title: 'Métricas', icon: 'mdi-chart-pie', route: 'Metrics' },
71+
{ title: 'Servidores', icon: 'mdi-server', route: 'Servers' }
5772
],
5873
mini: true
5974
}
@@ -62,7 +77,19 @@ export default {
6277
methods: {
6378
redirect (routeName) {
6479
this.$router.push({ name: routeName })
80+
},
81+
isCurrentRoute (routeName) {
82+
return this.$router.currentRoute.name === routeName
6583
}
6684
}
6785
}
6886
</script>
87+
88+
<style scoped>
89+
.selected {
90+
background-color: rgba(13, 68, 81, 0.2);
91+
}
92+
.pointer {
93+
cursor: pointer;
94+
}
95+
</style>

src/assets/frux-logo.svg

Lines changed: 15 additions & 0 deletions
Loading

src/assets/frux-name.svg

Lines changed: 38 additions & 0 deletions
Loading

src/assets/logo.png

-6.69 KB
Binary file not shown.

src/assets/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/plugins/vuetify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default new Vuetify({
77
theme: {
88
themes: {
99
light: {
10-
primary: '#7A8435',
10+
primary: '#0d4451',
1111
secondary: '#9B6F4F',
1212
accent: '#C6CBA3',
1313
error: '#FF5252',

src/router/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,26 @@ const routes = [
2727
path: '/projects',
2828
name: 'Projects',
2929
component: () => import('../views/Projects.vue')
30+
},
31+
{
32+
path: '/transactions',
33+
name: 'Transactions',
34+
component: () => import('../views/Transactions.vue')
35+
},
36+
{
37+
path: '/metrics',
38+
name: 'Metrics',
39+
component: () => import('../views/Metrics.vue')
40+
},
41+
{
42+
path: '/servers',
43+
name: 'Servers',
44+
component: () => import('../views/Servers.vue')
3045
}
3146
]
3247

3348
const router = new VueRouter({
49+
mode: 'history',
3450
routes
3551
})
3652

src/views/Metrics.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<template>
2+
<h1>Métricas</h1>
3+
</template>
4+
5+
<script>
6+
export default {
7+
name: 'Metrics'
8+
}
9+
</script>
10+
11+
<style scoped>
12+
13+
</style>

src/views/Projects.vue

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
<template>
2-
<v-container class="py-8 px-6" fluid>
2+
<v-container>
33
<v-row>
44
<v-col>
5-
<v-data-table
6-
:headers="headers"
7-
:items="projects"
8-
:options.sync="options"
9-
:server-items-length="totalCount"
10-
:loading="loading"
11-
class="elevation-1"
12-
></v-data-table>
5+
<v-card flat>
6+
<v-card-title>Proyectos</v-card-title>
7+
<v-card-text>
8+
<v-data-table
9+
:headers="headers"
10+
:items="projects"
11+
:options.sync="options"
12+
:server-items-length="totalCount"
13+
:loading="loading"
14+
class="elevation-1"
15+
></v-data-table>
16+
</v-card-text>
17+
</v-card>
1318
</v-col>
1419
</v-row>
1520
</v-container>

0 commit comments

Comments
 (0)