mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-13 08:45:01 +00:00
fixes part 1
This commit is contained in:
@@ -754,6 +754,7 @@ return [
|
||||
// v2
|
||||
'member' => 'Members',
|
||||
|
||||
// file request
|
||||
'request_for_upload' => '{name} is Asking You For Files',
|
||||
'request_for_upload_success' => 'Upload Request for {name} was Fulfilled Successfully',
|
||||
'request_for_upload_expired' => 'Upload Request Expired',
|
||||
@@ -763,5 +764,11 @@ return [
|
||||
'closing_request_for_upload_warn' => "You won't be able to upload any files here once again.",
|
||||
'user_leave_message' => '{name} leave you a message',
|
||||
'tell_you_are_done' => 'Tell {name} you are done!',
|
||||
|
||||
// teams
|
||||
'user_invite_you_into_team_folder' => '{name} invite you to join with his team into shared team folder',
|
||||
'register_with_email_and_get_folder' => 'Register account with your email {email} and get access to this Team Folder.',
|
||||
'' => '',
|
||||
'' => '',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</OptionGroup>
|
||||
<OptionGroup :title="$t('Create')">
|
||||
<Option
|
||||
@click.stop.native="$createFolder"
|
||||
@click.native="$createFolder"
|
||||
:title="$t('actions.create_folder')"
|
||||
icon="folder-plus"
|
||||
/>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</OptionGroup>
|
||||
<OptionGroup :title="$t('Create')">
|
||||
<Option
|
||||
@click.stop.native="$createFolder"
|
||||
@click.native="$createFolder"
|
||||
:class="{
|
||||
'is-inactive': canCreateFolder || isTeamFolderHomepage || isSharedWithMeHomepage,
|
||||
}"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</OptionGroup>
|
||||
<OptionGroup :title="$t('Create')">
|
||||
<Option
|
||||
@click.stop.native="$createFolder"
|
||||
@click.native="$createFolder"
|
||||
:title="$t('actions.create_folder')"
|
||||
icon="folder-plus"
|
||||
/>
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<template>
|
||||
<div
|
||||
class="sticky top-14 z-[19] flex items-center overflow-x-auto whitespace-nowrap bg-white px-4 pb-3 dark:bg-dark-background lg:hidden"
|
||||
class="sticky top-14 z-[19] overflow-x-auto whitespace-nowrap bg-white px-4 pb-3 dark:bg-dark-background lg:hidden"
|
||||
>
|
||||
<!--Show Buttons-->
|
||||
<slot v-if="!isMultiSelectMode" />
|
||||
<div class="flex items-center">
|
||||
<!--Show Buttons-->
|
||||
<slot v-if="!isMultiSelectMode" />
|
||||
|
||||
<!-- Multi select mode -->
|
||||
<div v-if="isMultiSelectMode">
|
||||
<MobileActionButton @click.native="selectAll" icon="check-square">
|
||||
{{ $t('mobile_selecting.select_all') }}
|
||||
</MobileActionButton>
|
||||
<MobileActionButton @click.native="deselectAll" icon="x-square">
|
||||
{{ $t('mobile_selecting.deselect_all') }}
|
||||
</MobileActionButton>
|
||||
<MobileActionButton @click.native="disableMultiSelectMode" icon="check">
|
||||
{{ $t('mobile_selecting.done') }}
|
||||
</MobileActionButton>
|
||||
</div>
|
||||
<!-- Multi select mode -->
|
||||
<div v-if="isMultiSelectMode">
|
||||
<MobileActionButton @click.native="selectAll" icon="check-square">
|
||||
{{ $t('mobile_selecting.select_all') }}
|
||||
</MobileActionButton>
|
||||
<MobileActionButton @click.native="deselectAll" icon="x-square">
|
||||
{{ $t('mobile_selecting.deselect_all') }}
|
||||
</MobileActionButton>
|
||||
<MobileActionButton @click.native="disableMultiSelectMode" icon="check">
|
||||
{{ $t('mobile_selecting.done') }}
|
||||
</MobileActionButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Upload Progressbar-->
|
||||
<UploadProgress class="pt-3" />
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
'border-3 border-white dark:border-dark-background': isBorder,
|
||||
},
|
||||
]"
|
||||
class=""
|
||||
class="object-cover"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div
|
||||
v-if="isVisible"
|
||||
@click="closeMenu"
|
||||
class="fixed left-0 right-0 top-0 bottom-0 z-20 bg-dark-background bg-opacity-[0.35] dark:bg-opacity-[0.45]"
|
||||
class="fixed left-0 right-0 top-0 bottom-0 z-[49] bg-dark-background bg-opacity-[0.35] dark:bg-opacity-[0.45]"
|
||||
></div>
|
||||
</transition>
|
||||
</div>
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
<template>
|
||||
<div class="relative cursor-pointer">
|
||||
<div class="relative flex items-center justify-center cursor-pointer h-14 w-14 overflow-hidden bg-light-background rounded-xl cursor-pointer z-10">
|
||||
<input
|
||||
ref="file"
|
||||
type="file"
|
||||
@change="showImagePreview($event)"
|
||||
class="absolute top-0 bottom-0 left-0 right-0 z-10 w-full cursor-pointer opacity-0"
|
||||
/>
|
||||
<camera-icon v-if="!imagePreview" size="22" class="vue-feather text-gray-300" />
|
||||
<img
|
||||
v-if="imagePreview"
|
||||
ref="image"
|
||||
:src="imagePreview"
|
||||
class="relative z-0 h-14 w-14 cursor-pointer rounded-xl object-cover shadow-lg md:h-16 md:w-16"
|
||||
class="relative w-full h-full z-0 object-cover shadow-lg md:h-16 md:w-16"
|
||||
alt="avatar"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { CameraIcon} from 'vue-feather-icons'
|
||||
|
||||
export default {
|
||||
name: 'AvatarInput',
|
||||
props: ['avatar'],
|
||||
components: {
|
||||
CameraIcon,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imagePreview: undefined,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="relative block cursor-pointer lg:mr-2 lg:w-2 2xl:w-3"
|
||||
:style="{ height: bar.percentage > 0 ? bar.percentage + '%' : '10px' }"
|
||||
:style="{ height: bar.percentage > 0 ? bar.percentage + '%' : '8px' }"
|
||||
@mouseover="isVisible = true"
|
||||
@mouseleave="isVisible = false"
|
||||
>
|
||||
|
||||
+5
-1
@@ -137,7 +137,11 @@ const mutations = {
|
||||
state.user.data.relationships.settings.data.attributes.last_name = name
|
||||
},
|
||||
UPDATE_AVATAR(state, avatar) {
|
||||
state.user.data.relationships.settings.data.attributes.avatar.sm = avatar
|
||||
state.user.data.attributes.avatar = {
|
||||
xs: avatar,
|
||||
sm: avatar,
|
||||
md: avatar,
|
||||
}
|
||||
},
|
||||
REMOVE_ITEM_FROM_FAVOURITES(state, item) {
|
||||
state.user.data.relationships.favourites.data = state.user.data.relationships.favourites.data.filter(
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
:description="$t('page_sign_in.subtitle')"
|
||||
>
|
||||
<img
|
||||
v-if="checkedAccount.avatar"
|
||||
class="user-avatar mx-auto mb-6 w-28 rounded-xl shadow-xl"
|
||||
:src="checkedAccount.avatar.md"
|
||||
:alt="checkedAccount.name"
|
||||
@@ -112,6 +113,7 @@
|
||||
:description="$t('page_not_verified.subtitle')"
|
||||
>
|
||||
<img
|
||||
v-if="checkedAccount.avatar"
|
||||
class="user-avatar mx-auto mb-6 w-28 rounded-xl shadow-xl"
|
||||
:src="checkedAccount.avatar.md"
|
||||
:alt="checkedAccount.name"
|
||||
@@ -134,6 +136,7 @@
|
||||
:description="$t('page_sign_in_2fa_subtitle')"
|
||||
>
|
||||
<img
|
||||
v-if="checkedAccount.avatar"
|
||||
class="user-avatar mx-auto mb-6 w-28 rounded-xl shadow-xl"
|
||||
:src="checkedAccount.avatar.md"
|
||||
:alt="checkedAccount.name"
|
||||
@@ -183,6 +186,7 @@
|
||||
:description="$t('page_sign_in.2fa_recovery_subtitle')"
|
||||
>
|
||||
<img
|
||||
v-if="checkedAccount.avatar"
|
||||
class="user-avatar mx-auto mb-6 w-28 rounded-xl shadow-xl"
|
||||
:src="checkedAccount.avatar.md"
|
||||
:alt="checkedAccount.name"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</OptionGroup>
|
||||
<OptionGroup v-if="!isTeamFolderHomepage">
|
||||
<Option
|
||||
@click.stop.native="$createFolder"
|
||||
@click.native="$createFolder"
|
||||
:title="$t('actions.create_folder')"
|
||||
icon="folder-plus"
|
||||
/>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<OptionUpload :title="$t('actions.upload')" type="file" />
|
||||
<OptionUpload :title="$t('actions.upload_folder')" type="folder" />
|
||||
<Option
|
||||
@click.stop.native="$createFolder"
|
||||
@click.native="$createFolder"
|
||||
:title="$t('actions.create_folder')"
|
||||
icon="folder-plus"
|
||||
/>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<!--Image input for replace avatar-->
|
||||
<AvatarInput
|
||||
v-model="avatar"
|
||||
:avatar="user.data.relationships.settings.data.attributes.avatar.md"
|
||||
:avatar="user.data.relationships.settings.data.attributes.avatar ? user.data.relationships.settings.data.attributes.avatar.md : undefined"
|
||||
/>
|
||||
|
||||
<!--User name & email-->
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
v-if="invitation"
|
||||
:title="$t('Invitation To Join Team Folder')"
|
||||
:description="
|
||||
$t('{name} invite you to join with his team into shared team folder', {
|
||||
$t('user_invite_you_into_team_folder', {
|
||||
name: invitation.data.relationships.inviter.data.attributes.name,
|
||||
})
|
||||
"
|
||||
@@ -26,7 +26,7 @@
|
||||
v-if="invitation && !invitation.data.attributes.isExistedUser"
|
||||
class="mx-auto mb-4 max-w-md text-sm text-gray-500"
|
||||
v-html="
|
||||
$t('Register account with your email peterpapp@makingcg.com and get access to this Team Folder.', {
|
||||
$t('register_with_email_and_get_folder', {
|
||||
email: invitation.data.attributes.email,
|
||||
})
|
||||
"
|
||||
|
||||
@@ -37,7 +37,7 @@ class UserSetting extends Model
|
||||
/**
|
||||
* Format avatar to full url
|
||||
*/
|
||||
public function getAvatarAttribute(): array|string
|
||||
public function getAvatarAttribute(): array|null
|
||||
{
|
||||
$link = [];
|
||||
|
||||
@@ -61,12 +61,7 @@ class UserSetting extends Model
|
||||
return $link;
|
||||
}
|
||||
|
||||
// Return default avatar
|
||||
foreach (config('vuefilemanager.avatar_sizes') as $item) {
|
||||
$link[$item['name']] = url('/assets/images/default-avatar.png');
|
||||
}
|
||||
|
||||
return $link;
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getNameAttribute(): string
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Users\Resources;
|
||||
|
||||
use Domain\Folders\Resources\FolderCollection;
|
||||
@@ -31,6 +32,7 @@ class UserResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'color' => $this->settings->color,
|
||||
'avatar' => $this->settings->avatar,
|
||||
'email' => is_demo() ? obfuscate_email($this->email) : $this->email,
|
||||
'role' => $this->role,
|
||||
@@ -44,16 +46,16 @@ class UserResource extends JsonResource
|
||||
'settings' => new SettingsResource($this->settings),
|
||||
'favourites' => new FolderCollection($this->favouriteFolders),
|
||||
'creditCards' => new CreditCardCollection($this->creditCards),
|
||||
$this->mergeWhen($this->hasSubscription(), fn () => [
|
||||
$this->mergeWhen($this->hasSubscription(), fn() => [
|
||||
'subscription' => new SubscriptionResource($this->subscription),
|
||||
]),
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn () => [
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn() => [
|
||||
'balance' => new BalanceResource($this->balance),
|
||||
]),
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn () => [
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn() => [
|
||||
'alert' => new BillingAlertResource($this->billingAlert),
|
||||
]),
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn () => [
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn() => [
|
||||
'failedPayments' => new FailedPaymentsCollection($this->failedPayments),
|
||||
]),
|
||||
],
|
||||
@@ -65,13 +67,13 @@ class UserResource extends JsonResource
|
||||
'canCreateTeamFolder' => $this->canCreateTeamFolder(),
|
||||
'canInviteTeamMembers' => $this->canInviteTeamMembers(),
|
||||
],
|
||||
$this->mergeWhen($isFixedSubscription, fn () => [
|
||||
$this->mergeWhen($isFixedSubscription, fn() => [
|
||||
'limitations' => $this->limitations->summary(),
|
||||
]),
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn () => [
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn() => [
|
||||
'usages' => $this->getUsageEstimates(),
|
||||
]),
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn () => [
|
||||
$this->mergeWhen($isMeteredSubscription && $this->hasSubscription(), fn() => [
|
||||
'totalDebt' => [
|
||||
'formatted' => format_currency($this->failedPayments->sum('amount'), $this->subscription->plan->currency),
|
||||
'amount' => $this->failedPayments->sum('amount'),
|
||||
|
||||
@@ -84,8 +84,8 @@ class FileResource extends JsonResource
|
||||
'iso' => $this->exif->iso,
|
||||
'aperture_f_number' => $this->exif->aperture_f_number,
|
||||
'ccd_width' => $this->exif->ccd_width,
|
||||
'longitude' => format_gps_coordinates($this->exif->longitude, $this->exif->longitude_ref),
|
||||
'latitude' => format_gps_coordinates($this->exif->latitude, $this->exif->latitude_ref),
|
||||
'longitude' => formatGPSCoordinates($this->exif->longitude, $this->exif->longitude_ref),
|
||||
'latitude' => formatGPSCoordinates($this->exif->latitude, $this->exif->latitude_ref),
|
||||
],
|
||||
],
|
||||
]
|
||||
|
||||
@@ -29,6 +29,7 @@ class UploadRequestResource extends JsonResource
|
||||
'type' => 'user',
|
||||
'attributes' => [
|
||||
'name' => $this->user->settings->first_name,
|
||||
'color' => $this->user->settings->color,
|
||||
'avatar' => $this->user->settings->avatar,
|
||||
],
|
||||
],
|
||||
|
||||
+13
-12
@@ -1110,20 +1110,21 @@ if (! function_exists('replace_occurrence')) {
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('format_gps_coordinates')) {
|
||||
if (!function_exists('formatGPSCoordinates')) {
|
||||
/**
|
||||
* Format GPS coordinates
|
||||
*/
|
||||
function format_gps_coordinates($coordinates, $ref)
|
||||
* Format GPS coordinates
|
||||
*/
|
||||
function formatGPSCoordinates($coordinates, $ref): string|null
|
||||
{
|
||||
if($coordinates && $ref) {
|
||||
|
||||
return
|
||||
explode('/',$coordinates[0])[0] . '°' .
|
||||
explode('/', $coordinates[1])[0] . "'" .
|
||||
substr(explode(',', $coordinates[2])[0], 0, 5) / 1000 . '"' .
|
||||
$ref;
|
||||
if (!$coordinates && !$ref) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
$degrees = explode('/', $coordinates[0])[0];
|
||||
$minutes = explode('/', $coordinates[1])[0];
|
||||
$seconds = intval(substr(explode(',', $coordinates[2])[0], 0, 5)) / 100;
|
||||
|
||||
return "{$degrees}°$minutes'$seconds\"$ref";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user