vuefilemanager v1.4-alpha.2

This commit is contained in:
carodej
2020-04-29 16:32:40 +02:00
parent 0f3cbaec3d
commit 968b12c4ac
12 changed files with 20 additions and 201 deletions

View File

@@ -97,7 +97,7 @@ class AuthController extends Controller
$data = json_decode($response->content(), true);
return response('Register Successfull!', 200)->cookie('token', $data['access_token'], 43200);
return response('Register Successfull!', 200)->cookie('access_token', $data['access_token'], 43200);
} else {
return $response;

View File

@@ -48,7 +48,6 @@ class AccountController extends Controller
// Validate request
$validator = Validator::make($request->all(), [
'avatar' => 'file',
'_method' => 'string',
'name' => 'string',
'value' => 'string',
]);

View File

@@ -7,6 +7,7 @@ use App\FileManagerFile;
use App\FileManagerFolder;
use App\Http\Requests\FileFunctions\RenameItemRequest;
use App\User;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;

2
public/js/main.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -98,6 +98,7 @@
bottom: 0;
z-index: 20;
overflow: auto;
height: 100%;
}
.popup-wrapper {

View File

@@ -115,7 +115,6 @@
this.$store.commit('FLUSH_BROWSER_HISTORY')
} else {
if ( this.$isThisLocation('public') ) {
this.$store.dispatch('browseShared', [this.previousFolder, true])
} else {

View File

@@ -70,7 +70,7 @@
</div>
</div>
<span @click.stop="showItemActions" class="show-actions" v-if="$isMobile()">
<span @click.stop="showItemActions" class="show-actions" v-if="$isMobile() && ! ( $checkPermission('visitor') && isFolder )">
<FontAwesomeIcon icon="ellipsis-h" class="icon-action"></FontAwesomeIcon>
</span>
</div>

View File

@@ -70,7 +70,7 @@
</div>
<!--Go Next icon-->
<div class="actions" v-if="$isMobile()">
<div class="actions" v-if="$isMobile() && ! ( $checkPermission('visitor') && isFolder )">
<span @click.stop="showItemActions" class="show-actions">
<FontAwesomeIcon icon="ellipsis-v" class="icon-action"></FontAwesomeIcon>
</span>
@@ -200,7 +200,7 @@
renameItem: debounce(function (e) {
// Prevent submit empty string
if (e.target.innerText === '') return
if (e.target.innerText.trim() === '') return
this.$store.dispatch('renameItem', {
unique_id: this.data.unique_id,

View File

@@ -76,9 +76,9 @@
} else {
if ( this.$isThisLocation('public') ) {
this.$store.dispatch('browseShared', [this.previousFolder, false])
this.$store.dispatch('browseShared', [this.previousFolder, true])
} else {
this.$store.dispatch('getFolder', [this.previousFolder, false])
this.$store.dispatch('getFolder', [this.previousFolder, true])
}
}
},

View File

@@ -58,6 +58,7 @@
overflow-y: auto;
display: grid;
padding: 40px;
height: 100%;
}
.popup-wrapper {

View File

@@ -26,7 +26,7 @@ const Helpers = {
// Add image to form
formData.append(name, image)
formData.append('_method', 'PUT')
formData.append('_method', 'PATCH')
axios.post(this.$store.getters.api + route, formData, {
headers: {

View File

@@ -1,9 +1,15 @@
<template>
<div id="shared">
<div id="shared" :class="appSize">
<!--Loading Spinenr-->
<Spinner v-if="isPageLoading"/>
<!--Move item setup-->
<MoveItem />
<!--Mobile Menu-->
<MobileMenu/>
<!--System alerts-->
<Alert />
@@ -44,12 +50,6 @@
</div>
<div v-if="sharedDetail.type === 'folder'" @contextmenu.prevent.capture="contextMenu($event, undefined)" @click="fileViewClick">
<!--Move item setup-->
<MoveItem />
<!--Mobile Menu-->
<MobileMenu/>
<!--Context menu-->
<ContextMenu/>
@@ -103,12 +103,12 @@
Alert,
},
computed: {
...mapGetters(['config', 'filesViewWidth', 'sharedDetail', 'sharedFile']),
...mapGetters(['config', 'filesViewWidth', 'sharedDetail', 'sharedFile', 'appSize']),
},
data() {
return {
checkedAccount: undefined,
password: 'tvojpenis',
password: '',
isLoading: false,
isPageLoading: true,
currentPage: undefined
@@ -279,186 +279,4 @@
}
}
#files-view {
font-family: 'Nunito', sans-serif;
font-size: 16px;
//overflow: hidden;
width: 100%;
height: 100%;
position: relative;
min-width: 320px;
overflow-x: hidden;
&.minimal-scale {
padding: 0;
.mobile-toolbar {
padding: 10px 0 5px;
}
.popup-wrapper {
left: 15px;
right: 15px;
padding: 25px 15px;
}
.toolbar {
display: block;
position: sticky;
top: 0;
}
.toolbar-go-back {
padding-top: 15px;
}
.toolbar-tools {
text-align: left;
display: flex;
.toolbar-button-wrapper {
width: 100%;
&:last-child {
text-align: right;
}
}
}
.files-container {
padding-left: 15px;
padding-right: 15px;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: absolute;
overflow-y: auto;
.file-list {
//height: 100%;
&.grid {
grid-template-columns: repeat(auto-fill, 120px);
.file-wrapper {
.file-item {
width: 120px;
}
.icon-item {
margin-bottom: 10px;
height: 90px;
.file-icon {
@include font-size(75);
}
.file-icon-text {
@include font-size(12);
}
.folder-icon {
@include font-size(75);
margin-top: 0;
margin-bottom: 0;
}
.image {
width: 90px;
height: 90px;
}
}
.item-name .name {
@include font-size(13);
line-height: 1.2;
max-height: 30px;
}
}
}
}
}
.file-wrapper {
.item-name .name {
max-width: 220px;
}
}
.search-bar {
input {
min-width: initial;
width: 100%;
}
}
.item-shared {
.label {
display: none;
}
}
}
&.compact-scale {
padding-left: 15px;
padding-right: 15px;
.file-content {
position: absolute;
top: 72px;
left: 15px;
right: 15px;
bottom: 0;
@include transition;
&.is-offset {
margin-top: 50px;
}
}
.toolbar-tools {
.toolbar-button-wrapper {
margin-left: 35px;
}
}
.search-bar input {
min-width: 190px;
}
.toolbar-go-back span {
max-width: 120px;
}
.grid .file-wrapper {
.icon-item {
margin-bottom: 15px;
}
}
}
&.full-scale {
padding-left: 15px;
padding-right: 15px;
.file-content {
position: absolute;
top: 72px;
left: 15px;
right: 15px;
bottom: 0;
@include transition;
&.is-offset {
margin-top: 50px;
}
}
}
}
</style>