Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kof committed Jan 20, 2025
1 parent 92c93f2 commit b8be21e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 39 deletions.
4 changes: 2 additions & 2 deletions apps/builder/app/builder/features/help/help-center.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import {
} from "@webstudio-is/design-system";
import {
BugIcon,
ContentIcon,
DiscordIcon,
GithubIcon,
LifeBuoyIcon,
PageIcon,
YoutubeIcon,
} from "@webstudio-is/icons";
import { type ComponentProps } from "react";
Expand Down Expand Up @@ -69,7 +69,7 @@ export const HelpCenter = ({
</Button>
<Button
formAction="https://docs.webstudio.is/"
prefix={<PageIcon />}
prefix={<ContentIcon />}
color="ghost"
css={{ justifyContent: "start" }}
>
Expand Down
5 changes: 3 additions & 2 deletions apps/builder/app/dashboard/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from "@webstudio-is/icons";
import { Header } from "./shared/header";
import { CollapsibleSection } from "~/builder/shared/collapsible-section";
import { dashboardPath, templatesPath } from "~/shared/router-utils";

const globalStyles = globalCss({
html: {
Expand Down Expand Up @@ -170,12 +171,12 @@ export const Dashboard = ({
<NavigationItems
items={[
{
to: "/dashboard",
to: dashboardPath(),
prefix: <BodyIcon />,
children: "Projects",
},
{
to: "/dashboard/templates",
to: templatesPath(),
prefix: <ExtensionIcon />,
children: "Starter templates",
},
Expand Down
36 changes: 2 additions & 34 deletions apps/builder/app/dashboard/projects/empty-state.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,11 @@
import {
css,
Dialog,
DialogContent,
DialogTrigger,
Flex,
Text,
theme,
} from "@webstudio-is/design-system";
import { Flex, Text } from "@webstudio-is/design-system";
import { CreateProject } from "./project-dialogs";

const contentStyle = css({
maxWidth: "none",
width: "80vw",
aspectRatio: "16/9",
});

const iframeStyle = css({
width: "100%",
height: "100%",
border: 0,
});

export const EmptyState = () => (
<Flex align="center" justify="center" direction="column" gap="6">
<Text variant="brandMediumTitle" as="h1" align="center">
What will you create?
</Text>
<Dialog>
<DialogTrigger asChild>
<CreateProject buttonText="Create First Project" />
</DialogTrigger>
<DialogContent className={contentStyle()}>
<iframe
className={iframeStyle()}
src="https://www.youtube-nocookie.com/embed/aL2sBSb3ghg?si=siExeIRt-YI_ypuA&autoplay=true"
allowFullScreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
/>
</DialogContent>
</Dialog>
<CreateProject buttonText="Create First Project" />
</Flex>
);
2 changes: 1 addition & 1 deletion apps/builder/app/routes/_ui.dashboard._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export const headers = () => {
export const loader = async ({ request }: LoaderFunctionArgs) => {
const { context, user, userPlanFeatures, origin } =
await loadDashboardData(request);
const projectToClone = await getProjectToClone(request, context);
const projects = await dashboardProjectCaller(context).findMany({
userId: user.id,
});
const projectToClone = await getProjectToClone(request, context);

return {
user,
Expand Down
4 changes: 4 additions & 0 deletions apps/builder/app/shared/router-utils/path-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export const dashboardPath = () => {
return "/dashboard";
};

export const templatesPath = () => {
return "/dashboard/templates";
};

export const dashboardUrl = (props: { origin: string }) => {
const authServerOrigin = getAuthorizationServerOrigin(props.origin);

Expand Down

0 comments on commit b8be21e

Please sign in to comment.