Start integrating Hugo in the new plugin
Former-commit-id: dcc6bd82b3d3a89637a1032aad1a25d0b1f80046 [formerly 8784cd37bf58e81cdbe1bcec00e6f16b58efc915] [formerly 9e25850e063ae0825de337d5d5f29cee601b9040 [formerly 8b1d36dfb9ebfa001ddeef98034bb5a73d135c94]] Former-commit-id: 04a38bea2d141093570d9289d0d0a056a136fe8a [formerly 5995538504889e698aa6cd35b7da40c38b5d5ddf] Former-commit-id: 8c81a0b060167e1a2983a99bc87b380838ac07dc
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user