|
@ -11,14 +11,8 @@ |
|
|
Start annotation |
|
|
Start annotation |
|
|
</v-btn> |
|
|
</v-btn> |
|
|
<template v-for="(item, i) in items"> |
|
|
<template v-for="(item, i) in items"> |
|
|
<v-divider |
|
|
|
|
|
v-if="item.divider" |
|
|
|
|
|
:key="i" |
|
|
|
|
|
dark |
|
|
|
|
|
class="my-4" |
|
|
|
|
|
/> |
|
|
|
|
|
<v-list-item |
|
|
<v-list-item |
|
|
v-else |
|
|
|
|
|
|
|
|
v-if="isVisible(item)" |
|
|
:key="i" |
|
|
:key="i" |
|
|
@click="$router.push('/projects/' + $route.params.id + '/' + item.link)" |
|
|
@click="$router.push('/projects/' + $route.params.id + '/' + item.link)" |
|
|
> |
|
|
> |
|
@ -44,18 +38,23 @@ export default { |
|
|
type: String, |
|
|
type: String, |
|
|
default: '', |
|
|
default: '', |
|
|
required: true |
|
|
required: true |
|
|
|
|
|
}, |
|
|
|
|
|
role: { |
|
|
|
|
|
type: Object, |
|
|
|
|
|
default: () => {}, |
|
|
|
|
|
required: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
items: [ |
|
|
items: [ |
|
|
{ icon: 'mdi-home', text: 'Home', link: '' }, |
|
|
|
|
|
{ icon: 'mdi-database', text: 'Dataset', link: 'dataset' }, |
|
|
|
|
|
{ icon: 'label', text: 'Labels', link: 'labels' }, |
|
|
|
|
|
{ icon: 'person', text: 'Members', link: 'members' }, |
|
|
|
|
|
{ icon: 'mdi-book-open-outline', text: 'Guideline', link: 'guideline' }, |
|
|
|
|
|
{ icon: 'mdi-chart-bar', text: 'Statistics', link: 'statistics' } |
|
|
|
|
|
|
|
|
{ icon: 'mdi-home', text: 'Home', link: '', adminOnly: false }, |
|
|
|
|
|
{ icon: 'mdi-database', text: 'Dataset', link: 'dataset', adminOnly: true }, |
|
|
|
|
|
{ icon: 'label', text: 'Labels', link: 'labels', adminOnly: true }, |
|
|
|
|
|
{ icon: 'person', text: 'Members', link: 'members', adminOnly: true }, |
|
|
|
|
|
{ icon: 'mdi-book-open-outline', text: 'Guideline', link: 'guideline', adminOnly: true }, |
|
|
|
|
|
{ icon: 'mdi-chart-bar', text: 'Statistics', link: 'statistics', adminOnly: true } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -64,6 +63,12 @@ export default { |
|
|
to() { |
|
|
to() { |
|
|
return `/projects/${this.$route.params.id}/${this.link}` |
|
|
return `/projects/${this.$route.params.id}/${this.link}` |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
isVisible(item) { |
|
|
|
|
|
return !item.adminOnly || this.role.is_project_admin |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |