Start integrating Hugo in the new plugin

This commit is contained in:
Henrique Dias committed 2017-07-11 16:58:18 +01:00
1 parent 465b10a02a
commit 8b1d36dfb9
26 files changed
+837 -2497

No files matched your search

+39 -2
View File
@@ -16,6 +16,20 @@
<i class="material-icons" title="Save">save</i>
</button>
<div v-for="plugin in plugins" :key="plugin.name">
<button class="action"
v-for="action in plugin.header.visible"
v-if="action.if(pluginData, $route)"
@click="action.click($event, pluginData, $route)"
:aria-label="action.name"
:id="action.id"
:title="action.name"
:key="action.name">
<i class="material-icons">{{ action.icon }}</i>
<span>{{ action.name }}</span>
</button>
</div>
<button @click="openMore" id="more" aria-label="More" title="More" class="action">
<i class="material-icons">more_vert</i>
</button>
@@ -36,6 +50,20 @@
<delete-button v-show="showDeleteButton"></delete-button>
</div>
<div v-for="plugin in plugins" :key="plugin.name">
<button class="action"
v-for="action in plugin.header.hidden"
v-if="action.if(pluginData, $route)"
@click="action.click($event, pluginData, $route)"
:id="action.id"
:aria-label="action.name"
:title="action.name"
:key="action.name">
<i class="material-icons">{{ action.icon }}</i>
<span>{{ action.name }}</span>
</button>
</div>
<switch-button v-show="showSwitchButton"></switch-button>
<download-button v-show="showCommonButton"></download-button>
<upload-button v-show="showUpload"></upload-button>
@@ -61,6 +89,8 @@ import DownloadButton from './buttons/Download'
import SwitchButton from './buttons/SwitchView'
import MoveButton from './buttons/Move'
import {mapGetters, mapState} from 'vuex'
import api from '@/utils/api'
import buttons from '@/utils/buttons'
export default {
name: 'main',
@@ -76,7 +106,13 @@ export default {
},
data: function () {
return {
width: window.innerWidth
width: window.innerWidth,
pluginData: {
api,
buttons,
'store': this.$store,
'router': this.$router
}
}
},
created () {
@@ -93,7 +129,8 @@ export default {
'user',
'loading',
'reload',
'multiple'
'multiple',
'plugins'
]),
isMobile () {
return this.width <= 736