mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 02:50:39 +00:00
v1.6 released
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<list-icon v-if="icon === 'th-list'" size="15" class="icon"></list-icon>
|
||||
<trash-icon v-if="icon === 'trash'" size="15" class="icon"></trash-icon>
|
||||
<grid-icon v-if="icon === 'th'" size="15" class="icon"></grid-icon>
|
||||
<user-plus-icon v-if="icon === 'user-plus'" size="15" class="icon"></user-plus-icon>
|
||||
<span class="label">
|
||||
<slot></slot>
|
||||
</span>
|
||||
@@ -13,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { FolderPlusIcon, ListIcon, GridIcon, TrashIcon } from 'vue-feather-icons'
|
||||
import { FolderPlusIcon, ListIcon, GridIcon, TrashIcon, UserPlusIcon } from 'vue-feather-icons'
|
||||
|
||||
export default {
|
||||
name: 'MobileActionButton',
|
||||
@@ -22,6 +23,7 @@
|
||||
],
|
||||
components: {
|
||||
FolderPlusIcon,
|
||||
UserPlusIcon,
|
||||
TrashIcon,
|
||||
ListIcon,
|
||||
GridIcon,
|
||||
@@ -40,6 +42,7 @@
|
||||
padding: 7px 10px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
@include transition(150ms);
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
@@ -49,13 +52,36 @@
|
||||
.icon {
|
||||
margin-right: 10px;
|
||||
@include font-size(14);
|
||||
|
||||
path, line, polyline, rect, circle {
|
||||
@include transition(150ms);
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
@include transition(150ms);
|
||||
@include font-size(14);
|
||||
font-weight: 700;
|
||||
color: $text;
|
||||
}
|
||||
|
||||
&:active {
|
||||
@include transform(scale(0.95));
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: rgba($theme, 0.1);
|
||||
|
||||
.icon {
|
||||
path, line, polyline, rect, circle {
|
||||
stroke: $theme;
|
||||
}
|
||||
}
|
||||
|
||||
.label {
|
||||
color: $theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
@@ -44,13 +44,9 @@
|
||||
'currentFolder',
|
||||
'browseHistory',
|
||||
'homeDirectory',
|
||||
'appSize',
|
||||
]),
|
||||
directoryName() {
|
||||
return this.currentFolder ? this.currentFolder.name : this.homeDirectory.name
|
||||
},
|
||||
isSmallAppSize() {
|
||||
return this.appSize === 'small'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
@media only screen and (max-width: 690px) {
|
||||
.mobile-header {
|
||||
display: flex;
|
||||
margin-bottom: 25px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
import DesktopToolbar from '@/components/FilesView/DesktopToolbar'
|
||||
import FileBrowser from '@/components/FilesView/FileBrowser'
|
||||
import ContextMenu from '@/components/FilesView/ContextMenu'
|
||||
import {ResizeSensor} from 'css-element-queries'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<div class="dropzone" :class="{ 'is-error': error }">
|
||||
<input
|
||||
ref="file"
|
||||
type="file"
|
||||
@change="showImagePreview($event)"
|
||||
class="dummy"
|
||||
/>
|
||||
<img
|
||||
ref="image"
|
||||
:src="imagePreview"
|
||||
class="image-preview"
|
||||
v-if="imagePreview"
|
||||
/>
|
||||
|
||||
<div class="dropzone-message" v-show="! isData">
|
||||
<upload-icon size="19" class="icon-upload"></upload-icon>
|
||||
<span class="dropzone-title">
|
||||
{{ $t('input_image.title') }}
|
||||
</span>
|
||||
<span class="dropzone-description">
|
||||
{{ $t('input_image.supported') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { UploadIcon } from 'vue-feather-icons'
|
||||
|
||||
export default {
|
||||
name: 'ImageInput',
|
||||
props: [
|
||||
'image', 'error'
|
||||
],
|
||||
components: {
|
||||
UploadIcon
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imagePreview: undefined
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isData() {
|
||||
return typeof this.imagePreview === 'undefined' || this.imagePreview === '' ? false : true
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showImagePreview(event) {
|
||||
const imgPath = event.target.files[0].name,
|
||||
extn = imgPath
|
||||
.substring(imgPath.lastIndexOf('.') + 1)
|
||||
.toLowerCase()
|
||||
|
||||
if (['png', 'jpg', 'jpeg'].includes(extn)) {
|
||||
const file = event.target.files[0],
|
||||
reader = new FileReader()
|
||||
|
||||
reader.onload = () => (this.imagePreview = reader.result)
|
||||
|
||||
reader.readAsDataURL(file)
|
||||
|
||||
// Update user avatar
|
||||
this.$emit('input', event.target.files[0])
|
||||
} else {
|
||||
alert( this.$t('validation_errors.wrong_image') )
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// If has default image then load
|
||||
if (this.image) this.imagePreview = this.image
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@assets/vue-file-manager/_variables';
|
||||
@import '@assets/vue-file-manager/_mixins';
|
||||
|
||||
.dropzone {
|
||||
border: 1px dashed #a1abc2;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 210px;
|
||||
|
||||
&.is-error {
|
||||
border: 2px dashed rgba(253, 57, 122, 0.3);
|
||||
|
||||
.dropzone-title {
|
||||
color: $danger;
|
||||
}
|
||||
|
||||
.icon-upload path {
|
||||
fill: $danger
|
||||
}
|
||||
}
|
||||
|
||||
input[type='file'] {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
left: 0;
|
||||
padding: 7px;
|
||||
display: block;
|
||||
|
||||
&.fit-image {
|
||||
object-fit: cover;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.dropzone-message {
|
||||
padding: 50px 0;
|
||||
width: 100%;
|
||||
|
||||
.dropzone-title {
|
||||
@include font-size(16);
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropzone-description {
|
||||
color: $text_muted;
|
||||
@include font-size(12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.dropzone {
|
||||
|
||||
.dropzone-message {
|
||||
|
||||
.icon-upload {
|
||||
path, polyline, line {
|
||||
stroke: $theme;
|
||||
}
|
||||
}
|
||||
|
||||
.dropzone-description {
|
||||
color: $dark_mode_text_secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -115,9 +115,9 @@
|
||||
}
|
||||
|
||||
.input-area {
|
||||
border: 1px solid #ebebeb;
|
||||
justify-content: space-between;
|
||||
background: $light_mode_input_background;
|
||||
border: 1px solid transparent;
|
||||
@include transition(150ms);
|
||||
align-items: center;
|
||||
border-radius: 8px;
|
||||
@@ -182,6 +182,7 @@
|
||||
|
||||
.input-area {
|
||||
background: $dark_mode_foreground;
|
||||
border-color: $dark_mode_foreground;
|
||||
|
||||
.option-icon {
|
||||
path {
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
@include font-size(19);
|
||||
margin-bottom: 15px;
|
||||
display: block;
|
||||
//color: $theme;
|
||||
}
|
||||
|
||||
.description {
|
||||
@@ -46,6 +45,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ input {
|
||||
|
||||
&[type='text'],
|
||||
&[type='number'],
|
||||
.input-area {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .input-area {
|
||||
background: white;
|
||||
}
|
||||
|
||||
/deep/ .form {
|
||||
margin-top: 20px;
|
||||
|
||||
@@ -83,6 +95,16 @@
|
||||
@media only screen and (max-width: 690px) {
|
||||
|
||||
.setup-box {
|
||||
padding: 15px;
|
||||
|
||||
.title {
|
||||
@include font-size(17);
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.description {
|
||||
@include font-size(14);
|
||||
}
|
||||
|
||||
/deep/ .form.block-form {
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
icon: 'settings',
|
||||
title: this.$t('menu.settings'),
|
||||
routeName: 'MobileSettings',
|
||||
routeName: 'Profile',
|
||||
isVisible: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: 0.8s ease;
|
||||
transition: 0.3s ease;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
@@ -107,6 +107,7 @@
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
font-size: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
&.success {
|
||||
@@ -133,4 +134,28 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 690px) {
|
||||
|
||||
.toastr-item {
|
||||
margin-bottom: 0;
|
||||
margin-top: 20px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
@include transform(translateY(100%));
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.toastr-item {
|
||||
|
||||
&.success, &.danger {
|
||||
background: $dark_mode_foreground;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -48,4 +48,15 @@
|
||||
top: 30px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 690px) {
|
||||
|
||||
#toastr-wrapper {
|
||||
top: initial;
|
||||
right: 15px;
|
||||
left: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="page-header" @click="goHome">
|
||||
<div class="icon" v-if="isSmallAppSize">
|
||||
<FontAwesomeIcon icon="chevron-left" />
|
||||
<div class="page-header">
|
||||
<div class="go-back" v-if="canBack" @click="$router.back()">
|
||||
<chevron-left-icon size="17"></chevron-left-icon>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1 class="title">{{ title }}</h1>
|
||||
@@ -10,28 +10,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
import { ChevronLeftIcon } from 'vue-feather-icons'
|
||||
|
||||
export default {
|
||||
name: 'PageHeader',
|
||||
props: [
|
||||
'title'
|
||||
'title', 'canBack'
|
||||
],
|
||||
computed: {
|
||||
...mapGetters(['appSize']),
|
||||
isSmallAppSize() {
|
||||
return this.appSize === 'small'
|
||||
}
|
||||
components: {
|
||||
ChevronLeftIcon
|
||||
},
|
||||
methods: {
|
||||
goHome() {
|
||||
if (this.isSmallAppSize) {
|
||||
events.$emit('show:sidebar')
|
||||
this.$router.push({name: 'Files'})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -55,10 +43,14 @@
|
||||
color: $text;
|
||||
}
|
||||
|
||||
.icon {
|
||||
@include font-size(16);
|
||||
margin-right: 15px;
|
||||
.go-back {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
margin-top: -4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
overflow-x: auto;
|
||||
|
||||
tr {
|
||||
width: 100%;
|
||||
@@ -194,13 +195,13 @@
|
||||
|
||||
tr {
|
||||
td {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding: 12px;
|
||||
|
||||
span {
|
||||
color: #AFAFAF;
|
||||
font-weight: 700;
|
||||
@include font-size(12);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.sortable {
|
||||
@@ -243,8 +244,7 @@
|
||||
}
|
||||
|
||||
td {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
padding: 12px;
|
||||
|
||||
&:last-child {
|
||||
button {
|
||||
@@ -332,6 +332,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 690px) {
|
||||
.paginator-wrapper {
|
||||
display: block;
|
||||
text-align: center;
|
||||
|
||||
.paginator-info {
|
||||
margin-top: 10px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
.table {
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link v-if="app.user.role === 'admin'" :to="{name: 'Users'}" :class="{'is-active': $isThisRoute($route, ['Users'])}" class="icon-navigation-item users">
|
||||
<router-link v-if="app.user.role === 'admin'" :to="{name: 'Users'}" :class="{'is-active': $isThisRoute($route, ['Users', 'User', 'UserDetail', 'UserStorage', 'UserPassword', 'UserDelete'])}" class="icon-navigation-item users">
|
||||
<div class="button-icon">
|
||||
<users-icon size="19"></users-icon>
|
||||
</div>
|
||||
@@ -190,6 +190,7 @@
|
||||
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.menu-bar {
|
||||
min-width: 60px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user