Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tab color and elevation #381

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions src/components/RoadTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,27 @@
<v-tabs
v-model="tabRoad"
show-arrows
color="blue lighten-5"
>
<v-tabs-slider />
<v-tab
<template
v-for="roadId in Object.keys(roads)"
:key="roadId"
:href="`#${roadId}`"
@click="$store.commit('setActiveRoad', roadId)"
class = "m-0 p-0"
>
{{ roads[roadId].name }}
<v-btn v-show="roadId == tabRoad" icon flat @click="newRoadName = roads[roadId].name; editDialog = true;">
<v-icon>edit</v-icon>
</v-btn>
</v-tab>
<v-tab
:key="roadId"
:href="`#${roadId}`"
class="blue lighten-5"
active-class="primary lighten-2 elevation-5"
@click="$store.commit('setActiveRoad', roadId)"
>
<span>{{ roads[roadId].name }}</span>
<v-btn v-show="roadId == tabRoad" icon flat @click="newRoadName = roads[roadId].name; editDialog = true;">
<v-icon>edit</v-icon>
</v-btn>
</v-tab>
<v-divider class = "mt-0 mb-0" vertical inset/>
</template>
<v-dialog v-model="editDialog" max-width="600" @input="newRoadName = ''">
<v-card>
<v-btn icon flat style="float:right" @click="editDialog = false">
Expand Down