2018-03-03 06:32:58 +00:00
|
|
|
<template lang='pug'>
|
2018-03-19 03:12:56 +00:00
|
|
|
v-toolbar(color='black', dark, app, clipped-left, fixed, flat, dense)
|
|
|
|
v-menu(open-on-hover, offset-y, bottom, left, nudge-top='-18', min-width='250')
|
|
|
|
v-toolbar-side-icon(slot='activator')
|
|
|
|
v-icon view_module
|
|
|
|
v-list(dense)
|
|
|
|
v-list-tile(avatar, href='/')
|
|
|
|
v-list-tile-avatar: v-icon(color='blue') home
|
|
|
|
v-list-tile-content Home
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='green') add_box
|
|
|
|
v-list-tile-content New Page
|
|
|
|
v-divider.my-0
|
|
|
|
v-subheader Current Page
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='indigo') edit
|
|
|
|
v-list-tile-content Edit
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='indigo') history
|
|
|
|
v-list-tile-content History
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='indigo') code
|
|
|
|
v-list-tile-content View Source
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='indigo') forward
|
|
|
|
v-list-tile-content Move / Rename
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='red darken-2') delete
|
|
|
|
v-list-tile-content Delete
|
|
|
|
v-divider.my-0
|
|
|
|
v-subheader Assets
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='blue-grey') burst_mode
|
|
|
|
v-list-tile-content Images
|
|
|
|
v-list-tile(avatar, @click='')
|
|
|
|
v-list-tile-avatar: v-icon(color='blue-grey') description
|
|
|
|
v-list-tile-content Files
|
2018-03-03 06:32:58 +00:00
|
|
|
v-toolbar-title
|
|
|
|
span.subheading Wiki.js
|
|
|
|
v-spacer
|
2018-03-12 04:09:54 +00:00
|
|
|
transition(name='navHeaderSearch')
|
|
|
|
v-text-field(
|
|
|
|
ref='searchField',
|
|
|
|
v-if='searchIsShown',
|
|
|
|
v-model='search',
|
|
|
|
clearable,
|
|
|
|
color='blue',
|
|
|
|
label='Search...',
|
|
|
|
single-line,
|
|
|
|
hide-details,
|
|
|
|
append-icon='search',
|
|
|
|
:append-icon-cb='searchEnter',
|
|
|
|
:loading='searchIsLoading',
|
|
|
|
@keyup.enter='searchEnter',
|
|
|
|
@keyup.esc='searchToggle'
|
|
|
|
)
|
|
|
|
v-progress-linear(
|
|
|
|
indeterminate,
|
|
|
|
slot='progress',
|
|
|
|
height='2',
|
|
|
|
color='blue'
|
|
|
|
)
|
|
|
|
v-spacer
|
2018-03-25 02:35:47 +00:00
|
|
|
v-progress-circular.mr-3(indeterminate, color='blue', v-show='isLoading')
|
2018-03-19 03:12:56 +00:00
|
|
|
slot(name='actions')
|
2018-03-12 04:09:54 +00:00
|
|
|
transition(name='navHeaderSearch')
|
|
|
|
v-btn(icon, @click='searchToggle', v-if='!searchIsShown')
|
|
|
|
v-icon(color='grey') search
|
|
|
|
v-btn(icon, href='/a')
|
2018-03-03 06:32:58 +00:00
|
|
|
v-icon(color='grey') settings
|
|
|
|
v-menu(offset-y, min-width='300')
|
|
|
|
v-btn(icon, slot='activator')
|
|
|
|
v-icon(color='grey') account_circle
|
|
|
|
v-list.py-0
|
|
|
|
v-list-tile.py-3(avatar)
|
|
|
|
v-list-tile-avatar
|
|
|
|
v-avatar.red(:size='40'): span.white--text.subheading JD
|
|
|
|
v-list-tile-content
|
|
|
|
v-list-tile-title John Doe
|
|
|
|
v-list-tile-sub-title john.doe@example.com
|
|
|
|
v-divider.my-0
|
2018-03-12 04:09:54 +00:00
|
|
|
v-list-tile(href='/p')
|
|
|
|
v-list-tile-action: v-icon(color='red') person
|
|
|
|
v-list-tile-title Profile
|
|
|
|
v-list-tile(href='/logout')
|
2018-03-03 06:32:58 +00:00
|
|
|
v-list-tile-action: v-icon(color='red') exit_to_app
|
|
|
|
v-list-tile-title Logout
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-03-25 02:35:47 +00:00
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
2018-03-03 06:32:58 +00:00
|
|
|
export default {
|
2018-03-06 04:13:20 +00:00
|
|
|
data() {
|
2018-03-12 04:09:54 +00:00
|
|
|
return {
|
2018-03-19 03:12:56 +00:00
|
|
|
menuIsShown: true,
|
2018-03-12 04:09:54 +00:00
|
|
|
searchIsLoading: false,
|
|
|
|
searchIsShown: false,
|
|
|
|
search: ''
|
|
|
|
}
|
|
|
|
},
|
2018-03-25 02:35:47 +00:00
|
|
|
computed: {
|
|
|
|
...mapGetters(['isLoading'])
|
|
|
|
},
|
2018-03-12 04:09:54 +00:00
|
|
|
methods: {
|
|
|
|
searchToggle() {
|
|
|
|
this.searchIsLoading = false
|
|
|
|
this.searchIsShown = !this.searchIsShown
|
|
|
|
if (this.searchIsShown) {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.searchField.focus()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
searchEnter() {
|
|
|
|
this.searchIsLoading = true
|
|
|
|
}
|
2018-03-06 04:13:20 +00:00
|
|
|
}
|
2018-03-03 06:32:58 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2018-03-12 04:09:54 +00:00
|
|
|
<style lang='scss'>
|
|
|
|
.navHeaderSearch {
|
|
|
|
&-enter-active, &-leave-active {
|
|
|
|
transition: opacity .25s ease, transform .25s ease;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
&-enter-active {
|
|
|
|
transition-delay: .25s;
|
|
|
|
}
|
|
|
|
&-enter, &-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateY(-25px);
|
|
|
|
}
|
|
|
|
}
|
2018-03-03 06:32:58 +00:00
|
|
|
</style>
|