mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
Merge remote-tracking branch 'origin/folders_upload' into folder_upload_v2
# Conflicts: # composer.lock # config/language-translations.php # public/mix-manifest.json # resources/js/components/FilesView/DesktopToolbar.vue # resources/js/helpers.js # resources/js/store/modules/fileFunctions.js # src/Domain/Files/Actions/UploadFileAction.php # src/Domain/Files/Requests/UploadRequest.php # tests/Domain/Admin/AdminTest.php # tests/Domain/Files/FileTest.php # tests/Domain/Folders/FolderTest.php # tests/Domain/Sharing/VisitorManipulatingTest.php # tests/Domain/Traffic/TrafficTest.php # tests/Domain/Trash/TrashTest.php # tests/Domain/Zip/UserZippingTest.php
This commit is contained in:
@@ -35,8 +35,9 @@
|
||||
<ToolbarButton @click.stop.native="showCreateMenu" source="cloud-plus" :action="$t('actions.create')" />
|
||||
|
||||
<PopoverItem name="desktop-create" side="left">
|
||||
<OptionGroup>
|
||||
<OptionUpload :class="{'is-inactive': canUploadInView || isTeamFolderHomepage }" :title="$t('actions.upload')" />
|
||||
<OptionGroup :class="{'is-inactive': canUploadInView || !hasCapacity }">
|
||||
<OptionUpload :title="$t('actions.upload')" type="file" />
|
||||
<OptionUpload :title="$t('actions.upload_folder')" type="folder" />
|
||||
</OptionGroup>
|
||||
<OptionGroup>
|
||||
<Option @click.stop.native="$createTeamFolder" :title="$t('Create Team Folder')" icon="users" />
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<template>
|
||||
<svg class="alphabet-icon" fill="none" stroke="currentColor" stroke-width="2" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" width="15px" height="15px" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg class="alphabet-icon" fill="none" stroke="currentColor" stroke-width="2" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" :width="`${size}px`" :height="`${size}px`" viewBox="-2 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<polyline id="Path" points="11.1999993 13.1999991 5.59999967 0.199999094 0 13.1999991 5.59999967 0.199999094"></polyline>
|
||||
<line x1="2.25" y1="8" x2="8.75" y2="8" id="Line-2"></line>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['size']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.alphabet-icon {
|
||||
|
||||
25
resources/js/components/FilesView/Icons/FolderUploadIcon.vue
Normal file
25
resources/js/components/FilesView/Icons/FolderUploadIcon.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<svg class="preview-list-icon" fill="none" stroke="currentColor" stroke-width="1.5" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" :width="`${size}px`" :height="`${size}px`" viewBox="0 -2 14 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<path d="M0,10.6420028 C0,8.60583431 0,5.5515816 0,1.47924466 C0,0.662280392 0.633305625,0 1.4145277,0 L4.95084696,0 L6.36537467,2.21886699 L12.7307493,2.21886699 C13.5119714,2.21886699 14.145277,2.88114738 14.145277,3.69811164 C14.145277,7.76603445 14.145277,7.76603445 14.145277,11.8339573 C14.145277,12.6509215 13.5119714,13.3132019 12.7307493,13.3132019 C11.9928651,13.3132019 12.1671651,13.3132019 11.798223,13.3132019" id="Path"></path>
|
||||
<polyline id="Path-Copy-8" points="9.49893123 9.53496452 6.74946561 6.60112928 4 9.53496452"></polyline>
|
||||
<line x1="6.74946561" y1="6.60112928" x2="6.74946561" y2="13.2022586" id="Path-Copy-7"></line>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['size']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.preview-list-icon {
|
||||
|
||||
path,
|
||||
line,
|
||||
polyline {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,23 +1,37 @@
|
||||
<template>
|
||||
<label for="file" class="menu-option group">
|
||||
<label class="menu-option group">
|
||||
<div class="icon-left group-hover-text-theme">
|
||||
<upload-cloud-icon size="17" class="group-hover-text-theme"/>
|
||||
<upload-cloud-icon v-if="type === 'file'" size="17" class="group-hover-text-theme"/>
|
||||
<folder-upload-icon v-if="type === 'folder'" size="17" class="group-hover-text-theme"/>
|
||||
</div>
|
||||
<div class="text-label group-hover-text-theme">
|
||||
{{ title }}
|
||||
<input
|
||||
@change="emmitFiles"
|
||||
v-show="false"
|
||||
id="file"
|
||||
type="file"
|
||||
name="files[]"
|
||||
multiple
|
||||
/>
|
||||
<input
|
||||
v-if="type === 'file'"
|
||||
@change="emmitFiles"
|
||||
v-show="false"
|
||||
id="file"
|
||||
type="file"
|
||||
name="files[]"
|
||||
multiple
|
||||
/>
|
||||
|
||||
<input
|
||||
v-if="type === 'folder'"
|
||||
@change="emmitFiles"
|
||||
v-show="false"
|
||||
id="folder"
|
||||
type="file"
|
||||
name="folders[]"
|
||||
webkitdirectory
|
||||
mozdirectory
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FolderUploadIcon from '/resources/js/components/FilesView/Icons/FolderUploadIcon'
|
||||
import {events} from '/resources/js/bus'
|
||||
import {
|
||||
UploadCloudIcon,
|
||||
@@ -26,10 +40,11 @@ import {
|
||||
export default {
|
||||
name: 'Option',
|
||||
props:[
|
||||
'title',
|
||||
'title', 'type'
|
||||
],
|
||||
components: {
|
||||
UploadCloudIcon,
|
||||
FolderUploadIcon,
|
||||
},
|
||||
methods: {
|
||||
emmitFiles(e) {
|
||||
@@ -71,12 +86,20 @@ import {
|
||||
.text-label {
|
||||
@include font-size(16);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $light_background;
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
|
||||
.menu-option {
|
||||
color: $dark_mode_text_primary;
|
||||
|
||||
&:hover {
|
||||
background: lighten($dark_mode_foreground, 2%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user