This commit is contained in:
Peter Papp
2021-04-07 07:48:07 +02:00
parent 87b3625b27
commit 30ae2c0a54
13 changed files with 163 additions and 114 deletions
+11 -4
View File
@@ -1,18 +1,24 @@
<template>
<div id="vuefilemanager" @click="unClick" v-cloak>
<!--UI components-->
<Alert />
<ToastrWrapper />
<router-view v-if="isLoadedTranslations" />
<CookieDisclaimer />
<Vignette />
<!--Show spinner before translations is loaded-->
<Spinner v-if="! isLoadedTranslations"/>
<!--App view-->
<router-view v-if="isLoadedTranslations" />
</div>
</template>
<script>
import ToastrWrapper from '@/components/Others/Notifications/ToastrWrapper'
import CookieDisclaimer from '@/components/Others/CookieDisclaimer'
import Spinner from '@/components/FilesView/Spinner'
import Vignette from '@/components/Others/Vignette'
import Alert from '@/components/FilesView/Alert'
import {events} from './bus'
@@ -23,6 +29,7 @@ export default {
CookieDisclaimer,
ToastrWrapper,
Vignette,
Spinner,
Alert
},
data() {
@@ -39,7 +46,7 @@ export default {
// Get language translations
this.$store.dispatch('getLanguageTranslations', this.$root.$data.config.language)
.then(response => {
.then(() => {
this.isLoadedTranslations = true
// Store config to vuex
@@ -96,7 +96,6 @@
<Option @click.native="addToFavourites" :title="isInFavourites ? $t('context_menu.remove_from_favourites') : $t('context_menu.add_to_favourites')" icon="favourites" />
</OptionGroup>
<OptionGroup v-if="item && isMultiSelectContextMenu">
<Option @click.native="renameItem" :title="$t('context_menu.rename')" icon="rename" />
<Option @click.native="moveItem" v-if="!$isThisLocation(['latest'])" :title="$t('context_menu.move')" icon="move-item" />
@@ -106,7 +105,6 @@
<Option @click.native="deleteItem" :title="$t('context_menu.delete')" icon="trash" />
</OptionGroup>
<OptionGroup v-if="item && isMultiSelectContextMenu ">
<Option @click.native="ItemDetail" :title="$t('context_menu.detail')" icon="detail" />
<Option @click.native="downloadItem" v-if="!isFolder" :title="$t('context_menu.download')" icon="download" />
@@ -139,7 +137,6 @@
</OptionGroup>
<!-- Single options -->
<OptionGroup v-if="item && isMultiSelectContextMenu">
<Option @click.native="renameItem" :title=" $t('context_menu.rename')" icon="rename" />
<Option @click.native="moveItem" :title="$t('context_menu.move')" icon="move-item" />
@@ -153,7 +150,6 @@
</OptionGroup>
<!-- Multi options -->
<OptionGroup v-if="item && !isMultiSelectContextMenu">
<Option @click.native="moveItem" :title="$t('context_menu.move')" icon="move-item" />
<Option @click.native="deleteItem" :title="$t('context_menu.delete')" icon="trash" />
@@ -323,7 +319,9 @@ export default {
}
},
createFolder() {
this.$store.dispatch('createFolder', this.$t('popup_create_folder.folder_default_name'))
this.$store.dispatch('createFolder', {
name: this.$t('popup_create_folder.folder_default_name')
})
},
closeAndResetContextMenu() {
// Close context menu
+1 -1
View File
@@ -207,7 +207,7 @@
this.isLoading = true
axios.
post(`/api/share/${this.shareOptions.token}/send-email`, {
post(`/api/share/${this.shareOptions.token}/email`, {
emails: this.emails
})
.catch(() => {
+1 -1
View File
@@ -33,7 +33,7 @@
</router-link>
</div>
<!--User avatar & Logout-->
<!--Logout-->
<ul class="icon-navigation logout">
<li @click="$store.dispatch('logOut')" :title="$t('locations.logout')" class="icon-navigation-item">
<div class="button-icon">
+2 -6
View File
@@ -12,10 +12,10 @@ const Helpers = {
let enableEmptyInput = ['mimetypes_blacklist', 'google_analytics', 'upload_limit']
if (value === '' && !enableEmptyInput.includes(name)) return
if (value === '' || value === ' ' && !enableEmptyInput.includes(name)) return
axios.post(this.$store.getters.api + route, {name, value, _method: 'patch'})
.catch(error => {
.catch(() => {
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
@@ -90,10 +90,6 @@ const Helpers = {
win.focus()
}
Vue.prototype.$createFolder = function (folderName) {
this.$store.dispatch('createFolder', folderName)
}
Vue.prototype.$uploadFiles = async function (files) {
if (files.length == 0) return
-4
View File
@@ -16,10 +16,6 @@ const actions = {
.then((response) => {
resolve(response)
// Redirect user if is logged
if (router.currentRoute.name === 'SignIn')
router.push({name: 'Files'})
commit('RETRIEVE_USER', response.data)
}).catch((error) => {
+1 -1
View File
@@ -139,7 +139,7 @@
this.columns = [
{
label: this.$t('admin_page_user.table.name'),
field: 'name',
field: 'email',
sortable: true
},
{