Make the app name in the breadcrumb dynamic
This commit is contained in:
parent
0af97a969f
commit
7022f9cb99
12
src/App.vue
12
src/App.vue
|
@ -9,8 +9,18 @@
|
|||
</p>
|
||||
</alert-message>
|
||||
|
||||
<router-view/>
|
||||
<router-view :app-name="name"></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style src="./assets/css/tailwind.css"></style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
name: 'Rebuilding Platform.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,18 @@
|
|||
<router-link :to="{ name: 'projects' }" class="font-semibold text-white opacity-75">Projects</router-link>
|
||||
<svg class="h-6 w-6 fill-current text-white opacity-75" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.9 9.9c0-.3.1-.5.3-.7.4-.4 1-.4 1.4 0l3.5 3.5 3.5-3.5c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-4.2 4.2c-.4.4-1 .4-1.4 0l-4.2-4.2c-.2-.2-.3-.4-.3-.7z"/></svg>
|
||||
</li>
|
||||
<li class="flex items-center font-semibold">Rebuilding Platform.sh</li>
|
||||
<li class="flex items-center font-semibold" v-text="appName"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
appName: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -17,7 +17,8 @@ export default new Router({
|
|||
{
|
||||
path: '/project/:id',
|
||||
name: 'project',
|
||||
component: Project
|
||||
component: Project,
|
||||
props: true
|
||||
}
|
||||
]
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<banner>
|
||||
<template v-slot:banner-left>
|
||||
<project-breadcrumb/>
|
||||
<project-breadcrumb :app-name="appName"/>
|
||||
</template>
|
||||
</banner>
|
||||
Project
|
||||
|
@ -13,6 +13,13 @@
|
|||
import ProjectBreadcrumb from '@/components/ProjectBreadcrumb'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
appName: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
ProjectBreadcrumb
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue