dashboard page and icons adjustment

This commit is contained in:
Yared Yemane 2026-10-22 14:29:39 +03:00
parent aca7efc1ff
commit 9e8b20aaa6
11 changed files with 53 additions and 48 deletions

View File

@ -9,7 +9,7 @@ import {
import { Select } from "../ui/select" import { Select } from "../ui/select"
import { aggregateRevenueByMonth, formatRevenueAxisTick } from "../../lib/analytics" import { aggregateRevenueByMonth, formatRevenueAxisTick } from "../../lib/analytics"
import type { DateRevenue } from "../../types/analytics.types" import type { DateRevenue } from "../../types/analytics.types"
import spinnerSrc from "../../assets/Circular-indeterminate progress indicator.svg" import spinnerSrc from "../../assets/05d37a91-04f9-41d8-99a2-b11bf20a6af2.png"
export function RevenueTrendCard({ paymentMethod }: { paymentMethod?: string }) { export function RevenueTrendCard({ paymentMethod }: { paymentMethod?: string }) {
const currentYear = new Date().getFullYear() const currentYear = new Date().getFullYear()

View File

@ -1,4 +1,4 @@
import spinnerSrc from "../../assets/Circular-indeterminate progress indicator.svg" import spinnerSrc from "../../assets/05d37a91-04f9-41d8-99a2-b11bf20a6af2.png"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
interface SpinnerIconProps { interface SpinnerIconProps {

View File

@ -98,7 +98,7 @@ function SectionCard({
function LoadingSkeleton() { function LoadingSkeleton() {
return ( return (
<div className="mx-auto w-full max-w-3xl space-y-6 py-8"> <div className="mx-auto w-full max-w-7xl space-y-6 py-8">
<div className="h-8 w-48 animate-pulse rounded-lg bg-grayScale-100" /> <div className="h-8 w-48 animate-pulse rounded-lg bg-grayScale-100" />
<div className="h-28 animate-pulse rounded-xl bg-grayScale-100" /> <div className="h-28 animate-pulse rounded-xl bg-grayScale-100" />
<div className="h-48 animate-pulse rounded-xl bg-grayScale-100" /> <div className="h-48 animate-pulse rounded-xl bg-grayScale-100" />
@ -215,7 +215,7 @@ export function ProfilePage() {
if (error || !profile) { if (error || !profile) {
return ( return (
<div className="mx-auto w-full max-w-3xl py-16"> <div className="mx-auto w-full max-w-7xl py-16">
<Card className="border border-grayScale-100 shadow-none"> <Card className="border border-grayScale-100 shadow-none">
<CardContent className="flex flex-col items-center gap-5 p-12"> <CardContent className="flex flex-col items-center gap-5 p-12">
<div className="flex h-20 w-20 items-center justify-center rounded-full bg-grayScale-50"> <div className="flex h-20 w-20 items-center justify-center rounded-full bg-grayScale-50">
@ -251,10 +251,15 @@ export function ProfilePage() {
}; };
return ( return (
<div className="mx-auto w-full max-w-3xl space-y-6"> <div className="mx-auto w-full max-w-7xl space-y-6">
<div>
<h1 className="text-xl font-semibold tracking-tight text-grayScale-900"> <h1 className="text-xl font-semibold tracking-tight text-grayScale-900">
My Profile My Profile
</h1> </h1>
<p className="mt-1 text-sm text-grayScale-500">
Your personal details, work information, and account activity.
</p>
</div>
{/* Hero */} {/* Hero */}
<Card className="border border-grayScale-100 shadow-none"> <Card className="border border-grayScale-100 shadow-none">
@ -311,9 +316,10 @@ export function ProfilePage() {
</CardContent> </CardContent>
</Card> </Card>
<div className="grid items-stretch gap-6 lg:grid-cols-2">
{/* Personal Information */} {/* Personal Information */}
<SectionCard title="Personal Information"> <SectionCard title="Personal Information">
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2"> <div className="grid gap-x-10 gap-y-6 sm:grid-cols-2">
<FieldGroup label="First Name" value={profile.first_name} /> <FieldGroup label="First Name" value={profile.first_name} />
<FieldGroup label="Last Name" value={profile.last_name} /> <FieldGroup label="Last Name" value={profile.last_name} />
<FieldGroup label="Email address" value={profile.email} /> <FieldGroup label="Email address" value={profile.email} />
@ -342,10 +348,11 @@ export function ProfilePage() {
<FieldGroup label="Member ID" value={String(profile.id)} mono /> <FieldGroup label="Member ID" value={String(profile.id)} mono />
</div> </div>
</SectionCard> </SectionCard>
</div>
{/* Account Activity */} {/* Account Activity */}
<SectionCard title="Account Activity"> <SectionCard title="Account Activity">
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2"> <div className="grid gap-x-8 gap-y-5 sm:grid-cols-2 lg:grid-cols-4">
<FieldGroup label="Joined" value={formatDate(profile.created_at)} /> <FieldGroup label="Joined" value={formatDate(profile.created_at)} />
<FieldGroup <FieldGroup
label="Last Login" label="Last Login"

View File

@ -217,7 +217,7 @@ export function AllNotificationsPage() {
<Link to="/notifications">My inbox</Link> <Link to="/notifications">My inbox</Link>
</Button> </Button>
<Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}> <Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}>
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} /> {loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh Refresh
</Button> </Button>
</div> </div>

View File

@ -175,9 +175,7 @@ export function EmailTemplateDetailPage() {
disabled={loading || saving} disabled={loading || saving}
onClick={() => void load()} onClick={() => void load()}
> >
<RefreshCw {(loading || saving) ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
className={cn("mr-2 h-4 w-4", (loading || saving) && "animate-spin")}
/>
Refresh Refresh
</Button> </Button>
{!template.is_system ? ( {!template.is_system ? (

View File

@ -106,7 +106,7 @@ export function EmailTemplatesPage() {
disabled={loading} disabled={loading}
onClick={() => void load()} onClick={() => void load()}
> >
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} /> {loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh Refresh
</Button> </Button>
</div> </div>

View File

@ -199,7 +199,7 @@ export function ScheduledNotificationsPage() {
</Link> </Link>
</Button> </Button>
<Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}> <Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}>
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} /> {loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh Refresh
</Button> </Button>
</div> </div>

View File

@ -331,7 +331,7 @@ export function PaymentsPage() {
disabled={loading} disabled={loading}
onClick={() => void fetchPayments()} onClick={() => void fetchPayments()}
> >
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} /> {loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh Refresh
</Button> </Button>
</div> </div>

View File

@ -196,7 +196,7 @@ export function AppVersionsTab() {
disabled={loading} disabled={loading}
onClick={() => void load()} onClick={() => void load()}
> >
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} /> {loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh Refresh
</Button> </Button>
</div> </div>

View File

@ -154,7 +154,7 @@ export function SubscriptionPlansTab() {
disabled={loading} disabled={loading}
onClick={() => void load()} onClick={() => void load()}
> >
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} /> {loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh Refresh
</Button> </Button>
</div> </div>

View File

@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from "react" import { useCallback, useEffect, useMemo, useRef, useState } from "react"
import { CalendarDays, ChevronDown, ChevronLeft, ChevronRight, Search } from "lucide-react" import { CalendarDays, ChevronDown, ChevronLeft, ChevronRight, Search } from "lucide-react"
import spinnerSrc from "../../assets/Circular-indeterminate progress indicator.svg" import spinnerSrc from "../../assets/05d37a91-04f9-41d8-99a2-b11bf20a6af2.png"
import { AdminFiltersPanel } from "../../components/filters/AdminFiltersPanel" import { AdminFiltersPanel } from "../../components/filters/AdminFiltersPanel"
import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card" import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card"
import { Input } from "../../components/ui/input" import { Input } from "../../components/ui/input"