Skip to content

Commit a8867a1

Browse files
committed
feat: add !STARTERCONF for demo elements
1 parent d7caaef commit a8867a1

File tree

19 files changed

+39
-28
lines changed

19 files changed

+39
-28
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
VITE_IS_DEMO: false
2222
BETTER_AUTH_SECRET: fyXjLxjXJowjicI2BAjxOaUsQd1QafdegZDciJE/xM8=
2323
EMAIL_SERVER: smtp://username:password@localhost:1025
24-
EMAIL_FROM: Start UI <[email protected]>
24+
EMAIL_FROM: Example <[email protected]>
2525
services:
2626
postgres:
2727
image: postgres

src/env/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const envClient = createEnv({
2525
clientPrefix: 'VITE_',
2626
client: {
2727
VITE_BASE_URL: z.string().url(),
28+
// !STARTERCONF [demoMode] Remove this VITE_IS_DEMO env var
2829
VITE_IS_DEMO: z
2930
.enum(['true', 'false'])
3031
.optional()

src/features/auth/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { envClient } from '@/env/client';
22

3-
export const AUTH_SIGNUP_ENABLED = envClient.VITE_IS_DEMO ? false : true;
3+
export const AUTH_SIGNUP_ENABLED = envClient.VITE_IS_DEMO ? false : true; // !STARTERCONF [demoMode] Remove the envClient.VITE_IS_DEMO condition. You can
44
export const AUTH_EMAIL_OTP_MOCKED = '000000';
55
export const AUTH_EMAIL_OTP_EXPIRATION_IN_MINUTES = 5;

src/features/dashboard/manager/page-dashboard.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { DemoAppSwitch } from '@/features/demo/demo-app-switch';
2-
import { DemoMarketingBento } from '@/features/demo/demo-marketing-bento';
3-
import { DemoWelcome } from '@/features/demo/demo-welcome';
1+
import { DemoAppSwitch } from '@/features/demo/demo-app-switch'; // !STARTERCONF [demoMode] Remove this import
2+
import { DemoMarketingBento } from '@/features/demo/demo-marketing-bento'; // !STARTERCONF [demoMode] Remove this import
3+
import { DemoWelcome } from '@/features/demo/demo-welcome'; // !STARTERCONF [demoMode] Remove this import
44
import {
55
PageLayout,
66
PageLayoutContent,
@@ -16,6 +16,7 @@ export const PageDashboard = () => {
1616
</PageLayoutTopBar>
1717
<PageLayoutContent containerClassName="max-w-4xl">
1818
<div className="flex flex-col gap-4">
19+
{/* !STARTERCONF [demoMode] Update with your content */}
1920
<DemoWelcome />
2021
<DemoAppSwitch />
2122
<DemoMarketingBento />

src/features/demo/demo-app-switch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// !STARTERCONF [demoMode] Remove the demo folder
12
import { Link, useMatchRoute } from '@tanstack/react-router';
23
import { ArrowRightIcon } from 'lucide-react';
34
import { useTranslation } from 'react-i18next';

src/features/demo/demo-marketing-bento.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// !STARTERCONF [demoMode] Remove the demo folder
12
export const DemoMarketingBento = () => {
23
return (
34
<div className="grid grid-cols-2 gap-2 sm:grid-cols-3">

src/features/demo/demo-mode-drawer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// !STARTERCONF [demoMode] Remove the demo folder
12
import { create } from 'zustand';
23

34
import {

src/features/demo/demo-welcome.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// !STARTERCONF [demoMode] Remove the demo folder
12
import { useTranslation } from 'react-i18next';
23

34
import { Button } from '@/components/ui/button';

src/features/devtools/login-hint.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ export const LoginEmailHint = () => {
1010
const form = useFormContext();
1111
const mockedEmail = '[email protected]';
1212

13+
// !STARTERCONF [demoMode] Remove the `&& !envClient.VITE_IS_DEMO` condition
1314
if (import.meta.env.PROD && !envClient.VITE_IS_DEMO) {
1415
return null;
1516
}
1617

1718
return (
1819
<Alert dir="ltr">
1920
<TerminalIcon className="size-4" />
20-
<AlertTitle>
21-
{envClient.VITE_IS_DEMO ? 'Demo mode' : 'Dev mode'}
22-
</AlertTitle>
21+
<AlertTitle>Dev mode</AlertTitle>
2322
<AlertDescription className="flex flex-wrap text-sm leading-4">
2423
You can login with{' '}
2524
<button
@@ -41,16 +40,15 @@ export const LoginEmailHint = () => {
4140
export const LoginEmailOtpHint = () => {
4241
const form = useFormContext();
4342

43+
// !STARTERCONF [demoMode] Remove the `&& !envClient.VITE_IS_DEMO` condition
4444
if (import.meta.env.PROD && !envClient.VITE_IS_DEMO) {
4545
return null;
4646
}
4747

4848
return (
4949
<Alert dir="ltr">
5050
<TerminalIcon className="size-4" />
51-
<AlertTitle>
52-
{envClient.VITE_IS_DEMO ? 'Demo mode' : 'Dev mode'}
53-
</AlertTitle>
51+
<AlertTitle>Dev mode</AlertTitle>
5452
<AlertDescription className="flex text-sm leading-4">
5553
Use the code{' '}
5654
<button

src/features/home/app/page-home.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Logo } from '@/components/brand/logo';
22

3-
import { DemoAppSwitch } from '@/features/demo/demo-app-switch';
4-
import { DemoMarketingBento } from '@/features/demo/demo-marketing-bento';
5-
import { DemoWelcome } from '@/features/demo/demo-welcome';
3+
import { DemoAppSwitch } from '@/features/demo/demo-app-switch'; // !STARTERCONF [demoMode] Remove this import
4+
import { DemoMarketingBento } from '@/features/demo/demo-marketing-bento'; // !STARTERCONF [demoMode] Remove this import
5+
import { DemoWelcome } from '@/features/demo/demo-welcome'; // !STARTERCONF [demoMode] Remove this import
66
import {
77
PageLayout,
88
PageLayoutContent,
@@ -17,6 +17,7 @@ export const PageHome = () => {
1717
</PageLayoutTopBar>
1818
<PageLayoutContent>
1919
<div className="flex flex-1 flex-col gap-4">
20+
{/* !STARTERCONF [demoMode] Update with your content */}
2021
<DemoWelcome />
2122
<DemoAppSwitch />
2223
<DemoMarketingBento />

0 commit comments

Comments
 (0)