-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
209 additions
and
16 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { tutorialAtom } from "@lume/utils"; | ||
import { useSetAtom } from "jotai"; | ||
|
||
export function TutorialFinishScreen() { | ||
const tutorial = useSetAtom(tutorialAtom); | ||
|
||
return ( | ||
<div className="px-5 h-full flex flex-col justify-between"> | ||
<div className="h-full min-h-0 flex flex-col gap-2"> | ||
<p> | ||
<span className="font-semibold">Great Job!</span> You have completed | ||
this section. Feel free to explore other menus in the interface, such | ||
as Activity and Relay Explorer. | ||
</p> | ||
<p> | ||
If you want to see this tutorial again, don't hesitate to press the ? | ||
icon in Bottom bar | ||
</p> | ||
<p> | ||
If you want to seek help from Lume Devs, you can publish a post with{" "} | ||
<span className="text-blue-500">#lumesos</span> | ||
</p> | ||
</div> | ||
<div className="h-16 w-full shrink-0 flex items-center justify-end"> | ||
<button | ||
type="button" | ||
onClick={() => tutorial(false)} | ||
className="inline-flex items-center justify-center w-20 font-semibold border-t rounded-lg border-neutral-900 dark:border-neutral-800 h-9 bg-neutral-950 text-neutral-50 dark:bg-neutral-900 hover:bg-neutral-900 dark:hover:bg-neutral-800" | ||
> | ||
Finish | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Link } from "react-router-dom"; | ||
|
||
export function TutorialManageColumnScreen() { | ||
return ( | ||
<div className="px-5 h-full flex flex-col justify-between"> | ||
<div className="h-full min-h-0 flex flex-col gap-2"> | ||
<p> | ||
Lume is also provide simple way to customize column after creation. | ||
</p> | ||
<p> | ||
<span className="font-semibold">To customize each column,</span> you | ||
can go to header of each column | ||
</p> | ||
<p>Click to "Three Dots" icon</p> | ||
<img | ||
src="/tutorial-3.gif" | ||
alt="tutorial-3" | ||
className="w-full h-auto rounded-lg" | ||
/> | ||
</div> | ||
<div className="h-16 w-full shrink-0 flex items-center justify-end"> | ||
<Link | ||
to="/finish" | ||
className="inline-flex items-center justify-center w-20 font-semibold border-t rounded-lg border-neutral-900 dark:border-neutral-800 h-9 bg-neutral-950 text-neutral-50 dark:bg-neutral-900 hover:bg-neutral-900 dark:hover:bg-neutral-800" | ||
> | ||
Next | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { CancelIcon, HelpIcon } from "@lume/icons"; | ||
import { tutorialAtom } from "@lume/utils"; | ||
import * as Popover from "@radix-ui/react-popover"; | ||
import { useAtom } from "jotai"; | ||
import { TutorialRouter } from "./router"; | ||
|
||
export function TutorialModal() { | ||
const [tutorial, setTutorial] = useAtom(tutorialAtom); | ||
|
||
return ( | ||
<Popover.Root open={tutorial}> | ||
<Popover.Trigger asChild> | ||
<button | ||
type="button" | ||
onClick={() => setTutorial((state) => !state)} | ||
className="inline-flex items-center justify-center rounded-lg text-white/70 hover:text-white hover:bg-black/50 size-10" | ||
> | ||
<HelpIcon className="size-5" /> | ||
</button> | ||
</Popover.Trigger> | ||
<Popover.Portal> | ||
<Popover.Content className="relative right-4 bottom-8"> | ||
<div className="flex flex-col w-full max-w-xs bg-white h-[480px] rounded-xl dark:bg-neutral-950 dark:border dark:border-neutral-900 overflow-hidden shadow-[0_8px_30px_rgb(0,0,0,0.12)]"> | ||
<div className="pt-5 mb-3 shrink-0 flex px-5 items-center justify-between text-neutral-500 dark:text-neutral-400"> | ||
<h3 className="text-sm font-medium">Tutorial</h3> | ||
<Popover.Close onClick={() => setTutorial(false)}> | ||
<CancelIcon className="size-4" /> | ||
</Popover.Close> | ||
</div> | ||
<div className="min-h-0 flex-1 h-full"> | ||
<TutorialRouter /> | ||
</div> | ||
</div> | ||
</Popover.Content> | ||
</Popover.Portal> | ||
</Popover.Root> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Link } from "react-router-dom"; | ||
|
||
export function TutorialNewColumnScreen() { | ||
return ( | ||
<div className="px-5 h-full flex flex-col justify-between"> | ||
<div className="h-full min-h-0 flex flex-col gap-2"> | ||
<p>Lume is column based, each column is each experience</p> | ||
<p> | ||
<span className="font-semibold">To create new column,</span> you can | ||
look into bottom right part of screen | ||
</p> | ||
<p>Click to "Plus" icon</p> | ||
<img | ||
src="/tutorial-2.gif" | ||
alt="tutorial-2" | ||
className="w-full h-auto rounded-lg" | ||
/> | ||
</div> | ||
<div className="h-16 w-full shrink-0 flex items-center justify-end"> | ||
<Link | ||
to="/manage-column" | ||
className="inline-flex items-center justify-center w-20 font-semibold border-t rounded-lg border-neutral-900 dark:border-neutral-800 h-9 bg-neutral-950 text-neutral-50 dark:bg-neutral-900 hover:bg-neutral-900 dark:hover:bg-neutral-800" | ||
> | ||
Next | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { AnimatePresence } from "framer-motion"; | ||
import { | ||
MemoryRouter, | ||
Route, | ||
Routes, | ||
UNSAFE_LocationContext, | ||
} from "react-router-dom"; | ||
import { TutorialFinishScreen } from "./finish"; | ||
import { TutorialManageColumnScreen } from "./manageColumn"; | ||
import { TutorialNewColumnScreen } from "./newColumn"; | ||
import { TutorialWelcomeScreen } from "./welcome"; | ||
|
||
export function TutorialRouter() { | ||
return ( | ||
<UNSAFE_LocationContext.Provider value={null}> | ||
<MemoryRouter future={{ v7_startTransition: true }}> | ||
<AnimatePresence> | ||
<Routes> | ||
<Route path="/" element={<TutorialWelcomeScreen />} /> | ||
<Route path="/new-column" element={<TutorialNewColumnScreen />} /> | ||
<Route | ||
path="/manage-column" | ||
element={<TutorialManageColumnScreen />} | ||
/> | ||
<Route path="/finish" element={<TutorialFinishScreen />} /> | ||
</Routes> | ||
</AnimatePresence> | ||
</MemoryRouter> | ||
</UNSAFE_LocationContext.Provider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Link } from "react-router-dom"; | ||
|
||
export function TutorialWelcomeScreen() { | ||
return ( | ||
<div className="px-5 h-full flex flex-col justify-between"> | ||
<div className="h-full min-h-0 flex flex-col gap-2"> | ||
<p> | ||
<span className="font-semibold">Welcome to your Home Screen.</span>{" "} | ||
This is your personalized screen, which you can customize to you | ||
liking | ||
</p> | ||
<p>Feel free to make adjustments as needed.</p> | ||
<p>Let's take a few minutes to explore the features together.</p> | ||
<img | ||
src="/tutorial-1.gif" | ||
alt="tutorial-1" | ||
className="w-full h-auto rounded-lg" | ||
/> | ||
</div> | ||
<div className="h-16 w-full shrink-0 flex items-center justify-end"> | ||
<Link | ||
to="/new-column" | ||
className="inline-flex items-center justify-center w-20 font-semibold border-t rounded-lg border-neutral-900 dark:border-neutral-800 h-9 bg-neutral-950 text-neutral-50 dark:bg-neutral-900 hover:bg-neutral-900 dark:hover:bg-neutral-800" | ||
> | ||
Next | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.