mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-18 03:05:01 +00:00
Trash moved to file page
This commit is contained in:
@@ -20,19 +20,13 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Trash'}" :title="$t('locations.trash')" class="icon-navigation-item trash">
|
||||
<div class="button-icon">
|
||||
<trash-2-icon size="19"></trash-2-icon>
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Profile'}" :class="{'is-active': isUserProfileRoute}" class="icon-navigation-item settings">
|
||||
<router-link :to="{name: 'Profile'}" :class="{'is-active': isUserProfileRoute}" :title="$t('locations.profile')" class="icon-navigation-item settings">
|
||||
<div class="button-icon">
|
||||
<user-icon size="19"></user-icon>
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link v-if="user.data.attributes.role === 'admin'" :to="{name: 'Dashboard'}" :class="{'is-active': $isThisRoute($route, adminRoutes)}" class="icon-navigation-item users">
|
||||
<router-link v-if="user.data.attributes.role === 'admin'" :to="{name: 'Dashboard'}" :class="{'is-active': $isThisRoute($route, adminRoutes)}" :title="$t('locations.settings')" class="icon-navigation-item users">
|
||||
<div class="button-icon">
|
||||
<settings-icon size="19"></settings-icon>
|
||||
</div>
|
||||
@@ -41,7 +35,7 @@
|
||||
|
||||
<!--User avatar & Logout-->
|
||||
<ul class="icon-navigation logout">
|
||||
<li @click="$store.dispatch('logOut')" class="icon-navigation-item">
|
||||
<li @click="$store.dispatch('logOut')" :title="$t('locations.logout')" class="icon-navigation-item">
|
||||
<div class="button-icon">
|
||||
<power-icon size="19"></power-icon>
|
||||
</div>
|
||||
|
||||
@@ -357,7 +357,10 @@
|
||||
"locations": {
|
||||
"home": "首页",
|
||||
"shared": "已分享",
|
||||
"trash": "垃圾箱"
|
||||
"trash": "垃圾箱",
|
||||
"profile": "Profile",
|
||||
"settings": "Settings",
|
||||
"logout": "Log Out"
|
||||
},
|
||||
"menu": {
|
||||
"admin": "Admin",
|
||||
@@ -580,10 +583,6 @@
|
||||
"message": "您的订阅已重新激活,并且将按原始计费周期计费。",
|
||||
"title": "订阅已取消"
|
||||
},
|
||||
"popup_trashed": {
|
||||
"message": "现在,您的垃圾箱已经被完全清空。",
|
||||
"title": "您的垃圾箱已清空!"
|
||||
},
|
||||
"preview_type": {
|
||||
"grid": "方块",
|
||||
"list": "列表"
|
||||
|
||||
@@ -359,7 +359,10 @@
|
||||
"locations": {
|
||||
"home": "Home",
|
||||
"shared": "Shared",
|
||||
"trash": "Trash"
|
||||
"trash": "Trash",
|
||||
"profile": "Profile",
|
||||
"settings": "Settings",
|
||||
"logout": "Log Out"
|
||||
},
|
||||
"menu": {
|
||||
"admin": "Administration",
|
||||
@@ -582,10 +585,6 @@
|
||||
"message": "Your subscription was re-activated, and they will be billed on the original billing cycle.",
|
||||
"title": "Subscription Was Resumed"
|
||||
},
|
||||
"popup_trashed": {
|
||||
"message": "So now, you have clear and empty trash.",
|
||||
"title": "Your trash was erased!"
|
||||
},
|
||||
"preview_type": {
|
||||
"grid": "Grid",
|
||||
"list": "List"
|
||||
|
||||
@@ -359,7 +359,10 @@
|
||||
"locations": {
|
||||
"home": "Domov",
|
||||
"shared": "Zdieľané",
|
||||
"trash": "Kôš"
|
||||
"trash": "Kôš",
|
||||
"profile": "Profil",
|
||||
"settings": "Nastavenia",
|
||||
"logout": "Odhlásiť sa"
|
||||
},
|
||||
"menu": {
|
||||
"admin": "Administrácia",
|
||||
@@ -582,10 +585,6 @@
|
||||
"message": "Váš odber bol znova aktivovaný a budú vám účtované poplatky podľa pôvodného fakturačného cyklu.",
|
||||
"title": "Predplatné bolo obnovené"
|
||||
},
|
||||
"popup_trashed": {
|
||||
"message": "Od teraz máte prázdny a čistý kôš",
|
||||
"title": "Váš kôš bol vymazaný!"
|
||||
},
|
||||
"preview_type": {
|
||||
"grid": "Mriežka",
|
||||
"list": "List"
|
||||
|
||||
Vendored
-9
@@ -382,15 +382,6 @@ const routesUser = [
|
||||
requiresAuth: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Trash',
|
||||
path: '/trash',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "chunks/trash" */ './views/FilePages/Trash'),
|
||||
meta: {
|
||||
requiresAuth: true
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Settings',
|
||||
path: '/settings',
|
||||
|
||||
-6
@@ -293,12 +293,6 @@ const actions = {
|
||||
|
||||
// Remove file preview
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
|
||||
// Show success message
|
||||
events.$emit('success:open', {
|
||||
title: i18n.t('popup_trashed.title'),
|
||||
message: i18n.t('popup_trashed.message'),
|
||||
})
|
||||
})
|
||||
.catch(() => isSomethingWrong())
|
||||
},
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
{{ $t('sidebar.latest') }}
|
||||
</div>
|
||||
</a>
|
||||
<a class="menu-list-item link trash" :class="{'is-active-trash': $isThisLocation(['trash', 'trash-root'])}"
|
||||
@click="getTrash">
|
||||
<div class="icon">
|
||||
<trash2-icon size="17"></trash2-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('locations.trash') }}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</ContentGroup>
|
||||
|
||||
@@ -85,6 +94,7 @@
|
||||
import {
|
||||
UploadCloudIcon,
|
||||
FolderIcon,
|
||||
Trash2Icon,
|
||||
HomeIcon,
|
||||
XIcon,
|
||||
} from 'vue-feather-icons'
|
||||
@@ -99,6 +109,7 @@
|
||||
UploadCloudIcon,
|
||||
ContentGroup,
|
||||
FolderIcon,
|
||||
Trash2Icon,
|
||||
HomeIcon,
|
||||
XIcon,
|
||||
},
|
||||
@@ -121,6 +132,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTrash() {
|
||||
this.$store.dispatch('getTrash')
|
||||
},
|
||||
getLatest() {
|
||||
this.$store.dispatch('getLatest')
|
||||
},
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<template>
|
||||
<section id="viewport">
|
||||
<ContentSidebar>
|
||||
|
||||
<!--Tools-->
|
||||
<ContentGroup :title="$t('sidebar.tools_title')" class="navigator">
|
||||
<div class="menu-list-wrapper vertical">
|
||||
<div class="menu-list-item link" @click="emptyTrash()">
|
||||
<div class="icon">
|
||||
<trash-icon size="17"></trash-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('context_menu.empty_trash') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentGroup>
|
||||
</ContentSidebar>
|
||||
<ContentFileView/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ContentFileView from '@/components/Others/ContentFileView'
|
||||
import ContentSidebar from '@/components/Sidebar/ContentSidebar'
|
||||
import ContentGroup from '@/components/Sidebar/ContentGroup'
|
||||
import {
|
||||
TrashIcon,
|
||||
} from 'vue-feather-icons'
|
||||
|
||||
export default {
|
||||
name: 'FilesView',
|
||||
components: {
|
||||
ContentFileView,
|
||||
ContentSidebar,
|
||||
ContentGroup,
|
||||
TrashIcon,
|
||||
},
|
||||
methods: {
|
||||
emptyTrash() {
|
||||
this.$store.dispatch('emptyTrash')
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$store.dispatch('getTrash')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Vendored
+16
@@ -130,6 +130,22 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&.trash {
|
||||
|
||||
&.is-active-trash,
|
||||
&:hover {
|
||||
svg {
|
||||
path, line, polyline, rect, circle, ellipse {
|
||||
stroke: $danger;
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
color: $danger;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active,
|
||||
&.router-link-exact-active,
|
||||
&:hover {
|
||||
|
||||
Reference in New Issue
Block a user