Skip to content

Commit

Permalink
fix: update app images
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdibha committed Dec 27, 2023
1 parent 2346170 commit 29e0057
Show file tree
Hide file tree
Showing 29 changed files with 96 additions and 99 deletions.
18 changes: 0 additions & 18 deletions apps/app/public/images/companies/laravel.svg

This file was deleted.

1 change: 1 addition & 0 deletions apps/app/public/images/features/next-js.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/public/images/features/nextjs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/public/images/features/seo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/public/images/features/stripe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/public/images/logo-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/app/public/images/logo-square.png
Binary file not shown.
Binary file modified apps/app/public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/app/public/images/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/app/public/images/placeholder.png
Binary file not shown.
Binary file removed apps/app/public/images/producthunt.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/chroma.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/clarity.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/doction.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/folio.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/horizon.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/minimalist.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/nova.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/pulse.png
Binary file not shown.
Binary file removed apps/app/public/images/templates/quantum.png
Binary file not shown.
Binary file modified apps/app/public/images/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 94 additions & 2 deletions apps/app/src/app/(dashboard)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,95 @@
export default async function DashboardLayout() {
return <div>dashboard</div>;
import { notFound, redirect } from "next/navigation";
import { Price, Product, prisma } from "@turbocharger/database";
import { Badge, Button, CheckCircleIcon, ExternalLinkIcon } from "@turbocharger/ui";
import { AppPageLayout } from "@/components/layout/app-page-layout";
import { getSession } from "@/modules/auth/services";
import { UpgradePlanModal } from "@/modules/payment/components/upgrade-plan-modal";

export default async function DashboardPage() {
const plans = await prisma.product.findMany({
where: {
metadata: {
path: ["type"],
equals: "site_plan",
},
active: true,
},
include: {
price: true,
},
});

return (
<AppPageLayout title="Site overview">
<div className="mt-8 grid grid-cols-12 gap-8">
{/* <Overview name={"site.name"} url={""} planName={currentPlan?.name} /> */}
{/* <PlanStatus plans={plans} siteId={params.siteId} currentPlan={null} /> */}
</div>
</AppPageLayout>
);
}

interface SiteOverviewProps {
name: string | null;
url: string;
planName?: string;
}

const Overview = (props: SiteOverviewProps) => {
const { name, url, planName } = props;
return (
<div className="bg-card/50 col-span-12 flex w-full items-start justify-between rounded-xl border p-6 shadow-md">
<div>
<h2 className="text-3xl font-semibold">{name}</h2>
<a
href={url}
target="_blank"
className="text-muted-foreground flex items-center space-x-1 hover:underline"
>
<span>{url}</span>
<ExternalLinkIcon size={20} />
</a>
</div>
<Badge>{planName ?? "Free"} plan</Badge>
</div>
);
};

type Plan = Product & { price: Price[] };
interface PlanStatusProps {
plans: Plan[];
currentPlan: Plan;
siteId: string;
}

const PlanStatus = (props: PlanStatusProps) => {
const { currentPlan, plans, siteId } = props;

return (
<div className="bg-card/50 col-span-6 rounded-xl border p-6 shadow-md">
{
<>
<h2 className="text-xl font-semibold">Upgrade your site</h2>
<p className="text-muted-foreground mt-2">
Get instant access to premium features
</p>
<ul className="mt-4 space-y-1">
{["Custom domains", "Manual publishing", "And much more"].map(
(feature, index) => (
<li key={index} className="flex items-center space-x-1">
<CheckCircleIcon size={16} />
<span>{feature}</span>
</li>
)
)}
</ul>
<UpgradePlanModal plans={plans} currentPlan={currentPlan} siteId={siteId}>
<Button fullWidth color="primary" className="mt-4">
Upgrade now
</Button>
</UpgradePlanModal>
</>
}
</div>
);
};
2 changes: 1 addition & 1 deletion apps/app/src/app/(dashboard)/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function Sidebar() {
<MobileSideBar />
</div>
</header>
<nav className="bg-card fixed top-0 z-30 hidden h-full w-full flex-col border-r shadow-[0_35px_60px_-15px_rgba(0,0,0,0.3)] xl:flex xl:max-h-screen xl:min-h-screen xl:w-52">
<nav className="bg-card fixed top-0 z-30 hidden h-full w-full flex-col border-r shadow-[0_35px_30px_-15px_rgba(0,0,0,0.3)] xl:flex xl:max-h-screen xl:min-h-screen xl:w-52">
<SidebarNav />
</nav>
</>
Expand Down
18 changes: 0 additions & 18 deletions apps/marketing/public/images/companies/laravel.svg

This file was deleted.

17 changes: 0 additions & 17 deletions apps/marketing/public/images/companies/mirage.svg

This file was deleted.

Loading

0 comments on commit 29e0057

Please sign in to comment.