You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
Updates on front end :D
Former-commit-id: 032b13b1f3a6216ae6bafde75f583038916b4f74 [formerly 80588a95ad5168ecab65e3d8cc8968bad9a20a6b] [formerly 94b306854bac60361ddf1b945a3edec7204d1327 [formerly 193adea6bb]]
Former-commit-id: 67b5219c1a6488c1a797bec42a0dec2036441a48 [formerly 28183c674806c3125a285a48905a01e1e835be7e]
Former-commit-id: d2169aab351eab252ea34e07bb943411aa8e9cb4
This commit is contained in:
@@ -4,7 +4,11 @@
|
||||
<button @click="back" class="action" aria-label="Close Preview" id="close">
|
||||
<i class="material-icons">close</i>
|
||||
</button>
|
||||
<!-- TODO: add more buttons -->
|
||||
|
||||
<rename-button v-if="allowEdit()"></rename-button>
|
||||
<delete-button v-if="allowEdit()"></delete-button>
|
||||
<download-button></download-button>
|
||||
<info-button></info-button>
|
||||
</div>
|
||||
|
||||
<div class="preview">
|
||||
@@ -24,9 +28,19 @@
|
||||
|
||||
<script>
|
||||
import page from '../page'
|
||||
import InfoButton from './InfoButton'
|
||||
import DeleteButton from './DeleteButton'
|
||||
import RenameButton from './RenameButton'
|
||||
import DownloadButton from './DownloadButton'
|
||||
|
||||
export default {
|
||||
name: 'preview',
|
||||
components: {
|
||||
InfoButton,
|
||||
DeleteButton,
|
||||
RenameButton,
|
||||
DownloadButton
|
||||
},
|
||||
data: function () {
|
||||
return window.info.req.data
|
||||
},
|
||||
@@ -37,6 +51,9 @@ export default {
|
||||
back: function (event) {
|
||||
let url = page.removeLastDir(window.location.pathname)
|
||||
page.open(url)
|
||||
},
|
||||
allowEdit: function (event) {
|
||||
return window.info.user.allowEdit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user