refactor: migrate UI components to @ciphera-net/ui v0.0.11
This commit is contained in:
@@ -5,7 +5,7 @@ import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { useAuth } from '@/lib/auth/context'
|
||||
import { AUTH_URL } from '@/lib/api/client'
|
||||
import { exchangeAuthCode, setSessionAction } from '@/app/actions/auth'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
|
||||
function AuthCallbackContent() {
|
||||
const router = useRouter()
|
||||
@@ -111,12 +111,12 @@ function AuthCallbackContent() {
|
||||
}
|
||||
|
||||
// * Use standard Pulse loading screen to make transition to Home seamless
|
||||
return <LoadingOverlay portal={false} />
|
||||
return <LoadingOverlay logoSrc="/pulse_icon_no_margins.png" title="Pulse" portal={false} />
|
||||
}
|
||||
|
||||
export default function AuthCallback() {
|
||||
return (
|
||||
<Suspense fallback={<LoadingOverlay portal={false} />}>
|
||||
<Suspense fallback={<LoadingOverlay logoSrc="/pulse_icon_no_margins.png" title="Pulse" portal={false} />}>
|
||||
<AuthCallbackContent />
|
||||
</Suspense>
|
||||
)
|
||||
|
||||
@@ -47,6 +47,7 @@ export default function LayoutContent({ children }: { children: React.ReactNode
|
||||
activeOrgId={auth.user?.org_id}
|
||||
onSwitchWorkspace={handleSwitchWorkspace}
|
||||
onCreateOrganization={handleCreateOrganization}
|
||||
allowPersonalWorkspace={false}
|
||||
/>
|
||||
<main className="flex-1 pt-24 pb-8">
|
||||
{children}
|
||||
|
||||
@@ -4,9 +4,8 @@ import { useState } from 'react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { createOrganization } from '@/lib/api/organization'
|
||||
import { useAuth } from '@/lib/auth/context'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { Button } from '@/components/ui/Button'
|
||||
import { Input } from '@/components/ui/Input'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
import { Button, Input } from '@ciphera-net/ui'
|
||||
|
||||
export default function OnboardingPage() {
|
||||
const [name, setName] = useState('')
|
||||
@@ -41,7 +40,7 @@ export default function OnboardingPage() {
|
||||
}
|
||||
}
|
||||
|
||||
if (loading) return <LoadingOverlay title="Creating Organization..." />
|
||||
if (loading) return <LoadingOverlay logoSrc="/pulse_icon_no_margins.png" title="Creating Organization..." />
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-neutral-900 px-4">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import Link from 'next/link'
|
||||
import { useAuth } from '@/lib/auth/context'
|
||||
import { initiateOAuthFlow, initiateSignupFlow } from '@/lib/api/oauth'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
import SiteList from '@/components/sites/SiteList'
|
||||
import { Button } from '@ciphera-net/ui'
|
||||
import { BarChartIcon, LockClosedIcon, LightningBoltIcon } from '@radix-ui/react-icons'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'
|
||||
import { useParams, useSearchParams, useRouter } from 'next/navigation'
|
||||
import { getPublicDashboard, type DashboardData } from '@/lib/api/stats'
|
||||
import { toast } from 'sonner'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
import Chart from '@/components/dashboard/Chart'
|
||||
import TopPages from '@/components/dashboard/ContentStats'
|
||||
import TopReferrers from '@/components/dashboard/TopReferrers'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect } from 'react'
|
||||
import { initiateSignupFlow } from '@/lib/api/oauth'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
|
||||
export default function SignupPage() {
|
||||
useEffect(() => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { getSite, type Site } from '@/lib/api/sites'
|
||||
import { getStats, getRealtime, getDailyStats, getTopPages, getTopReferrers, getCountries, getCities, getRegions, getBrowsers, getOS, getDevices, getScreenResolutions, getEntryPages, getExitPages, getDashboard, getPerformanceByPage, type Stats, type DailyStat, type PerformanceByPageStat } from '@/lib/api/stats'
|
||||
import { formatNumber, formatDuration, getDateRange } from '@/lib/utils/format'
|
||||
import { toast } from 'sonner'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
import Select from '@/components/ui/Select'
|
||||
import DatePicker from '@/components/ui/DatePicker'
|
||||
import ContentStats from '@/components/dashboard/ContentStats'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useParams, useRouter } from 'next/navigation'
|
||||
import { getSite, type Site } from '@/lib/api/sites'
|
||||
import { getRealtimeVisitors, getSessionDetails, type Visitor, type SessionEvent } from '@/lib/api/realtime'
|
||||
import { toast } from 'sonner'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
|
||||
function formatTimeAgo(dateString: string) {
|
||||
const date = new Date(dateString)
|
||||
|
||||
@@ -4,9 +4,9 @@ import { useEffect, useState } from 'react'
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
import { getSite, updateSite, resetSiteData, deleteSite, type Site, type GeoDataLevel } from '@/lib/api/sites'
|
||||
import { toast } from 'sonner'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
import { LoadingOverlay } from '@ciphera-net/ui'
|
||||
import VerificationModal from '@/components/sites/VerificationModal'
|
||||
import PasswordInput from '@/components/PasswordInput'
|
||||
import { PasswordInput } from '@ciphera-net/ui'
|
||||
import Select from '@/components/ui/Select'
|
||||
import { APP_URL, API_URL } from '@/lib/api/client'
|
||||
import { generatePrivacySnippet } from '@/lib/utils/privacySnippet'
|
||||
|
||||
@@ -4,8 +4,7 @@ import { useState } from 'react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { createSite } from '@/lib/api/sites'
|
||||
import { toast } from 'sonner'
|
||||
import { Button } from '@/components/ui/Button'
|
||||
import { Input } from '@/components/ui/Input'
|
||||
import { Button, Input } from '@ciphera-net/ui'
|
||||
|
||||
export default function NewSitePage() {
|
||||
const router = useRouter()
|
||||
|
||||
Reference in New Issue
Block a user