Merge remote-tracking branch 'origin/master' into light

# Conflicts:
#	.env.testing
#	README.md
#	composer.json
#	composer.lock
#	config/language-translations.php
#	config/vuefilemanager.php
#	public/chunks/admin.js
#	public/chunks/database.js
#	public/chunks/demo.js
#	public/chunks/files.js
#	public/chunks/my-shared-items.js
#	public/chunks/platform.js
#	public/chunks/recent-uploads.js
#	public/chunks/settings-storage.js
#	public/chunks/settings.js
#	public/chunks/shared.js
#	public/chunks/shared/browser.js
#	public/chunks/shared/single-file.js
#	public/chunks/sign-in.js
#	public/chunks/status-check.js
#	public/chunks/trash.js
#	public/chunks/user-storage.js
#	public/css/tailwind.css
#	public/js/main.js
#	public/mix-manifest.json
#	resources/js/components/Subscription/UserFixedSubscriptionDetail.vue
#	resources/js/store/modules/userAuth.js
#	resources/js/views/Admin.vue
#	resources/js/views/Admin/PaymentSettings/PaymentSettingsTab/Payments.vue
#	resources/js/views/Admin/Plans.vue
#	resources/js/views/Admin/Plans/Create/CreateFixedPlan.vue
#	resources/js/views/Admin/Settings/AppSettingsTabs/SignInUp.vue
#	resources/js/views/Demo.vue
#	resources/js/views/Frontpage/Homepage.vue
#	resources/js/views/Platform.vue
#	resources/views/index.blade.php
#	src/App/Console/Commands/SetupWebsocketEnvironment.php
#	src/App/Users/Models/UserLimitation.php
#	src/Domain/RemoteUpload/Controllers/RemoteUploadFileController.php
#	src/Domain/RemoteUpload/Controllers/UploadFilesRemotelyForUploadRequestController.php
#	src/Domain/RemoteUpload/Controllers/VisitorRemoteUploadFileController.php
#	src/Domain/RemoteUpload/Requests/RemoteUploadRequest.php
#	src/Domain/Settings/Controllers/StoreBroadcastServiceCredentialsController.php
#	src/Domain/Settings/Controllers/StorePaymentServiceCredentialsController.php
#	src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php
#	src/Domain/UploadRequest/Controllers/UploadFilesForUploadRequestController.php
#	src/Support/Upgrading/Controllers/UpgradingVersionsController.php
This commit is contained in:
Čarodej
2022-05-10 16:06:09 +02:00
45 changed files with 593 additions and 199 deletions
+5
View File
@@ -118,6 +118,11 @@ export default {
this.isLoaded = true
})
}
// Go to sign in page if homepage is disabled
if (!this.$root.$data.config.allowHomepage && window.location.pathname === '/') {
this.$router.push({ name: 'SignIn' })
}
},
created() {
if (this.$isWindows()) {
@@ -6,7 +6,7 @@
'grid-view-sidebar': itemViewType === 'grid' && isVisibleSidebar,
}"
class="px-4 lg:h-full lg:w-full lg:overflow-y-auto lg:px-0"
@drop.stop.prevent="uploadDroppedItems($event)"
@drop.prevent="dragStop($event)"
@keydown.delete="deleteItems"
@dragover="dragEnter"
@dragleave="dragLeave"
@@ -62,9 +62,7 @@ export default {
this.$store.dispatch('deleteItem')
}
},
uploadDroppedItems(event) {
this.$uploadDraggedFiles(event, this.currentFolder.data.id)
dragStop() {
this.isDragging = false
},
dragEnter() {
@@ -1,13 +1,27 @@
<template>
<transition name="popup">
<div class="popup" v-if="processingPopup">
<div class="popup-wrapper">
<div class="popup-content">
<div class="spinner-wrapper">
<Spinner />
<div
v-if="processingPopup"
class="popup fixed top-0 left-0 right-0 bottom-0 z-50 grid h-full overflow-y-auto p-10 lg:absolute"
>
<div
class="fixed top-0 bottom-0 left-0 right-0 z-10 m-auto w-full bg-white shadow-xl dark:bg-dark-foreground md:relative md:w-[490px] md:rounded-xl"
>
<div
class="flex h-full -translate-y-7 transform items-center justify-center px-8 text-center md:translate-y-0"
>
<div>
<div class="relative pb-16 pt-10">
<Spinner />
</div>
<h1 v-if="processingPopup.title" class="mb-2 text-2xl font-bold">
{{ processingPopup.title }}
</h1>
<p v-if="processingPopup.message" class="mb-4 text-sm">
{{ processingPopup.message }}
</p>
</div>
<h1 class="title">{{ processingPopup.title }}</h1>
<p class="message">{{ processingPopup.message }}</p>
</div>
</div>
</div>
@@ -17,10 +31,12 @@
<script>
import Spinner from '../UI/Others/Spinner'
import { mapGetters } from 'vuex'
import PopupWrapper from './Components/PopupWrapper'
export default {
name: 'ProcessingPopup',
components: {
PopupWrapper,
Spinner,
},
computed: {
@@ -28,107 +44,3 @@ export default {
},
}
</script>
<style scoped lang="scss">
@import '../../../sass/vuefilemanager/variables';
@import '../../../sass/vuefilemanager/mixins';
.spinner-wrapper {
padding-bottom: 90px;
position: relative;
}
.popup {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
overflow: auto;
height: 100%;
}
.popup-wrapper {
z-index: 12;
position: absolute;
left: 0;
right: 0;
max-width: 480px;
top: 50%;
transform: translateY(-50%) scale(1);
margin: 0 auto;
padding: 20px;
box-shadow: $light_mode_popup_shadow;
border-radius: 8px;
text-align: center;
background: white;
}
.popup-content {
.title {
@include font-size(22);
font-weight: 700;
color: $text;
}
.message {
@include font-size(16);
color: #333;
margin-top: 5px;
}
}
@media only screen and (max-width: 690px) {
.popup-wrapper {
padding: 20px;
left: 15px;
right: 15px;
}
.popup-content {
.title {
@include font-size(19);
}
.message {
@include font-size(15);
}
}
}
.dark {
.popup-wrapper {
background: $dark_mode_foreground;
}
.popup-content {
.title {
color: $dark_mode_text_primary;
}
.message {
color: $dark_mode_text_secondary;
}
}
}
// Animations
.popup-enter-active {
animation: popup-in 0.35s 0.15s ease both;
}
.popup-leave-active {
animation: popup-in 0.15s ease reverse;
}
@keyframes popup-in {
0% {
opacity: 0;
transform: scale(0.7);
}
100% {
opacity: 1;
transform: scale(1);
}
}
</style>
@@ -4,7 +4,7 @@
'bg-light-background dark:bg-dark-foreground': isClicked && canHover,
'dark:hover:bg-dark-foreground lg:hover:bg-light-background': canHover,
}"
class="relative z-0 flex h-48 select-none flex-wrap items-center justify-center rounded-lg border-2 border-dashed border-transparent px-1 pt-2 text-center sm:h-56 lg:h-60"
class="relative z-0 flex h-48 select-none flex-wrap items-center justify-center rounded-lg border-2 border-dashed border-transparent px-1 pt-2 text-center sm:h-56 lg:h-60 cursor-pointer"
:draggable="canDrag"
spellcheck="false"
>
@@ -68,7 +68,7 @@
<!--Item Title-->
<span
class="inline-block w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold leading-3 tracking-tight md:px-6"
:class="{ 'hover:underline': canEditName }"
:class="{ 'hover:underline cursor-text': canEditName }"
ref="name"
@input="renameItem"
@keydown.delete.stop
@@ -4,7 +4,7 @@
'bg-light-background dark:bg-dark-foreground': isClicked && highlight,
'hover:bg-light-background dark:hover:bg-dark-foreground': highlight,
}"
class="flex select-none items-center rounded-xl border-2 border-dashed border-transparent px-2.5 py-2"
class="flex select-none items-center rounded-xl border-2 border-dashed border-transparent px-2.5 py-2 cursor-pointer"
:draggable="canDrag"
spellcheck="false"
>
@@ -46,7 +46,7 @@
<!--Item Title-->
<span
class="mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold"
:class="{ 'hover:underline': canEditName }"
:class="{ 'hover:underline cursor-text': canEditName }"
style="max-width: 240px"
ref="name"
@input="renameItem"
@@ -9,8 +9,6 @@
}"
class="chart-wrapper"
>
<!--<DotLabel class="label" :class="{'offset-top': chart.progress < 5}" :color="chart.color" :title="chart.value" />-->
<!--Only singe line-->
<span
v-if="data.length === 1"
+8 -2
View File
@@ -161,7 +161,7 @@ const FunctionHelpers = {
})
// Start uploading if uploading process isn't running
if (store.getters.filesInQueueTotal == 0) this.$handleUploading(store.getters.fileQueue[0])
if (store.getters.filesInQueueTotal === 0) this.$handleUploading(store.getters.fileQueue[0])
// Increase total files in upload bar
store.commit('INCREASE_FILES_IN_QUEUES_TOTAL', files.length)
@@ -169,7 +169,7 @@ const FunctionHelpers = {
Vue.prototype.$uploadDraggedFiles = async function (event, parent_id) {
// Show alert message when upload is disabled
if (!store.getters.user.data.meta.restrictions.canUpload) {
if (store.getters.user && !store.getters.user.data.meta.restrictions.canUpload) {
Vue.prototype.$temporarilyDisabledUpload()
return
@@ -330,6 +330,12 @@ const FunctionHelpers = {
}
Vue.prototype.$goToFileView = function (id) {
// If user is located in trash, then automatically after click on the navigator go to the Files view
if (this.$router.currentRoute.name === 'Trash') {
this.$router.push({ name: 'Files', params: { id: id } })
return
}
let locations = {
Public: {name: 'Public', params: { token: this.$route.params.token, id: id }},
MySharedItems: { name: 'Files', params: { id: id } },
+8
View File
@@ -7,6 +7,14 @@ const routesIndex = [
requiresAuth: false,
},
},
{
name: 'Demo',
path: '/demo',
component: () => import(/* webpackChunkName: "chunks/demo" */ '../views/Demo'),
meta: {
requiresAuth: false,
},
},
]
export default routesIndex
+3 -1
View File
@@ -112,7 +112,7 @@ const actions = {
})
.catch((error) => {
events.$emit('alert:open', {
title: error.response.data.message,
title: error.response.data.message || i18n.t('popup_error.title'),
message: i18n.t('popup_error.message'),
})
})
@@ -175,6 +175,8 @@ const actions = {
if (response.data.data.id) {
commit('PROCESSING_FILE', false)
commit('INCREASE_FOLDER_ITEM', response.data.data.attributes.parent_id)
// Remove first file from file queue
commit('SHIFT_FROM_FILE_QUEUE')
+12 -5
View File
@@ -1,5 +1,5 @@
<template>
<AuthContentWrapper ref="auth" class="h-screen">
<AuthContentWrapper v-if="isVisible" ref="auth" class="h-screen">
<!--Log In by Email-->
<AuthContent name="log-in" :visible="true">
<Headline :title="$t('welcome_back')" :description="$t('page_login.subtitle')" />
@@ -245,6 +245,7 @@ export default {
},
data() {
return {
isVisible: false,
isLoading: false,
validSignIn: false,
checkedAccount: undefined,
@@ -432,14 +433,20 @@ export default {
}
},
},
created() {
this.$scrollTop()
this.$store.commit('PROCESSING_POPUP', undefined)
mounted() {
// Redirect if user is authenticated
if (this.$root.$data.config.isAuthenticated) {
this.$router.push({name: 'Files'})
}
},
created() {
// Show the page when user is not authenticated
if (! this.$root.$data.config.isAuthenticated) {
this.isVisible = true
}
this.$scrollTop()
this.$store.commit('PROCESSING_POPUP', undefined)
if (this.config.isDemo || this.config.isDev) {
this.loginEmail = 'howdy@hi5ve.digital'
+6
View File
@@ -252,6 +252,12 @@ export default {
'Your New Password': error.response.data.errors['password'],
})
}
if (error.response.data.errors['reCaptcha']) {
events.$emit('alert:open', {
title: error.response.data.message,
})
}
}
})
.finally(() => {
+5 -2
View File
@@ -37,7 +37,7 @@
<MobileToolbar />
<!--File list & info sidebar-->
<div class="flex space-x-3 lg:overflow-hidden grow">
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
<InfoSidebar v-if="isVisibleSidebar" />
@@ -91,7 +91,7 @@ export default {
DragUI,
},
computed: {
...mapGetters(['isVisibleSidebar', 'config']),
...mapGetters(['isVisibleSidebar', 'config', 'currentFolder']),
},
data() {
return {
@@ -99,6 +99,9 @@ export default {
}
},
methods: {
uploadDroppedItems(event) {
this.$uploadDraggedFiles(event, this.currentFolder?.data.id)
},
contextMenu(event, item) {
events.$emit('context-menu:show', event, item)
},
@@ -15,7 +15,7 @@
<!--<a href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986">
<AlertBox color="rose" class="text-left">
<p class="text-rose-500">Please make sure you have only legal copy of VueFileManager <b class="text-rose-500 underline">purchased from CodeCanyon</b>. Any illegal copy can contain malicious software, bugs and others security issues which exposes your files to abuse.</p>
<p class="text-rose-500">Please make sure you have only legal copy of VueFileManager <b class="text-rose-500 underline">purchased from CodeCanyon</b>. Any illegal copy can contain malicious software, bugs and others security issues which exposes your files to data breach.</p>
</AlertBox>
</a>-->
+5 -2
View File
@@ -31,7 +31,7 @@
<MobileToolbar />
<!--File list & info sidebar-->
<div class="flex space-x-3 lg:overflow-hidden grow">
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
<InfoSidebar v-if="isVisibleSidebar" />
@@ -81,7 +81,7 @@ export default {
Alert,
},
computed: {
...mapGetters(['isVisibleSidebar', 'sharedDetail', 'config']),
...mapGetters(['isVisibleSidebar', 'sharedDetail', 'config', 'currentFolder']),
},
data() {
return {
@@ -89,6 +89,9 @@ export default {
}
},
methods: {
uploadDroppedItems(event) {
this.$uploadDraggedFiles(event, this.currentFolder?.data.id)
},
contextMenu(event, item) {
events.$emit('context-menu:show', event, item)
},
+5 -2
View File
@@ -27,7 +27,7 @@
<MobileUploadRequestToolBar v-if="canShowUI" />
<!--File list & info sidebar-->
<div class="flex space-x-3 lg:overflow-hidden grow">
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
<InfoSidebarUploadRequest v-if="canShowUI && isVisibleSidebar" />
@@ -73,7 +73,7 @@ export default {
DragUI,
},
computed: {
...mapGetters(['isVisibleSidebar', 'config', 'uploadRequest', 'fileQueue']),
...mapGetters(['isVisibleSidebar', 'config', 'uploadRequest', 'fileQueue', 'currentFolder']),
canShowUI() {
return (this.uploadRequest && this.uploadRequest.data.attributes.status === 'filling') || this.fileQueue.length > 0
}
@@ -84,6 +84,9 @@ export default {
}
},
methods: {
uploadDroppedItems(event) {
this.$uploadDraggedFiles(event, this.currentFolder?.data.id)
},
contextMenu(event, item) {
events.$emit('context-menu:show', event, item)
},
+29 -4
View File
@@ -1,5 +1,30 @@
@php
try {
// Bcmath Extension
$storageDefaultSpaceFormatted = isset($settings->default_max_storage_amount)
? format_gigabytes($settings->default_max_storage_amount)
: format_gigabytes(5);
$uploadLimit = isset($settings->upload_limit)
? format_bytes($settings->upload_limit)
: 'undefined';
$chunkSize = isset($settings->chunk_size)
? format_bytes($settings->chunk_size)
: format_bytes(64);
$uploadLimitFormatted = isset($settings->upload_limit)
? format_megabytes($settings->upload_limit)
: null;
} catch (MissingExtensionException $exception) {
$storageDefaultSpaceFormatted = '5GB';
$uploadLimit = 'undefined';
$uploadLimitFormatted = 5;
$chunkSize = 64000000;
}
try {
// User
$isUser = auth()->check();
@@ -77,11 +102,11 @@
storageLimit: {{ $settings->storage_limitation ?? 1 }},
storageDefaultSpace: {{ $settings->default_max_storage_amount ?? 5 }},
storageDefaultSpaceFormatted: '{{ isset($settings->default_max_storage_amount) ? format_gigabytes($settings->default_max_storage_amount) : format_gigabytes(5) }}',
storageDefaultSpaceFormatted: '{{ $storageDefaultSpaceFormatted }}',
mimetypesBlacklist: '{{ isset($settings->mimetypes_blacklist) ? $settings->mimetypes_blacklist: null}}',
uploadLimit: {{ isset($settings->upload_limit) ? format_bytes($settings->upload_limit) : 'undefined' }},
uploadLimitFormatted: '{{ isset($settings->upload_limit) ? format_megabytes($settings->upload_limit) : null }}',
chunkSize: {{ isset($settings->chunk_size) ? format_bytes($settings->chunk_size) : format_bytes(64) }},
uploadLimit: {{ $uploadLimit }},
uploadLimitFormatted: '{{ $uploadLimitFormatted }}',
chunkSize: {{ $chunkSize }},
isAuthenticated: {{ $isUser ? 1 : 0 }},