fixed my propries page and fixed the sidebar again mouaz is the best in the west
All checks were successful
Build frontend / build (push) Successful in 49s

This commit is contained in:
mouazkh
2026-05-25 22:14:37 +03:00
parent aff9912ac2
commit 7a3248aec5
3 changed files with 126 additions and 110 deletions

View File

@ -27,14 +27,14 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
if (!AuthService.isAuthenticated()) return null;
const positionStyle = {
left: '24px',
const positionStyle = {
left: '16px',
top: '50%',
transform: 'translateY(-50%)',
};
const cardVariants = {
initial: { opacity: 0, x: isRTL ? -20 : 20 },
initial: { opacity: 0, x: 20 },
animate: { opacity: 1, x: 0, transition: { duration: 0.4, ease: 'easeOut' } },
};
@ -47,17 +47,8 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
const renderTooltip = (id, label) => {
if (tooltip !== id) return null;
return (
<div
className={`absolute ${isRTL ? 'right-full mr-2' : 'left-full ml-2'} top-1/2 -translate-y-1/2 px-2 py-1 bg-gray-800 text-white text-xs rounded-lg whitespace-nowrap z-20 shadow-lg flex items-center`}
>
<span className="relative">
{label}
<span
className={`absolute ${isRTL ? 'right-full -mr-1' : 'left-full -ml-1'} top-1/2 -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-transparent ${
isRTL ? 'border-r-4 border-r-gray-800' : 'border-l-4 border-l-gray-800'
}`}
></span>
</span>
<div className="absolute left-full mr-3 top-1/2 -translate-y-1/2 px-3 py-2 bg-gray-800 text-white text-sm rounded-lg whitespace-nowrap z-20 shadow-lg">
{label}
</div>
);
};
@ -70,7 +61,7 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
initial="initial"
animate="animate"
>
<div className="bg-white/90 backdrop-blur-md rounded-2xl shadow-lg border border-gray-200/60 py-3 px-2 flex flex-col gap-3 transition-all duration-300 hover:shadow-xl hover:bg-white/95">
<div className="bg-white/90 backdrop-blur-md rounded-2xl shadow-lg border border-gray-200/60 py-4 px-3 flex flex-col gap-4 transition-all duration-300 hover:shadow-xl hover:bg-white/95">
{isAdmin ? (
<>
<motion.div
@ -84,9 +75,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/admin/add-admin"
className="flex items-center justify-center w-12 h-12 rounded-xl bg-amber-50 border border-amber-200 text-amber-600 hover:bg-amber-100 transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl bg-amber-50 border border-amber-200 text-amber-600 hover:bg-amber-100 transition-colors"
>
<UserPlus className="w-6 h-6" />
<UserPlus className="w-7 h-7" />
</Link>
{renderTooltip('addAdmin', 'إضافة أدمن')}
</motion.div>
@ -102,9 +93,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/admin/privacy"
className="flex items-center justify-center w-12 h-12 rounded-xl bg-slate-50 border border-slate-200 text-slate-700 hover:bg-slate-100 transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl bg-slate-50 border border-slate-200 text-slate-700 hover:bg-slate-100 transition-colors"
>
<Shield className="w-6 h-6" />
<Shield className="w-7 h-7" />
</Link>
{renderTooltip('editPrivacy', 'تعديل سياسة الخصوصية')}
</motion.div>
@ -122,15 +113,15 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/favorites"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<div className="relative">
<Heart className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<Heart className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
{favorites.length > 0 && (
<motion.span
initial={{ scale: 0 }}
animate={{ scale: 1 }}
className="absolute -right-1 -top-1 w-5 h-5 bg-linear-to-r from-amber-500 to-amber-600 text-white text-xs rounded-full flex items-center justify-center shadow-md"
className="absolute -right-1 -top-1 w-6 h-6 bg-linear-to-r from-amber-500 to-amber-600 text-white text-xs rounded-full flex items-center justify-center shadow-md"
>
{favorites.length}
</motion.span>
@ -150,15 +141,15 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/notifications"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<div className="relative">
<Bell className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<Bell className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
{unreadCount > 0 && (
<motion.span
initial={{ scale: 0 }}
animate={{ scale: 1 }}
className="absolute -right-1 -top-1 w-5 h-5 bg-linear-to-r from-red-500 to-red-600 text-white text-xs rounded-full flex items-center justify-center shadow-md"
className="absolute -right-1 -top-1 w-6 h-6 bg-linear-to-r from-red-500 to-red-600 text-white text-xs rounded-full flex items-center justify-center shadow-md"
>
{unreadCount}
</motion.span>
@ -178,9 +169,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/payments"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<CreditCard className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<CreditCard className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
</Link>
{renderTooltip('payments', 'المدفوعات')}
</motion.div>
@ -195,9 +186,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/booked-properties"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<CalendarDays className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<CalendarDays className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
</Link>
{renderTooltip('booked', 'حجوزاتي')}
</motion.div>
@ -212,9 +203,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/my-rates"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<Star className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<Star className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
</Link>
{renderTooltip('myRates', 'تقييماتي')}
</motion.div>
@ -229,9 +220,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/reports"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<FileText className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<FileText className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
</Link>
{renderTooltip('reports', 'البلاغات')}
</motion.div>
@ -246,9 +237,9 @@ export default function FloatingSidebar({ isRTL, isAdmin }) {
>
<Link
href="/settings"
className="flex items-center justify-center w-12 h-12 rounded-xl transition-colors"
className="flex items-center justify-center w-14 h-14 rounded-xl transition-colors"
>
<Settings className="w-6 h-6 text-gray-600 transition-colors group-hover:text-amber-600" />
<Settings className="w-7 h-7 text-gray-600 transition-colors group-hover:text-amber-600" />
</Link>
{renderTooltip('settings', 'الإعدادات')}
</motion.div>