mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-05 05:35:58 +00:00
fixes part 2
This commit is contained in:
@@ -23,11 +23,11 @@
|
|||||||
:class="{ 'border-red': errors[0] }"
|
:class="{ 'border-red': errors[0] }"
|
||||||
ref="input"
|
ref="input"
|
||||||
type="text"
|
type="text"
|
||||||
class="focus-border-theme input-dark"
|
class="!pr-10 focus-border-theme input-dark"
|
||||||
:placeholder="$t('popup_rename.placeholder')"
|
:placeholder="$t('popup_rename.placeholder')"
|
||||||
/>
|
/>
|
||||||
<div @click="pickedItem.data.attributes.name = ''" class="absolute right-4">
|
<div @click="pickedItem.data.attributes.name = ''" class="absolute right-0 p-4 cursor-pointer">
|
||||||
<x-icon class="close-icon hover-text-theme" size="14" />
|
<x-icon class="hover-text-theme" size="14" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
@@ -172,60 +172,4 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@import '../../../sass/vuefilemanager/inapp-forms';
|
|
||||||
@import '../../../sass/vuefilemanager/forms';
|
|
||||||
|
|
||||||
.input {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.close-icon-wrapper {
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
position: absolute;
|
|
||||||
cursor: pointer;
|
|
||||||
right: 15px;
|
|
||||||
border-radius: 6px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.close-icon {
|
|
||||||
line {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-icon {
|
|
||||||
line {
|
|
||||||
color: rgba($text-muted, 0.3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark {
|
|
||||||
.close-icon-wrapper {
|
|
||||||
&:hover {
|
|
||||||
.close-icon {
|
|
||||||
line {
|
|
||||||
color: inherit !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.close-icon {
|
|
||||||
line {
|
|
||||||
color: rgba($dark_mode_text_primary, 0.3) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
:style="indent"
|
:style="indent"
|
||||||
class="relative relative flex cursor-pointer select-none items-center whitespace-nowrap py-2 px-1.5 transition-all duration-150"
|
class="relative relative flex cursor-pointer select-none items-center whitespace-nowrap lg:py-2 py-3.5 px-1.5 transition-all duration-150"
|
||||||
>
|
>
|
||||||
<!--Arrow icon-->
|
<!--Arrow icon-->
|
||||||
<span @click.stop="showTree" class="-m-2 p-2">
|
<span @click.stop="showTree" class="-m-2 p-2">
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<!--Show tips-->
|
<!--Show tips-->
|
||||||
<div
|
<div
|
||||||
v-if="isEmptyQuery && !activeFilter && !$isThisRoute($route, ['Public'])"
|
v-if="isEmptyQuery && !activeFilter && !$isThisRoute($route, ['Public']) && isAdmin"
|
||||||
class="relative z-50 px-4 pb-4"
|
class="relative z-50 px-4 pb-4"
|
||||||
>
|
>
|
||||||
<CategoryName>
|
<CategoryName>
|
||||||
@@ -590,7 +590,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return commands for logged admin
|
// Return commands for logged admin
|
||||||
if (this.user.data.attributes.role === 'admin') {
|
if (this.isAdmin) {
|
||||||
// Available only for fixed subscription
|
// Available only for fixed subscription
|
||||||
if (this.config.subscriptionType === 'fixed') {
|
if (this.config.subscriptionType === 'fixed') {
|
||||||
adminLocations.push({
|
adminLocations.push({
|
||||||
|
|||||||
@@ -182,10 +182,9 @@
|
|||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton
|
<MobileActionButton
|
||||||
@click.native="$showMobileMenu('create-list')"
|
@click.native="$showMobileMenu('create-list')"
|
||||||
v-if="$checkPermission(['master', 'editor'])"
|
|
||||||
icon="cloud-plus"
|
icon="cloud-plus"
|
||||||
>
|
>
|
||||||
{{ $t('mobile.create') }}
|
{{ $t('Upload / Create') }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
||||||
{{ $t('context_menu.select') }}
|
{{ $t('context_menu.select') }}
|
||||||
|
|||||||
@@ -37,11 +37,11 @@
|
|||||||
</MobileContextMenu>
|
</MobileContextMenu>
|
||||||
|
|
||||||
<MobileCreateMenu>
|
<MobileCreateMenu>
|
||||||
<OptionGroup>
|
<OptionGroup :title="$t('Upload')">
|
||||||
<OptionUpload :title="$t('actions.upload')" type="file" :is-hover-disabled="true" />
|
<OptionUpload :title="$t('actions.upload')" type="file" :is-hover-disabled="true" />
|
||||||
<OptionUpload :title="$t('actions.upload_folder')" type="folder" :is-hover-disabled="true" />
|
<OptionUpload :title="$t('actions.upload_folder')" type="folder" :is-hover-disabled="true" />
|
||||||
</OptionGroup>
|
</OptionGroup>
|
||||||
<OptionGroup>
|
<OptionGroup :title="$t('Create')">
|
||||||
<Option
|
<Option
|
||||||
@click.stop.native="createFolder"
|
@click.stop.native="createFolder"
|
||||||
:title="$t('actions.create_folder')"
|
:title="$t('actions.create_folder')"
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
{{ $t('Spotlight') }}
|
{{ $t('Spotlight') }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton @click.native="$showMobileMenu('create-list')" icon="cloud-plus">
|
<MobileActionButton @click.native="$showMobileMenu('create-list')" icon="cloud-plus">
|
||||||
{{ $t('mobile.create') }}
|
{{ $t('Upload / Create') }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
||||||
{{ $t('context_menu.select') }}
|
{{ $t('context_menu.select') }}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
{{ $getCurrentSectionName() }}
|
{{ $getCurrentSectionName() }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton v-if="canEdit" @click.native="$showMobileMenu('create-list')" icon="cloud-plus">
|
<MobileActionButton v-if="canEdit" @click.native="$showMobileMenu('create-list')" icon="cloud-plus">
|
||||||
{{ $t('mobile.create') }}
|
{{ $t('Upload / Create') }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
||||||
{{ $t('context_menu.select') }}
|
{{ $t('context_menu.select') }}
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
v-if="$checkPermission(['master', 'editor'])"
|
v-if="$checkPermission(['master', 'editor'])"
|
||||||
icon="cloud-plus"
|
icon="cloud-plus"
|
||||||
>
|
>
|
||||||
{{ $t('mobile.create') }}
|
{{ $t('Upload / Create') }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
||||||
{{ $t('context_menu.select') }}
|
{{ $t('context_menu.select') }}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
v-if="$checkPermission(['master', 'editor'])"
|
v-if="$checkPermission(['master', 'editor'])"
|
||||||
icon="cloud-plus"
|
icon="cloud-plus"
|
||||||
>
|
>
|
||||||
{{ $t('mobile.create') }}
|
{{ $t('Upload / Create') }}
|
||||||
</MobileActionButton>
|
</MobileActionButton>
|
||||||
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
<MobileActionButton @click.native="$enableMultiSelectMode" icon="check-square">
|
||||||
{{ $t('context_menu.select') }}
|
{{ $t('context_menu.select') }}
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class File extends Model
|
|||||||
|
|
||||||
// Set shared public url
|
// Set shared public url
|
||||||
if ($this->sharedAccess) {
|
if ($this->sharedAccess) {
|
||||||
return "$route/$this->sharedAccess";
|
return "$route/shared/$this->sharedAccess";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set upload request public url
|
// Set upload request public url
|
||||||
|
|||||||
@@ -33,22 +33,29 @@ class TeamFoldersController extends Controller
|
|||||||
{
|
{
|
||||||
$id = Str::isUuid($id) ? $id : null;
|
$id = Str::isUuid($id) ? $id : null;
|
||||||
|
|
||||||
$folders = Folder::where('parent_id', $id)
|
|
||||||
->where('team_folder', true)
|
|
||||||
->where('user_id', Auth::id())
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
if ($id) {
|
if ($id) {
|
||||||
|
$folders = Folder::where('parent_id', $id)
|
||||||
|
->where('team_folder', true)
|
||||||
|
->sortable()
|
||||||
|
->get();
|
||||||
|
|
||||||
$files = File::where('parent_id', $id)
|
$files = File::where('parent_id', $id)
|
||||||
->sortable()
|
->sortable()
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$id) {
|
||||||
|
$folders = Folder::where('parent_id', null)
|
||||||
|
->where('team_folder', true)
|
||||||
|
->where('user_id', Auth::id())
|
||||||
|
->sortable()
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
// Collect folders and files to single array
|
// Collect folders and files to single array
|
||||||
return [
|
return [
|
||||||
'folders' => new FolderCollection($folders),
|
'folders' => new FolderCollection($folders),
|
||||||
'files' => isset($files) ? new FilesCollection($files) : new FilesCollection([]),
|
'files' => isset($files) ? new FilesCollection($files) : [],
|
||||||
'root' => $id ? new FolderResource(Folder::findOrFail($id)) : null,
|
'root' => $id ? new FolderResource(Folder::findOrFail($id)) : null,
|
||||||
'teamFolder' => $id ? new FolderResource(Folder::findOrFail($id)->getLatestParent()) : null,
|
'teamFolder' => $id ? new FolderResource(Folder::findOrFail($id)->getLatestParent()) : null,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Domain\UploadRequest\Controllers;
|
namespace Domain\UploadRequest\Controllers;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
@@ -13,8 +14,7 @@ class UploadFilesForUploadRequestController
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private UploadFileAction $uploadFile,
|
private UploadFileAction $uploadFile,
|
||||||
) {
|
) {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws FileNotFoundException
|
* @throws FileNotFoundException
|
||||||
@@ -64,10 +64,12 @@ class UploadFilesForUploadRequestController
|
|||||||
|
|
||||||
// Create folder
|
// Create folder
|
||||||
DB::table('folders')->insert([
|
DB::table('folders')->insert([
|
||||||
'id' => $uploadRequest->id,
|
'id' => $uploadRequest->id,
|
||||||
'parent_id' => $uploadRequest->folder_id ?? null,
|
'parent_id' => $uploadRequest->folder_id ?? null,
|
||||||
'user_id' => $uploadRequest->user_id,
|
'user_id' => $uploadRequest->user_id,
|
||||||
'name' => $uploadRequest->name ?? "Upload Request from $timestampName",
|
'name' => $uploadRequest->name ?? "Upload Request from $timestampName",
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Update upload request status
|
// Update upload request status
|
||||||
|
|||||||
Reference in New Issue
Block a user