Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platforms/eCurrency/client/src/lib/apiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ apiClient.interceptors.response.use(
if (error.response?.status === 401) {
localStorage.removeItem("ecurrency_token");
localStorage.removeItem("ecurrency_user");
window.location.href = "/auth";
window.location.href = "/";
}
return Promise.reject(error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default function OtherCalculationModal({ open, onOpenChange }: OtherCalcu
variant: "destructive",
});
setTimeout(() => {
window.location.href = "/api/login";
window.location.href = "/";
}, 500);
return;
}
Expand Down
311 changes: 155 additions & 156 deletions platforms/eReputation/client/src/components/modals/reference-modal.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export default function SelfCalculationModal({ open, onOpenChange }: SelfCalcula
setIsCalculating(false);
setCurrentStep(0);
setProgress(0);

if (isUnauthorizedError(error)) {
toast({
title: "Unauthorized",
description: "You are logged out. Logging in again...",
variant: "destructive",
});
setTimeout(() => {
window.location.href = "/api/login";
window.location.href = "/";
}, 500);
return;
}
Expand Down Expand Up @@ -105,7 +105,7 @@ export default function SelfCalculationModal({ open, onOpenChange }: SelfCalcula
setReputationResult(calculateMutation.data);
setIsCalculating(false);
setShowViewModal(true);

// Update dashboard queries
queryClient.invalidateQueries({ queryKey: ["/api/dashboard/stats"] });
queryClient.invalidateQueries({ queryKey: ["/api/dashboard/activities"] });
Expand Down Expand Up @@ -139,7 +139,7 @@ export default function SelfCalculationModal({ open, onOpenChange }: SelfCalcula
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
</div>

<div>
<h3 className="text-xl font-black text-fig mb-2">Ready to Calculate</h3>
<p className="text-fig/70 text-sm leading-relaxed max-w-md mx-auto">
Expand All @@ -162,7 +162,7 @@ export default function SelfCalculationModal({ open, onOpenChange }: SelfCalcula
<div className="text-center">
<h3 className="text-xl font-black text-fig mb-2">Calculating Your eReputation</h3>
<p className="text-fig/70 text-sm">
{currentStep < ANALYSIS_STEPS.length
{currentStep < ANALYSIS_STEPS.length
? ANALYSIS_STEPS[currentStep].label
: "Calculation complete!"
}
Expand Down Expand Up @@ -211,18 +211,18 @@ export default function SelfCalculationModal({ open, onOpenChange }: SelfCalcula
</div>
)}
</div>

<div className="border-t-2 border-fig/20 p-4 sm:p-6 bg-fig-10 -m-6 mt-0 rounded-b-xl flex-shrink-0">
<div className="flex flex-col sm:flex-row gap-3">
<Button
variant="outline"
<Button
variant="outline"
onClick={handleCloseModal}
disabled={isCalculating}
className="order-2 sm:order-1 flex-1 border-2 border-fig/30 text-fig/70 hover:bg-fig-10 hover:border-fig/40 font-bold h-11 sm:h-12 opacity-80"
>
Cancel
</Button>
<Button
<Button
onClick={handleStartCalculation}
disabled={isCalculating}
className="order-1 sm:order-2 flex-1 bg-fig hover:bg-fig/90 text-white font-bold h-11 sm:h-12 shadow-lg hover:shadow-xl transition-all duration-300"
Expand All @@ -239,7 +239,7 @@ export default function SelfCalculationModal({ open, onOpenChange }: SelfCalcula
</div>
</div>
</DialogContent>

{/* View Reputation Modal */}
<ViewReputationModal
open={showViewModal}
Expand Down
2 changes: 1 addition & 1 deletion platforms/eReputation/client/src/lib/apiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ apiClient.interceptors.response.use(
if (error.response?.status === 401) {
localStorage.removeItem("ereputation_token");
localStorage.removeItem("ereputation_user_id");
window.location.href = "/auth";
window.location.href = "/";
}
return Promise.reject(error);
}
Expand Down
2 changes: 1 addition & 1 deletion platforms/eReputation/client/src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function Dashboard() {

const handleLogout = () => {
clearAuth();
window.location.href = "/auth";
window.location.href = "/";
};

const handleViewActivity = (activity: any) => {
Expand Down
14 changes: 7 additions & 7 deletions platforms/eReputation/client/src/pages/landing.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function Landing() {
const handleLogin = () => {
window.location.href = "/api/login";
window.location.href = "/";
};

return (
Expand All @@ -11,7 +11,7 @@ export default function Landing() {
<div className="absolute top-40 right-20 w-24 h-24 bg-apple-red rounded-full mix-blend-multiply filter blur-xl animate-pulse delay-700"></div>
<div className="absolute bottom-20 left-1/3 w-28 h-28 bg-basil rounded-full mix-blend-multiply filter blur-xl animate-pulse delay-300"></div>
</div>

<div className="bg-fig-10 rounded-3xl shadow-2xl p-8 sm:p-12 w-full max-w-md mx-4 border border-fig/20">
<div className="text-center mb-8">
{/* Enhanced Logo */}
Expand All @@ -22,14 +22,14 @@ export default function Landing() {
</svg>
</div>
</div>

<div className="space-y-2 mb-6">
<h1 className="text-4xl font-black text-fig tracking-tight">eReputation</h1>
<p className="text-gray-800 text-sm leading-relaxed max-w-sm mx-auto font-medium">
Calculate and manage your eReputation throughout the W3DS
</p>
</div>

{/* Feature Icons */}
<div className="flex justify-center gap-8 mb-8">
<div className="flex flex-col items-center gap-1">
Expand Down Expand Up @@ -58,9 +58,9 @@ export default function Landing() {
</div>
</div>
</div>

<div className="space-y-6">
<button
<button
onClick={handleLogin}
className="group w-full bg-fig hover:bg-fig/90 text-white py-4 px-6 rounded-2xl font-bold text-lg transition-all duration-300 flex items-center justify-center gap-3 shadow-lg hover:shadow-xl transform hover:-translate-y-1"
>
Expand All @@ -71,7 +71,7 @@ export default function Landing() {
</div>
<span>Sign in to Continue</span>
</button>

<div className="text-center">
<div className="flex items-center justify-center text-xs text-gray-400">
<span className="flex items-center gap-1">
Expand Down
Loading