Commit 313f23f8 authored by anton's avatar anton
Browse files

Update assets navigation

parent e6e1ce2e
......@@ -101,6 +101,11 @@
label: 'Groups',
route: 'users.groups',
path: '/users/groups'
},
assets: {
label: 'Assets',
route: 'users.assets',
path: '/users/assets'
}
}
}
......@@ -117,6 +122,10 @@
(t === 'users' && parts[1] === 'groups_edit')) return true
else return false
},
isAssets () {
const parts = this.$route.name.split('.')
return parts[0] === 'users' && parts[1].indexOf('assets') === 0
},
createScreen () {
const parts = this.$route.name.split('.')
return parts[parts.length - 1] === 'create' || parts[parts.length - 1] === 'groups_create'
......@@ -130,6 +139,7 @@
if (t === 'users' && parts[1] === 'groups') t = 'groups'
if (t === 'users' && parts[1] === 'groups_create') t = 'groups'
if (t === 'users' && parts[1] === 'groups_edit') t = 'groups'
if (t === 'users' && parts[1].indexOf('assets') === 0) t = 'assets'
if (t in this.topLevel) {
let _label = this.topLevel[t].label
......@@ -298,6 +308,13 @@
name: 'users.groups_create'
}
}
if (this.breadcrumbs[0].label === 'Assets' && !this.breadcrumbs[1]) {
ab = {
label: this.$t('navigation.users.assets_upload'),
route: 'assets/upload',
name: 'users.assets_upload'
}
}
if (this.timeline) {
ab = {
label: this.$t('buttons.add_media'),
......
......@@ -209,7 +209,19 @@
:route="{ name: 'users.assets', params: { uuid: 'me' } }",
:label="$t('navigation.users.assets')",
name="users.assets",
icon="file")
icon="insert_drive_file")
q-item.q-my-sm.lt-sm(v-if="currentApp === 'assets'")
q-item-main
user-nav-button.text-white.round-borders(
:route="'/users/assets/upload'",
:label="$t('navigation.users.assets_upload')",
:name="'users.assets_upload'",
:icon="'add'",
:disabled="currentRoute === 'users.assets_upload'",
:class="[currentRoute === 'users.assets_upload' ? 'bg-grey-9' : 'bg-primary']")
q-item-side(v-if="currentRoute === 'users.assets_upload'")
q-btn.bg-primary.text-white(type="a", to="/users/groups", icon="clear", round, size="sm")
// ------------------------------------------------------------------------------------------------------ groups
q-item.q-pa-none.ui-border-bottom(v-if="user && showGroups", multiline)
......@@ -327,7 +339,8 @@
'users.groups_edit'
],
assets: [
'users.assets'
'users.assets',
'users.assets_upload'
]
},
activeUserButtons: [],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment