fix: active state for sidebar/settings nav, reactive photo updates, workspace logo upload
- Fix useActiveUrl to use prefix matching (matching Sendkit pattern) so sidebar and settings nav tabs properly highlight the active page - Make user reactive (computed) in Profile.vue and NavUser.vue so photo upload/delete reflects immediately without page reload - Update Avatar component to use simple v-if/v-else instead of Reka UI AvatarImage/AvatarFallback which cached internal loading state - Remove rounded="full" from PhotoUpload usage to match Sendkit (rounded-lg) - Add workspace logo upload/delete routes and controller methods - Replace workspace logo attribute (array) with has_logo/logo_url accessors - Pass logo_url in AuthWorkspaceResource so sidebar shows workspace logo
This commit is contained in:
parent
9799718703
commit
5693ac4fa2
30 changed files with 308 additions and 343 deletions
|
|
@ -42,6 +42,35 @@ public function update(ProfileUpdateRequest $request): RedirectResponse
|
|||
return to_route('app.profile.edit');
|
||||
}
|
||||
|
||||
public function uploadPhoto(Request $request): RedirectResponse
|
||||
{
|
||||
$request->validate([
|
||||
'photo' => ['required', 'image', 'max:2048'],
|
||||
]);
|
||||
|
||||
$user = $request->user();
|
||||
$user->clearMediaCollection('avatar');
|
||||
$user->addMedia($request->file('photo'), 'avatar');
|
||||
$user->unsetRelation('media');
|
||||
|
||||
session()->flash('flash.banner', __('settings.flash.photo_updated'));
|
||||
session()->flash('flash.bannerStyle', 'success');
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function deletePhoto(Request $request): RedirectResponse
|
||||
{
|
||||
$user = $request->user();
|
||||
$user->clearMediaCollection('avatar');
|
||||
$user->unsetRelation('media');
|
||||
|
||||
session()->flash('flash.banner', __('settings.flash.photo_deleted'));
|
||||
session()->flash('flash.bannerStyle', 'success');
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function updateLanguage(Request $request): RedirectResponse
|
||||
{
|
||||
$request->validate([
|
||||
|
|
|
|||
|
|
@ -92,6 +92,41 @@ public function settings(Request $request): Response|RedirectResponse
|
|||
]);
|
||||
}
|
||||
|
||||
public function uploadLogo(Request $request): RedirectResponse
|
||||
{
|
||||
$workspace = $request->user()->currentWorkspace;
|
||||
|
||||
$this->authorize('update', $workspace);
|
||||
|
||||
$request->validate([
|
||||
'photo' => ['required', 'image', 'max:2048'],
|
||||
]);
|
||||
|
||||
$workspace->clearMediaCollection('logo');
|
||||
$workspace->addMedia($request->file('photo'), 'logo');
|
||||
$workspace->unsetRelation('media');
|
||||
|
||||
session()->flash('flash.banner', __('settings.flash.logo_updated'));
|
||||
session()->flash('flash.bannerStyle', 'success');
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function deleteLogo(Request $request): RedirectResponse
|
||||
{
|
||||
$workspace = $request->user()->currentWorkspace;
|
||||
|
||||
$this->authorize('update', $workspace);
|
||||
|
||||
$workspace->clearMediaCollection('logo');
|
||||
$workspace->unsetRelation('media');
|
||||
|
||||
session()->flash('flash.banner', __('settings.flash.logo_deleted'));
|
||||
session()->flash('flash.bannerStyle', 'success');
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function updateSettings(UpdateWorkspaceRequest $request): RedirectResponse
|
||||
{
|
||||
$user = $request->user();
|
||||
|
|
|
|||
|
|
@ -17,8 +17,11 @@ public static function make(User $user): array
|
|||
'id' => $user->id,
|
||||
'name' => $user->name,
|
||||
'email' => $user->email,
|
||||
'has_photo' => $user->has_photo,
|
||||
'photo_url' => $user->photo_url,
|
||||
'email_verified_at' => $user->email_verified_at?->toIso8601String(),
|
||||
'current_workspace_id' => $user->current_workspace_id,
|
||||
'language_id' => $user->language_id,
|
||||
'created_at' => $user->created_at->toIso8601String(),
|
||||
'updated_at' => $user->updated_at->toIso8601String(),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ public static function make(Workspace $workspace, ?User $user = null): array
|
|||
'id' => $workspace->id,
|
||||
'name' => $workspace->name,
|
||||
'timezone' => $workspace->timezone,
|
||||
'logo_url' => $workspace->logo_url,
|
||||
'created_at' => $workspace->created_at->toIso8601String(),
|
||||
'role' => $user ? self::resolveRole($workspace, $user) : null,
|
||||
];
|
||||
|
|
@ -31,6 +32,7 @@ public static function summary(Workspace $workspace): array
|
|||
return [
|
||||
'id' => $workspace->id,
|
||||
'name' => $workspace->name,
|
||||
'logo_url' => $workspace->logo_url,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,19 +48,19 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
'remember_token',
|
||||
];
|
||||
|
||||
protected $appends = ['avatar'];
|
||||
protected $appends = [
|
||||
'has_photo',
|
||||
'photo_url',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array{url: string, media_id: string|null}
|
||||
*/
|
||||
public function getAvatarAttribute(): array
|
||||
public function getHasPhotoAttribute(): bool
|
||||
{
|
||||
$media = $this->getFirstMedia('avatar');
|
||||
return $this->getFirstMedia('avatar') !== null;
|
||||
}
|
||||
|
||||
return [
|
||||
'url' => $media?->url ?? $this->getFallbackAvatarUrl($this->name),
|
||||
'media_id' => $media?->id,
|
||||
];
|
||||
public function getPhotoUrlAttribute(): ?string
|
||||
{
|
||||
return $this->getFirstMediaUrl('avatar');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,19 +22,16 @@ class Workspace extends Model
|
|||
'timezone',
|
||||
];
|
||||
|
||||
protected $appends = ['logo'];
|
||||
protected $appends = ['has_logo', 'logo_url'];
|
||||
|
||||
/**
|
||||
* @return array{url: string, media_id: string|null}
|
||||
*/
|
||||
public function getLogoAttribute(): array
|
||||
public function getHasLogoAttribute(): bool
|
||||
{
|
||||
$media = $this->getFirstMedia('logo');
|
||||
return $this->getFirstMedia('logo') !== null;
|
||||
}
|
||||
|
||||
return [
|
||||
'url' => $media?->url ?? $this->getFallbackAvatarUrl($this->name),
|
||||
'media_id' => $media?->id,
|
||||
];
|
||||
public function getLogoUrlAttribute(): ?string
|
||||
{
|
||||
return $this->getFirstMediaUrl('logo') ?: null;
|
||||
}
|
||||
|
||||
public function owner(): BelongsTo
|
||||
|
|
|
|||
|
|
@ -117,5 +117,7 @@
|
|||
'language_updated' => 'Language updated successfully!',
|
||||
'password_updated' => 'Password updated successfully!',
|
||||
'workspace_updated' => 'Settings updated successfully!',
|
||||
'photo_updated' => 'Photo updated successfully!',
|
||||
'photo_deleted' => 'Photo removed successfully!',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'workspaces' => 'Workspaces',
|
||||
'select_workspace' => 'Select workspace',
|
||||
'create_workspace' => 'Create workspace',
|
||||
'create_post' => 'Create post',
|
||||
|
|
|
|||
1
lang/php_en.json
Normal file
1
lang/php_en.json
Normal file
File diff suppressed because one or more lines are too long
1
lang/php_pt-br.json
Normal file
1
lang/php_pt-br.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -117,5 +117,7 @@
|
|||
'language_updated' => 'Idioma atualizado com sucesso!',
|
||||
'password_updated' => 'Senha atualizada com sucesso!',
|
||||
'workspace_updated' => 'Configurações atualizadas com sucesso!',
|
||||
'photo_updated' => 'Foto atualizada com sucesso!',
|
||||
'photo_deleted' => 'Foto removida com sucesso!',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { IconCalendar, IconMenu2, IconSettings, IconShare, IconUsers } from '@ta
|
|||
import { computed } from 'vue';
|
||||
|
||||
import Breadcrumbs from '@/components/Breadcrumbs.vue';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
|
@ -28,7 +28,6 @@ import {
|
|||
import UserMenuContent from '@/components/UserMenuContent.vue';
|
||||
import WorkspaceSwitcher from '@/components/WorkspaceSwitcher.vue';
|
||||
import { useActiveUrl } from '@/composables/useActiveUrl';
|
||||
import { getInitials } from '@/composables/useInitials';
|
||||
import { calendar } from '@/routes/app';
|
||||
import type { BreadcrumbItem, NavItem } from '@/types';
|
||||
|
||||
|
|
@ -149,14 +148,12 @@ const mainNavItems: NavItem[] = [
|
|||
<DropdownMenuTrigger :as-child="true">
|
||||
<Button variant="ghost" size="icon"
|
||||
class="relative size-10 w-auto rounded-full p-1 focus-within:ring-2 focus-within:ring-primary">
|
||||
<Avatar class="size-8 overflow-hidden rounded-full">
|
||||
<AvatarImage v-if="auth.user.avatar?.url" :src="auth.user.avatar?.url"
|
||||
:alt="auth.user.name" />
|
||||
<AvatarFallback
|
||||
class="rounded-lg bg-neutral-200 font-semibold text-black dark:bg-neutral-700 dark:text-white">
|
||||
{{ getInitials(auth.user?.name) }}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<Avatar
|
||||
:src="auth.user.photo_url"
|
||||
:name="auth.user.name"
|
||||
class="size-8 overflow-hidden rounded-full"
|
||||
fallback-class="bg-neutral-200 font-semibold text-black dark:bg-neutral-700 dark:text-white"
|
||||
/>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" class="w-56">
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import { store as storePost } from '@/actions/App/Http/Controllers/App/PostContr
|
|||
import { index as postsIndex } from '@/actions/App/Http/Controllers/App/PostController';
|
||||
import NavMain from '@/components/NavMain.vue';
|
||||
import NavUser from '@/components/NavUser.vue';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
|
@ -45,7 +45,6 @@ import {
|
|||
SidebarMenuItem,
|
||||
useSidebar,
|
||||
} from '@/components/ui/sidebar';
|
||||
import { useInitials } from '@/composables/useInitials';
|
||||
import { accounts, calendar } from '@/routes/app';
|
||||
import { index as apiKeysIndex } from '@/routes/app/api-keys';
|
||||
import { index as hashtags } from '@/routes/app/hashtags';
|
||||
|
|
@ -58,6 +57,7 @@ import type { NavItem } from '@/types';
|
|||
interface Workspace {
|
||||
id: string;
|
||||
name: string;
|
||||
logo_url: string | null;
|
||||
}
|
||||
|
||||
const page = usePage();
|
||||
|
|
@ -65,7 +65,6 @@ const auth = computed(() => page.props.auth);
|
|||
const currentWorkspace = computed<Workspace | null>(() => page.props.auth.currentWorkspace as Workspace | null);
|
||||
const workspaces = computed<Workspace[]>(() => page.props.auth.workspaces as Workspace[]);
|
||||
|
||||
const { getInitials } = useInitials();
|
||||
const { state: sidebarState } = useSidebar();
|
||||
|
||||
const postsNavItems = computed<NavItem[]>(() => [
|
||||
|
|
@ -152,11 +151,12 @@ const switchWorkspace = (workspaceId: string) => {
|
|||
size="lg"
|
||||
class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
|
||||
>
|
||||
<Avatar class="h-8 w-8 shrink-0 rounded-lg">
|
||||
<AvatarFallback class="rounded-lg bg-sidebar-accent text-sidebar-accent-foreground">
|
||||
{{ getInitials(currentWorkspace?.name ?? '?') }}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<Avatar
|
||||
:src="currentWorkspace?.logo_url"
|
||||
:name="currentWorkspace?.name ?? '?'"
|
||||
class="h-8 w-8 shrink-0 rounded-lg"
|
||||
fallback-class="bg-sidebar-accent text-sidebar-accent-foreground"
|
||||
/>
|
||||
<div class="grid flex-1 text-left text-sm leading-tight">
|
||||
<span class="truncate font-semibold">
|
||||
{{ currentWorkspace?.name ?? $t('sidebar.select_workspace') }}
|
||||
|
|
@ -182,11 +182,12 @@ const switchWorkspace = (workspaceId: string) => {
|
|||
:class="workspace.id === currentWorkspace?.id ? 'bg-accent' : ''"
|
||||
@click="switchWorkspace(workspace.id)"
|
||||
>
|
||||
<Avatar class="h-5 w-5 shrink-0 rounded-md">
|
||||
<AvatarFallback class="rounded-md text-[10px]">
|
||||
{{ getInitials(workspace.name) }}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<Avatar
|
||||
:src="workspace.logo_url"
|
||||
:name="workspace.name"
|
||||
class="h-5 w-5 shrink-0 rounded-md"
|
||||
fallback-class="text-[10px]"
|
||||
/>
|
||||
{{ workspace.name }}
|
||||
</DropdownMenuItem>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ withDefaults(
|
|||
|
||||
<template>
|
||||
<header
|
||||
class="flex h-16 shrink-0 items-center justify-between gap-2 border-b border-border px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4"
|
||||
>
|
||||
class="flex h-16 shrink-0 items-center justify-between gap-2 border-b border-border px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<SidebarTrigger class="-ml-1" />
|
||||
<template v-if="breadcrumbs && breadcrumbs.length > 0">
|
||||
|
|
@ -25,4 +24,4 @@ withDefaults(
|
|||
</div>
|
||||
<slot name="right" />
|
||||
</header>
|
||||
</template>
|
||||
</template>
|
||||
|
|
@ -174,7 +174,7 @@ const displayText = computed(() => {
|
|||
<template>
|
||||
<Popover v-model:open="popoverOpen">
|
||||
<PopoverTrigger as-child :disabled="disabled">
|
||||
<Button :id="name" type="button" variant="outline" class="justify-between text-left font-normal"
|
||||
<Button :id="name" type="button" variant="outline" class="w-full justify-between text-left font-normal"
|
||||
:class="{ 'text-muted-foreground': !displayText }" :disabled="disabled">
|
||||
<span>{{ displayText || placeholder }}</span>
|
||||
<IconCalendar class="h-4 w-4" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { usePage } from '@inertiajs/vue3';
|
||||
import { IconChevronRight } from '@tabler/icons-vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
|
@ -18,7 +19,7 @@ import UserInfo from '@/components/UserInfo.vue';
|
|||
import UserMenuContent from './UserMenuContent.vue';
|
||||
|
||||
const page = usePage();
|
||||
const user = page.props.auth.user;
|
||||
const user = computed(() => page.props.auth.user);
|
||||
const { isMobile, state } = useSidebar();
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,63 +1,48 @@
|
|||
<script setup lang="ts">
|
||||
import { router } from '@inertiajs/vue3';
|
||||
import { IconTrash, IconUpload, IconUser } from '@tabler/icons-vue';
|
||||
import axios from 'axios';
|
||||
import { ref, watch } from 'vue';
|
||||
import { IconTrash } from '@tabler/icons-vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@/components/ui/tooltip';
|
||||
import { store as storeMedia, destroy as destroyMedia } from '@/routes/app/medias';
|
||||
|
||||
interface Photo {
|
||||
url: string;
|
||||
media_id: string | null;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
modelId: string;
|
||||
modelType: string;
|
||||
photo: Photo;
|
||||
collection?: string;
|
||||
reloadOnly?: string[];
|
||||
type Props = {
|
||||
photoUrl: string | null;
|
||||
hasPhoto: boolean;
|
||||
name: string;
|
||||
uploadUrl: string;
|
||||
deleteUrl?: string;
|
||||
size?: 'sm' | 'md' | 'lg';
|
||||
rounded?: 'full' | 'lg';
|
||||
}
|
||||
canUpload?: boolean;
|
||||
};
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
collection: 'logo',
|
||||
reloadOnly: () => [],
|
||||
size: 'md',
|
||||
rounded: 'lg',
|
||||
deleteUrl: undefined,
|
||||
canUpload: true,
|
||||
});
|
||||
|
||||
const photoPreview = ref<string | null>(props.photo.url);
|
||||
const fileInput = ref<HTMLInputElement | null>(null);
|
||||
const uploading = ref(false);
|
||||
const fileInputRef = ref<HTMLInputElement | null>(null);
|
||||
const dialogOpen = ref(false);
|
||||
const lightboxOpen = ref(false);
|
||||
|
||||
watch(
|
||||
() => props.photo.url,
|
||||
(newUrl) => {
|
||||
photoPreview.value = newUrl;
|
||||
},
|
||||
);
|
||||
|
||||
const sizeClasses = {
|
||||
sm: 'h-16 w-16',
|
||||
md: 'h-20 w-20',
|
||||
lg: 'h-24 w-24',
|
||||
sm: 'size-16',
|
||||
md: 'size-20',
|
||||
lg: 'size-24',
|
||||
};
|
||||
|
||||
const textSizeClasses = {
|
||||
sm: 'text-lg',
|
||||
md: 'text-xl',
|
||||
lg: 'text-2xl',
|
||||
};
|
||||
|
||||
const roundedClasses = {
|
||||
|
|
@ -65,7 +50,11 @@ const roundedClasses = {
|
|||
lg: 'rounded-lg',
|
||||
};
|
||||
|
||||
const handlePhotoChange = async (event: Event) => {
|
||||
const triggerFileInput = () => {
|
||||
fileInput.value?.click();
|
||||
};
|
||||
|
||||
const handleFileChange = (event: Event) => {
|
||||
const target = event.target as HTMLInputElement;
|
||||
const file = target.files?.[0];
|
||||
|
||||
|
|
@ -75,186 +64,80 @@ const handlePhotoChange = async (event: Event) => {
|
|||
|
||||
uploading.value = true;
|
||||
|
||||
try {
|
||||
const formData = new FormData();
|
||||
formData.append('media', file);
|
||||
formData.append('collection', props.collection);
|
||||
formData.append('model', props.modelType);
|
||||
formData.append('model_id', props.modelId);
|
||||
|
||||
await axios.post(storeMedia.url(), formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
});
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
photoPreview.value = e.target?.result as string;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
if (props.reloadOnly.length > 0) {
|
||||
router.reload({ only: props.reloadOnly, preserveScroll: true });
|
||||
} else {
|
||||
router.reload({ preserveScroll: true });
|
||||
}
|
||||
|
||||
closeDialog();
|
||||
} catch (error) {
|
||||
console.error('Error uploading photo:', error);
|
||||
} finally {
|
||||
uploading.value = false;
|
||||
if (fileInputRef.value) {
|
||||
fileInputRef.value.value = '';
|
||||
}
|
||||
}
|
||||
router.post(
|
||||
props.uploadUrl,
|
||||
{ photo: file },
|
||||
{
|
||||
forceFormData: true,
|
||||
onFinish: () => {
|
||||
uploading.value = false;
|
||||
if (fileInput.value) {
|
||||
fileInput.value.value = '';
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
const removePhoto = async () => {
|
||||
if (!props.photo.media_id) {
|
||||
const handleDelete = () => {
|
||||
if (!props.deleteUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await axios.delete(
|
||||
destroyMedia.url({ modelId: props.modelId, media: props.photo.media_id! }),
|
||||
);
|
||||
|
||||
if (props.reloadOnly.length > 0) {
|
||||
router.reload({ only: props.reloadOnly, preserveScroll: true });
|
||||
} else {
|
||||
router.reload({ preserveScroll: true });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error removing photo:', error);
|
||||
}
|
||||
};
|
||||
|
||||
const triggerFileInput = () => {
|
||||
fileInputRef.value?.click();
|
||||
};
|
||||
|
||||
const openDialog = () => {
|
||||
dialogOpen.value = true;
|
||||
};
|
||||
|
||||
const closeDialog = () => {
|
||||
dialogOpen.value = false;
|
||||
router.delete(props.deleteUrl);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="relative">
|
||||
<img
|
||||
v-if="photoPreview"
|
||||
:src="photoPreview"
|
||||
alt="Preview"
|
||||
:class="[
|
||||
'cursor-pointer border-2 border-muted object-cover transition-opacity hover:opacity-80',
|
||||
sizeClasses[size],
|
||||
roundedClasses[rounded],
|
||||
]"
|
||||
@click="lightboxOpen = true"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
:class="[
|
||||
'flex items-center justify-center bg-muted',
|
||||
sizeClasses[size],
|
||||
roundedClasses[rounded],
|
||||
]"
|
||||
>
|
||||
<IconUser class="h-8 w-8 text-muted-foreground" />
|
||||
</div>
|
||||
</div>
|
||||
<Avatar
|
||||
:src="photoUrl"
|
||||
:name="name"
|
||||
:class="[sizeClasses[size], roundedClasses[rounded]]"
|
||||
:fallback-class="[
|
||||
'bg-sidebar-accent text-sidebar-accent-foreground',
|
||||
textSizeClasses[size],
|
||||
]"
|
||||
/>
|
||||
|
||||
<TooltipProvider>
|
||||
<div v-if="canUpload" class="flex flex-col gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<input
|
||||
ref="fileInputRef"
|
||||
ref="fileInput"
|
||||
type="file"
|
||||
accept="image/*"
|
||||
class="hidden"
|
||||
@change="handlePhotoChange"
|
||||
@change="handleFileChange"
|
||||
/>
|
||||
|
||||
<Tooltip>
|
||||
<TooltipTrigger as-child>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
class="px-2"
|
||||
:disabled="uploading"
|
||||
@click="openDialog"
|
||||
>
|
||||
<IconUpload class="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>
|
||||
{{
|
||||
uploading
|
||||
? 'Uploading...'
|
||||
: photo.media_id
|
||||
? 'Change photo'
|
||||
: 'Add photo'
|
||||
}}
|
||||
</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip v-if="photo.media_id">
|
||||
<TooltipTrigger as-child>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
class="px-2"
|
||||
@click="removePhoto"
|
||||
>
|
||||
<IconTrash class="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>Remove photo</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
:disabled="uploading"
|
||||
@click="triggerFileInput"
|
||||
>
|
||||
{{ uploading ? 'Uploading...' : 'Upload' }}
|
||||
</Button>
|
||||
<TooltipProvider v-if="hasPhoto && deleteUrl">
|
||||
<Tooltip>
|
||||
<TooltipTrigger as-child>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="icon"
|
||||
class="size-8"
|
||||
@click="handleDelete"
|
||||
>
|
||||
<IconTrash class="size-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Remove photo</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
</TooltipProvider>
|
||||
|
||||
<Dialog :open="dialogOpen" @update:open="(open) => !open && closeDialog()">
|
||||
<DialogContent class="sm:max-w-md">
|
||||
<DialogTitle>Upload Photo</DialogTitle>
|
||||
<DialogDescription class="sr-only">
|
||||
Select an image file to upload
|
||||
</DialogDescription>
|
||||
|
||||
<div class="flex flex-col items-center gap-4 py-8">
|
||||
<div class="rounded-full bg-muted p-6">
|
||||
<IconUpload class="h-12 w-12 text-muted-foreground" />
|
||||
</div>
|
||||
<p class="text-center text-sm text-muted-foreground">
|
||||
Select an image from your computer
|
||||
</p>
|
||||
<Button type="button" :disabled="uploading" @click="triggerFileInput">
|
||||
{{ uploading ? 'Uploading...' : 'Choose file' }}
|
||||
</Button>
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<Dialog v-model:open="lightboxOpen">
|
||||
<DialogContent class="max-w-[95vw] overflow-hidden bg-black p-0 sm:max-w-3xl">
|
||||
<DialogTitle class="sr-only">View Photo</DialogTitle>
|
||||
<DialogDescription class="sr-only">Photo in full size</DialogDescription>
|
||||
<img
|
||||
v-if="photoPreview"
|
||||
:src="photoPreview"
|
||||
alt="Preview"
|
||||
class="h-auto max-h-[90vh] w-full object-contain"
|
||||
/>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
<p class="text-xs text-muted-foreground">
|
||||
Recommended: square image, max 2 MB.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { useInitials } from '@/composables/useInitials';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import type { User } from '@/types';
|
||||
|
||||
type Props = {
|
||||
|
|
@ -13,19 +12,17 @@ type Props = {
|
|||
withDefaults(defineProps<Props>(), {
|
||||
showEmail: false,
|
||||
});
|
||||
|
||||
const { getInitials } = useInitials();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Avatar :class="['h-8 w-8 rounded-lg', avatarClass]">
|
||||
<AvatarImage v-if="user.avatar" :src="user.avatar" :alt="user.name" />
|
||||
<AvatarFallback
|
||||
:class="fallbackClass ?? 'bg-sidebar-accent text-sidebar-accent-foreground'"
|
||||
>
|
||||
{{ getInitials(user.name) }}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<Avatar
|
||||
:src="user.photo_url"
|
||||
:name="user.name"
|
||||
:class="['h-8 w-8 rounded-lg', avatarClass]"
|
||||
:fallback-class="
|
||||
fallbackClass ?? 'bg-sidebar-accent text-sidebar-accent-foreground'
|
||||
"
|
||||
/>
|
||||
|
||||
<div class="grid flex-1 text-left text-sm leading-tight">
|
||||
<span class="truncate font-medium">{{ user.name }}</span>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { computed } from "vue"
|
||||
import { AvatarRoot } from "reka-ui"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { getInitials } from "@/composables/useInitials"
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"]
|
||||
src?: string | null
|
||||
name?: string
|
||||
fallbackClass?: HTMLAttributes["class"]
|
||||
}>()
|
||||
|
||||
const hasProps = computed(() => props.src !== undefined || props.name !== undefined)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -13,6 +20,20 @@ const props = defineProps<{
|
|||
data-slot="avatar"
|
||||
:class="cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', props.class)"
|
||||
>
|
||||
<slot />
|
||||
<template v-if="hasProps">
|
||||
<img
|
||||
v-if="src"
|
||||
:src="src"
|
||||
:alt="name"
|
||||
class="aspect-square size-full object-cover"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
:class="cn('flex size-full items-center justify-center bg-muted font-medium', props.fallbackClass)"
|
||||
>
|
||||
{{ name ? getInitials(name) : '' }}
|
||||
</div>
|
||||
</template>
|
||||
<slot v-else />
|
||||
</AvatarRoot>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -10,16 +10,10 @@ const props = defineProps<PrimitiveProps & {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Primitive
|
||||
data-slot="sidebar-group-label"
|
||||
data-sidebar="group-label"
|
||||
:as="as"
|
||||
:as-child="asChild"
|
||||
:class="cn(
|
||||
'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
||||
'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',
|
||||
props.class)"
|
||||
>
|
||||
<Primitive data-slot="sidebar-group-label" data-sidebar="group-label" :as="as" :as-child="asChild" :class="cn(
|
||||
'text-sidebar-foreground/60 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',
|
||||
'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',
|
||||
props.class)">
|
||||
<slot />
|
||||
</Primitive>
|
||||
</template>
|
||||
</template>
|
||||
|
|
@ -8,14 +8,11 @@ const props = defineProps<{
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<main
|
||||
data-slot="sidebar-inset"
|
||||
:class="cn(
|
||||
'bg-background relative flex w-full flex-1 flex-col',
|
||||
'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',
|
||||
props.class,
|
||||
)"
|
||||
>
|
||||
<main data-slot="sidebar-inset" :class="cn(
|
||||
'bg-card text-card-foreground relative flex w-full flex-1 flex-col overflow-y-auto',
|
||||
'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-lg md:peer-data-[variant=inset]:border md:peer-data-[variant=inset]:border-border md:peer-data-[variant=inset]:shadow-xs md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2',
|
||||
props.class,
|
||||
)">
|
||||
<slot />
|
||||
</main>
|
||||
</template>
|
||||
</template>
|
||||
|
|
@ -27,19 +27,19 @@ const open = useVModel(props, "open", emits, {
|
|||
passive: (props.open === undefined) as false,
|
||||
}) as Ref<boolean>
|
||||
|
||||
function setOpen(value: boolean) {
|
||||
const setOpen = (value: boolean) => {
|
||||
open.value = value // emits('update:open', value)
|
||||
|
||||
// This sets the cookie to keep the sidebar state.
|
||||
document.cookie = `${SIDEBAR_COOKIE_NAME}=${open.value}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`
|
||||
}
|
||||
|
||||
function setOpenMobile(value: boolean) {
|
||||
const setOpenMobile = (value: boolean) => {
|
||||
openMobile.value = value
|
||||
}
|
||||
|
||||
// Helper to toggle the sidebar.
|
||||
function toggleSidebar() {
|
||||
const toggleSidebar = () => {
|
||||
return isMobile.value ? setOpenMobile(!openMobile.value) : setOpen(!open.value)
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ provideSidebarContext({
|
|||
'--sidebar-width': SIDEBAR_WIDTH,
|
||||
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
||||
}"
|
||||
:class="cn('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full', props.class)"
|
||||
:class="cn('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh w-full overflow-hidden', props.class)"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<slot />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
import type { ComputedRef, Ref } from "vue"
|
||||
import { createContext } from "reka-ui"
|
||||
import type { ComputedRef, Ref } from 'vue';
|
||||
|
||||
export type SidebarContext = {
|
||||
state: ComputedRef<'expanded' | 'collapsed'>;
|
||||
open: Ref<boolean>;
|
||||
setOpen: (value: boolean) => void;
|
||||
isMobile: Ref<boolean>;
|
||||
openMobile: Ref<boolean>;
|
||||
setOpenMobile: (value: boolean) => void;
|
||||
toggleSidebar: () => void;
|
||||
};
|
||||
|
||||
export const SIDEBAR_COOKIE_NAME = "sidebar_state"
|
||||
export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
|
||||
|
|
@ -8,12 +18,4 @@ export const SIDEBAR_WIDTH_MOBILE = "18rem"
|
|||
export const SIDEBAR_WIDTH_ICON = "3rem"
|
||||
export const SIDEBAR_KEYBOARD_SHORTCUT = "b"
|
||||
|
||||
export const [useSidebar, provideSidebarContext] = createContext<{
|
||||
state: ComputedRef<"expanded" | "collapsed">
|
||||
open: Ref<boolean>
|
||||
setOpen: (value: boolean) => void
|
||||
isMobile: Ref<boolean>
|
||||
openMobile: Ref<boolean>
|
||||
setOpenMobile: (value: boolean) => void
|
||||
toggleSidebar: () => void
|
||||
}>("Sidebar")
|
||||
export const [useSidebar, provideSidebarContext] = createContext<SidebarContext>("Sidebar")
|
||||
|
|
|
|||
|
|
@ -9,18 +9,30 @@ const currentUrlReactive = computed(
|
|||
() => new URL(page.url, window?.location.origin).pathname,
|
||||
);
|
||||
|
||||
const toPathname = (url: string): string => {
|
||||
try {
|
||||
return new URL(url, window.location.origin).pathname;
|
||||
} catch {
|
||||
return url;
|
||||
}
|
||||
};
|
||||
|
||||
export function useActiveUrl() {
|
||||
function urlIsActive(
|
||||
urlToCheck: NonNullable<InertiaLinkProps['href']>,
|
||||
options?: { prefix?: boolean },
|
||||
) {
|
||||
const targetUrl = toUrl(urlToCheck);
|
||||
const current = currentUrlReactive.value;
|
||||
const pathname = toPathname(toUrl(urlToCheck));
|
||||
|
||||
if (options?.prefix) {
|
||||
return currentUrlReactive.value.startsWith(targetUrl);
|
||||
return current.startsWith(pathname);
|
||||
}
|
||||
|
||||
return targetUrl === currentUrlReactive.value;
|
||||
return (
|
||||
current === pathname ||
|
||||
(pathname !== '/' && current.startsWith(pathname + '/'))
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -63,27 +63,16 @@ const { urlIsActive } = useActiveUrl();
|
|||
<template>
|
||||
<div class="px-4 py-6">
|
||||
<div class="flex flex-col items-center gap-6">
|
||||
<Heading
|
||||
:title="$t('settings.title')"
|
||||
:description="$t('settings.description')"
|
||||
class="w-full max-w-2xl"
|
||||
/>
|
||||
<Heading :title="$t('settings.title')" :description="$t('settings.description')" class="w-full max-w-2xl" />
|
||||
|
||||
<nav
|
||||
class="inline-flex h-9 w-full max-w-2xl items-center justify-start rounded-lg bg-muted p-1 text-muted-foreground"
|
||||
aria-label="Settings"
|
||||
>
|
||||
<Link
|
||||
v-for="item in navItems"
|
||||
:key="toUrl(item.href)"
|
||||
:href="item.href"
|
||||
:class="[
|
||||
'inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
||||
urlIsActive(item.href)
|
||||
? 'bg-background text-foreground shadow'
|
||||
: 'hover:bg-background/50 hover:text-foreground',
|
||||
]"
|
||||
>
|
||||
class="inline-flex h-9 w-fit items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground">
|
||||
<Link v-for="item in navItems" :key="toUrl(item.href)" :href="item.href"
|
||||
class="inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50"
|
||||
:class="urlIsActive(item.href)
|
||||
? 'bg-background text-foreground shadow-sm'
|
||||
: 'hover:bg-background/50 hover:text-foreground'
|
||||
">
|
||||
{{ item.title }}
|
||||
</Link>
|
||||
</nav>
|
||||
|
|
@ -93,4 +82,4 @@ const { urlIsActive } = useActiveUrl();
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
|
@ -261,7 +261,7 @@ const formatTime = (scheduledAt: string): string => {
|
|||
|
||||
<Head :title="$t('calendar.title')" />
|
||||
|
||||
<AppLayout :breadcrumbs="breadcrumbs">
|
||||
<AppLayout :breadcrumbs="breadcrumbs" :fullWidth="true">
|
||||
<div class="flex flex-col h-full">
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between p-4 border-b gap-2">
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ const appendHashtags = (hashtag: WorkspaceHashtag) => {
|
|||
|
||||
<Head :title="isReadOnly ? $t('posts.edit.view_title') : $t('posts.edit.title')" />
|
||||
|
||||
<AppLayout :breadcrumbs="breadcrumbs">
|
||||
<AppLayout :breadcrumbs="breadcrumbs" :fullWidth="true">
|
||||
<div class="flex flex-col h-screen">
|
||||
<!-- Top Bar with Tabs and Actions -->
|
||||
<div class="relative flex items-center justify-between border-b px-4 py-2 bg-background">
|
||||
|
|
@ -1126,8 +1126,7 @@ const appendHashtags = (hashtag: WorkspaceHashtag) => {
|
|||
<div>
|
||||
<Button type="button" variant="outline"
|
||||
class="w-full justify-start gap-2 text-destructive hover:text-destructive"
|
||||
:disabled="isSaving || isSubmitting"
|
||||
@click="deletePost(); showMobileActionsSheet = false">
|
||||
:disabled="isSaving || isSubmitting" @click="deletePost(); showMobileActionsSheet = false">
|
||||
<IconTrash class="h-4 w-4" />
|
||||
{{ $t('posts.edit.delete') }}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { Input } from '@/components/ui/input';
|
|||
import { Label } from '@/components/ui/label';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||
import { edit } from '@/routes/app/profile';
|
||||
import { edit, uploadPhoto, deletePhoto } from '@/routes/app/profile';
|
||||
import { send } from '@/routes/verification';
|
||||
import { type BreadcrumbItem } from '@/types';
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ interface Props {
|
|||
defineProps<Props>();
|
||||
|
||||
const page = usePage();
|
||||
const user = page.props.auth.user;
|
||||
const user = computed(() => page.props.auth.user);
|
||||
|
||||
const breadcrumbItems = computed<BreadcrumbItem[]>(() => [
|
||||
{
|
||||
|
|
@ -52,12 +52,11 @@ const breadcrumbItems = computed<BreadcrumbItem[]>(() => [
|
|||
<div class="grid gap-2">
|
||||
<Label>{{ $t('settings.profile.avatar') }}</Label>
|
||||
<PhotoUpload
|
||||
:model-id="user.id"
|
||||
model-type="App\Models\User"
|
||||
:photo="user.avatar"
|
||||
collection="avatar"
|
||||
:reload-only="['auth']"
|
||||
rounded="full"
|
||||
:photo-url="user.photo_url"
|
||||
:has-photo="user.has_photo"
|
||||
:name="user.name"
|
||||
:upload-url="uploadPhoto().url"
|
||||
:delete-url="deletePhoto().url"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { Input } from '@/components/ui/input';
|
|||
import { Label } from '@/components/ui/label';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||
import { settings } from '@/routes/app/workspace';
|
||||
import { settings, uploadLogo, deleteLogo } from '@/routes/app/workspace';
|
||||
import { update } from '@/routes/app/workspace/settings';
|
||||
import { type BreadcrumbItem } from '@/types';
|
||||
|
||||
|
|
@ -20,10 +20,8 @@ interface Workspace {
|
|||
id: string;
|
||||
name: string;
|
||||
timezone: string;
|
||||
logo: {
|
||||
url: string;
|
||||
media_id: string | null;
|
||||
};
|
||||
has_logo: boolean;
|
||||
logo_url: string | null;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
|
|
@ -66,12 +64,11 @@ const submit = () => {
|
|||
<div class="grid gap-2">
|
||||
<Label>{{ $t('settings.workspace.logo') }}</Label>
|
||||
<PhotoUpload
|
||||
:model-id="workspace.id"
|
||||
model-type="App\Models\Workspace"
|
||||
:photo="workspace.logo"
|
||||
collection="logo"
|
||||
:reload-only="['workspace']"
|
||||
rounded="full"
|
||||
:photo-url="workspace.logo_url"
|
||||
:has-photo="workspace.has_logo"
|
||||
:name="workspace.name"
|
||||
:upload-url="uploadLogo().url"
|
||||
:delete-url="deleteLogo().url"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ function () {
|
|||
// Workspace settings
|
||||
Route::get('settings/workspace', [WorkspaceController::class, 'settings'])->name('app.workspace.settings');
|
||||
Route::put('settings/workspace', [WorkspaceController::class, 'updateSettings'])->name('app.workspace.settings.update');
|
||||
Route::post('settings/workspace/logo', [WorkspaceController::class, 'uploadLogo'])->name('app.workspace.upload-logo');
|
||||
Route::delete('settings/workspace/logo', [WorkspaceController::class, 'deleteLogo'])->name('app.workspace.delete-logo');
|
||||
|
||||
// Social Accounts
|
||||
Route::get('accounts', [SocialController::class, 'index'])->name('app.accounts');
|
||||
|
|
@ -165,6 +167,8 @@ function () {
|
|||
Route::middleware(['auth'])->group(function () {
|
||||
Route::get('settings/profile', [ProfileController::class, 'edit'])->name('app.profile.edit');
|
||||
Route::patch('settings/profile', [ProfileController::class, 'update'])->name('app.profile.update');
|
||||
Route::post('settings/profile/photo', [ProfileController::class, 'uploadPhoto'])->name('app.profile.upload-photo');
|
||||
Route::delete('settings/profile/photo', [ProfileController::class, 'deletePhoto'])->name('app.profile.delete-photo');
|
||||
Route::patch('settings/language', [ProfileController::class, 'updateLanguage'])->name('app.profile.language');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue