Renaming of prompts
Former-commit-id: afa0c349648f9e8fe9eb2dbfd5214454f8dcc048 [formerly 21ea1d1edc1cb396c38a4e9d95778929e66c590f] [formerly d0d88d46de21a489e3e19d239e23147bbf018d16 [formerly e0f3687b264ccbeda308e04326179488a73409f2]] Former-commit-id: 24e6f33d7bcb0f9306f8d4953c7af4de39adff5f [formerly e0ec0773fff43ba2243a8687ae33b373a3fd4e1a] Former-commit-id: 5f96744de512d3cc6affa99eebb869354f62605b
This commit is contained in:
55
_assets/src/components/Sidebar.vue
Normal file
55
_assets/src/components/Sidebar.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<nav>
|
||||
<router-link class="action" to="/files/">
|
||||
<i class="material-icons">folder</i>
|
||||
<span>My Files</span>
|
||||
</router-link>
|
||||
|
||||
<div v-if="user.allowNew">
|
||||
<button @click="$store.commit('showNewDir', true)" aria-label="New directory" title="New directory" class="action">
|
||||
<i class="material-icons">create_new_folder</i>
|
||||
<span>New folder</span>
|
||||
</button>
|
||||
|
||||
<button @click="$store.commit('showNewFile', true)" aria-label="New file" title="New file" class="action">
|
||||
<i class="material-icons">note_add</i>
|
||||
<span>New file</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-for="plugin in plugins">
|
||||
<button v-for="action in plugin.sidebar" @click="action.click" :aria-label="action.name" :title="action.name" class="action">
|
||||
<i class="material-icons">{{ action.icon }}</i>
|
||||
<span>{{ action.name }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button @click="logout" class="action" id="logout" aria-label="Log out">
|
||||
<i class="material-icons" title="Logout">exit_to_app</i>
|
||||
<span>Logout</span>
|
||||
</button>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
import auth from '@/utils/auth'
|
||||
|
||||
export default {
|
||||
name: 'sidebar',
|
||||
data: () => {
|
||||
return {
|
||||
plugins: []
|
||||
}
|
||||
},
|
||||
computed: mapState(['user']),
|
||||
mounted () {
|
||||
if (window.plugins !== undefined || window.plugins !== null) {
|
||||
this.plugins = window.plugins
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
logout: auth.logout
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user