refactor: restructure app tip components and enhance onboarding experience
- Removed the AppTip component and its controller, consolidating functionality into AppTipModalContent. - Updated MainDesktopLayout to utilize the new modal for onboarding tips. - Enhanced the modal presentation with animation and improved layout for better user experience. - Cleaned up unused imports and streamlined the app tip logic for clarity and maintainability. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -12,11 +12,10 @@ import { useUISettingKey } from "~/atoms/settings/ui"
|
||||
import { useLoginModalShow } from "~/atoms/user"
|
||||
import { AppErrorBoundary } from "~/components/common/AppErrorBoundary"
|
||||
import { ErrorComponentType } from "~/components/errors/enum"
|
||||
import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
|
||||
import { PlainModal, PlainWithAnimationModal } from "~/components/ui/modal/stacked/custom-modal"
|
||||
import { DeclarativeModal } from "~/components/ui/modal/stacked/declarative-modal"
|
||||
import { ROOT_CONTAINER_ID } from "~/constants/dom"
|
||||
import { EnvironmentIndicator } from "~/modules/app/EnvironmentIndicator"
|
||||
import { APP_TIP_DEBUG_EVENT } from "~/modules/app-tip"
|
||||
import { LoginModalContent } from "~/modules/auth/LoginModalContent"
|
||||
import { DebugRegistry } from "~/modules/debug/registry"
|
||||
import { EntriesProvider } from "~/modules/entry-column/context/EntriesContext"
|
||||
@@ -143,6 +142,31 @@ export function MainDestopLayout() {
|
||||
|
||||
const containerRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
// const { shouldShowNewUserGuide } = useNewUserGuideState()
|
||||
// // Auto-trigger new user guide modal
|
||||
// useEffect(() => {
|
||||
// if (!shouldShowNewUserGuide) return
|
||||
|
||||
// import("~/modules/app-tip/AppTipModalContent").then((m) => {
|
||||
// window.presentModal({
|
||||
// title: getI18n().t("new_user_dialog.title"),
|
||||
// content: ({ dismiss }) => (
|
||||
// <m.AppTipModalContent
|
||||
// onClose={() => {
|
||||
// dismiss()
|
||||
// }}
|
||||
// />
|
||||
// ),
|
||||
// CustomModalComponent: PlainWithAnimationModal,
|
||||
// modalContainerClassName: "flex items-center justify-center",
|
||||
// modalClassName: "w-full max-w-5xl",
|
||||
// canClose: false,
|
||||
// clickOutsideToDismiss: false,
|
||||
// overlay: false,
|
||||
// })
|
||||
// })
|
||||
// }, [shouldShowNewUserGuide])
|
||||
|
||||
return (
|
||||
<RootContainer ref={containerRef}>
|
||||
{!PROD && <EnvironmentIndicator />}
|
||||
@@ -232,11 +256,18 @@ const RootContainer = ({
|
||||
}
|
||||
|
||||
DebugRegistry.add("App Tip Dialog", () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent(APP_TIP_DEBUG_EVENT, {
|
||||
detail: { step: 0 },
|
||||
}),
|
||||
)
|
||||
import("~/modules/app-tip/AppTipModalContent").then((m) => {
|
||||
window.presentModal({
|
||||
title: "App Tip",
|
||||
content: () => <m.AppTipModalContent />,
|
||||
CustomModalComponent: PlainWithAnimationModal,
|
||||
modalContainerClassName: "flex items-center justify-center",
|
||||
modalClassName: "w-full max-w-5xl",
|
||||
canClose: true,
|
||||
clickOutsideToDismiss: false,
|
||||
overlay: false,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
DebugRegistry.add("AI Onboarding", () => {
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import { lazy, Suspense } from "react"
|
||||
|
||||
import { AppTipDialog } from "./AppTipDialog"
|
||||
import { useAppTipController } from "./useAppTipController"
|
||||
|
||||
const LazyAppTipModal = lazy(() =>
|
||||
import("~/modules/ai-onboarding/modal").then((m) => ({ default: m.AiOnboardingModal })),
|
||||
)
|
||||
|
||||
export function AppTip() {
|
||||
const {
|
||||
shouldShowDialog,
|
||||
showAiGuide,
|
||||
activeStepData,
|
||||
steps,
|
||||
activeStepIndex,
|
||||
handleDismiss,
|
||||
setActiveStep,
|
||||
} = useAppTipController()
|
||||
|
||||
if (!activeStepData) return null
|
||||
|
||||
return (
|
||||
<>
|
||||
<AppTipDialog
|
||||
open={shouldShowDialog}
|
||||
steps={steps}
|
||||
activeStep={activeStepData}
|
||||
activeStepIndex={activeStepIndex}
|
||||
onSelectStep={(idx) => setActiveStep(idx)}
|
||||
onDismiss={handleDismiss}
|
||||
hasNextStep={activeStepIndex < steps.length - 1}
|
||||
/>
|
||||
|
||||
{showAiGuide && (
|
||||
<Suspense fallback={null}>
|
||||
<LazyAppTipModal />
|
||||
</Suspense>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
import { Button } from "@follow/components/ui/button/index.js"
|
||||
import { Label } from "@follow/components/ui/label/index.jsx"
|
||||
import { Switch } from "@follow/components/ui/switch/index.jsx"
|
||||
import { cn } from "@follow/utils/utils"
|
||||
import { useCallback, useMemo, useState } from "react"
|
||||
import { jsx } from "react/jsx-runtime"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { useNavigate } from "react-router"
|
||||
|
||||
import { setAISetting, useAISettingKey } from "~/atoms/settings/ai"
|
||||
import { GlassButton } from "~/components/ui/button/GlassButton"
|
||||
import { useCurrentModal } from "~/components/ui/modal/stacked/hooks"
|
||||
|
||||
import { OpmlAbstractGraphic } from "../discover/OpmlAbstractGraphic"
|
||||
import { AICopilotMedia } from "./AICopilotMedia"
|
||||
import { AppTipMediaPreview } from "./AppTipMediaPreview"
|
||||
import { OverviewMedia } from "./OverviewMedia"
|
||||
import type { AppTipStep } from "./types"
|
||||
import { useNewUserGuideState } from "./useNewUserGuideState"
|
||||
|
||||
type AppTipModalContentProps = {
|
||||
initialStep?: number
|
||||
}
|
||||
|
||||
export function AppTipModalContent({ initialStep = 0 }: AppTipModalContentProps) {
|
||||
const { dismiss } = useCurrentModal()
|
||||
const navigate = useNavigate()
|
||||
const { t } = useTranslation()
|
||||
const { persistDismissState } = useNewUserGuideState()
|
||||
|
||||
const [activeStep, setActiveStep] = useState(initialStep)
|
||||
|
||||
const completeOnboarding = useCallback(() => {
|
||||
dismiss()
|
||||
persistDismissState(true)
|
||||
}, [dismiss, persistDismissState])
|
||||
|
||||
const handleNavigateAndClose = useCallback(
|
||||
(path: string) => {
|
||||
completeOnboarding()
|
||||
navigate(path)
|
||||
},
|
||||
[completeOnboarding, navigate],
|
||||
)
|
||||
|
||||
const handleLaunchAiGuide = useCallback(() => {
|
||||
completeOnboarding()
|
||||
// Import and show AI onboarding modal
|
||||
Promise.all([
|
||||
import("~/modules/ai-onboarding/ai-onboarding-modal-content"),
|
||||
import("~/components/ui/modal/stacked/custom-modal"),
|
||||
]).then(([m, { PlainModal }]) => {
|
||||
window.presentModal({
|
||||
title: "AI Onboarding",
|
||||
content: ({ dismiss }) => (
|
||||
<m.AiOnboardingModalContent
|
||||
onClose={() => {
|
||||
dismiss()
|
||||
}}
|
||||
/>
|
||||
),
|
||||
CustomModalComponent: PlainModal,
|
||||
modalContainerClassName: "flex items-center justify-center",
|
||||
canClose: false,
|
||||
clickOutsideToDismiss: false,
|
||||
overlay: true,
|
||||
})
|
||||
})
|
||||
}, [completeOnboarding])
|
||||
|
||||
const steps = useMemo<AppTipStep[]>(() => {
|
||||
return [
|
||||
{
|
||||
id: "overview",
|
||||
title: t("new_user_dialog.overview.title"),
|
||||
description: t("new_user_dialog.overview.description"),
|
||||
highlights: [
|
||||
t("new_user_dialog.overview.highlight_1"),
|
||||
t("new_user_dialog.overview.highlight_2"),
|
||||
t("new_user_dialog.overview.highlight_3"),
|
||||
],
|
||||
media: {
|
||||
reactNode: jsx(OverviewMedia, {}),
|
||||
},
|
||||
primaryActionLabel: t("new_user_dialog.overview.primary"),
|
||||
onPrimaryAction: () => handleNavigateAndClose("/discover?type=search"),
|
||||
},
|
||||
{
|
||||
id: "ai",
|
||||
title: t("new_user_dialog.ai.title"),
|
||||
description: t("new_user_dialog.ai.description"),
|
||||
highlights: [
|
||||
t("new_user_dialog.ai.highlight_1"),
|
||||
t("new_user_dialog.ai.highlight_2"),
|
||||
t("new_user_dialog.ai.highlight_3"),
|
||||
],
|
||||
media: {
|
||||
reactNode: jsx(AICopilotMedia, {}),
|
||||
},
|
||||
primaryActionLabel: t("new_user_dialog.ai.primary"),
|
||||
onPrimaryAction: handleLaunchAiGuide,
|
||||
extra: jsx(AiSplineIndicatorToggle, {}),
|
||||
},
|
||||
{
|
||||
id: "import",
|
||||
title: t("new_user_dialog.import.title"),
|
||||
description: t("new_user_dialog.import.description"),
|
||||
highlights: [
|
||||
t("new_user_dialog.import.highlight_1"),
|
||||
t("new_user_dialog.import.highlight_2"),
|
||||
t("new_user_dialog.import.highlight_3"),
|
||||
],
|
||||
media: {
|
||||
reactNode: jsx(OpmlAbstractGraphic, {}),
|
||||
},
|
||||
primaryActionLabel: t("new_user_dialog.import.primary"),
|
||||
onPrimaryAction: () => handleNavigateAndClose("/discover?type=import"),
|
||||
},
|
||||
]
|
||||
}, [handleLaunchAiGuide, handleNavigateAndClose, t])
|
||||
|
||||
const activeStepData = steps[activeStep] ?? steps[0] ?? null
|
||||
const hasNextStep = activeStep < steps.length - 1
|
||||
|
||||
if (!activeStepData) return null
|
||||
|
||||
const handleNextStep = () => {
|
||||
if (hasNextStep) {
|
||||
setActiveStep(activeStep + 1)
|
||||
} else {
|
||||
completeOnboarding()
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="shadow-modal relative grid min-h-[500px] overflow-hidden rounded-lg border border-border bg-background text-text lg:grid-cols-[1.2fr,1fr]">
|
||||
<div className="relative flex aspect-square items-center justify-center overflow-hidden bg-background">
|
||||
{activeStepData.media?.reactNode ? (
|
||||
<div className="absolute inset-0 aspect-square w-full overflow-hidden bg-material-medium">
|
||||
{activeStepData.media?.reactNode}
|
||||
</div>
|
||||
) : (
|
||||
<AppTipMediaPreview media={activeStepData.media} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="relative flex w-[500px] flex-col border-t border-border bg-background lg:border-l lg:border-t-0">
|
||||
<GlassButton
|
||||
onClick={completeOnboarding}
|
||||
variant="flat"
|
||||
className="absolute right-4 top-4 z-10"
|
||||
aria-label={t("new_user_dialog.actions.close")}
|
||||
>
|
||||
<i className="i-mgc-close-cute-re" />
|
||||
</GlassButton>
|
||||
<div className="flex flex-1 flex-col gap-6 p-8">
|
||||
<div className="flex flex-col gap-3">
|
||||
<h2 className="text-2xl font-semibold leading-tight text-text">
|
||||
{activeStepData.title}
|
||||
</h2>
|
||||
<p className="text-sm leading-relaxed text-text-secondary">
|
||||
{activeStepData.description}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ul className="space-y-2.5 text-sm text-text-secondary">
|
||||
{activeStepData.highlights.map((point, idx) => (
|
||||
<li key={`${activeStepData.id}-${idx}`} className="flex items-start gap-2.5">
|
||||
<span className="mt-2 flex size-1.5 rounded-full bg-text-tertiary" />
|
||||
<span className="leading-relaxed">{point}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
{activeStepData.extra}
|
||||
</div>
|
||||
|
||||
<div className="border-t border-border p-4">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="flex items-center gap-2">
|
||||
{steps.map((step, idx) => (
|
||||
<button
|
||||
type="button"
|
||||
key={step.id}
|
||||
onClick={() => setActiveStep(idx)}
|
||||
aria-label={step.title}
|
||||
aria-current={idx === activeStep}
|
||||
className={cn(
|
||||
"size-2 cursor-pointer rounded-full transition-colors",
|
||||
idx === activeStep ? "bg-text" : "bg-fill-tertiary hover:bg-fill-secondary",
|
||||
)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
size="sm"
|
||||
variant={"outline"}
|
||||
buttonClassName="h-8"
|
||||
onClick={activeStepData.onPrimaryAction}
|
||||
>
|
||||
{activeStepData.primaryActionLabel}
|
||||
</Button>
|
||||
|
||||
<Button size="sm" buttonClassName="h-8" onClick={handleNextStep}>
|
||||
{hasNextStep
|
||||
? t("words.next", { ns: "common" })
|
||||
: t("new_user_dialog.actions.finish")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
const AiSplineIndicatorToggle = () => {
|
||||
const { t } = useTranslation("ai")
|
||||
const showSplineButton = useAISettingKey("showSplineButton")
|
||||
|
||||
return (
|
||||
<div className="border-t pt-4">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-sm font-medium text-text">
|
||||
{t("settings.showSplineButton.label")}
|
||||
</Label>
|
||||
<p className="text-xs leading-relaxed text-text-secondary">
|
||||
{t("settings.showSplineButton.description")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Switch
|
||||
checked={showSplineButton}
|
||||
onCheckedChange={(v) => setAISetting("showSplineButton", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
export { AppTip } from "./AppTip"
|
||||
export { AppTipModalContent } from "./AppTipModalContent"
|
||||
export { APP_TIP_DEBUG_EVENT } from "./constants"
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
import { Label } from "@follow/components/ui/label/index.jsx"
|
||||
import { Switch } from "@follow/components/ui/switch/index.jsx"
|
||||
import { useCallback, useEffect, useMemo, useState } from "react"
|
||||
import { jsx } from "react/jsx-runtime"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { useNavigate } from "react-router"
|
||||
|
||||
import { setAISetting, useAISettingKey } from "~/atoms/settings/ai"
|
||||
|
||||
import { OpmlAbstractGraphic } from "../discover/OpmlAbstractGraphic"
|
||||
import { AICopilotMedia } from "./AICopilotMedia"
|
||||
import { APP_TIP_DEBUG_EVENT } from "./constants"
|
||||
import { OverviewMedia } from "./OverviewMedia"
|
||||
import type { AppTipDebugOpenEventDetail, AppTipStep } from "./types"
|
||||
import { useNewUserGuideState } from "./useNewUserGuideState"
|
||||
|
||||
export function useAppTipController() {
|
||||
const {
|
||||
eligibleForGuide,
|
||||
hasDismissed,
|
||||
setHasDismissed,
|
||||
persistDismissState,
|
||||
shouldShowNewUserGuide,
|
||||
} = useNewUserGuideState()
|
||||
const navigate = useNavigate()
|
||||
const { t } = useTranslation()
|
||||
|
||||
const [activeStep, setActiveStep] = useState(0)
|
||||
const [showAiGuide, setShowAiGuide] = useState(false)
|
||||
const [forceOpen, setForceOpen] = useState(false)
|
||||
|
||||
const shouldShowDialog = shouldShowNewUserGuide || forceOpen
|
||||
|
||||
useEffect(() => {
|
||||
if (eligibleForGuide && !hasDismissed) {
|
||||
setActiveStep(0)
|
||||
}
|
||||
}, [eligibleForGuide, hasDismissed])
|
||||
|
||||
const completeOnboarding = useCallback(
|
||||
(options?: { skipPersistence?: boolean }) => {
|
||||
if (!options?.skipPersistence) {
|
||||
setHasDismissed(true)
|
||||
persistDismissState(true)
|
||||
}
|
||||
setForceOpen(false)
|
||||
},
|
||||
[persistDismissState, setHasDismissed],
|
||||
)
|
||||
|
||||
const handleDismiss = useCallback(() => {
|
||||
if (forceOpen) {
|
||||
setForceOpen(false)
|
||||
setShowAiGuide(false)
|
||||
return
|
||||
}
|
||||
completeOnboarding()
|
||||
}, [completeOnboarding, forceOpen, setShowAiGuide])
|
||||
|
||||
const handleNavigateAndClose = useCallback(
|
||||
(path: string) => {
|
||||
if (forceOpen) {
|
||||
setForceOpen(false)
|
||||
} else {
|
||||
completeOnboarding()
|
||||
}
|
||||
navigate(path)
|
||||
},
|
||||
[completeOnboarding, forceOpen, navigate],
|
||||
)
|
||||
|
||||
const handleLaunchAiGuide = useCallback(() => {
|
||||
if (forceOpen) {
|
||||
setForceOpen(false)
|
||||
} else {
|
||||
completeOnboarding()
|
||||
}
|
||||
setShowAiGuide(true)
|
||||
}, [completeOnboarding, forceOpen, setShowAiGuide])
|
||||
|
||||
const steps = useMemo<AppTipStep[]>(() => {
|
||||
return [
|
||||
{
|
||||
id: "overview",
|
||||
title: t("new_user_dialog.overview.title"),
|
||||
description: t("new_user_dialog.overview.description"),
|
||||
highlights: [
|
||||
t("new_user_dialog.overview.highlight_1"),
|
||||
t("new_user_dialog.overview.highlight_2"),
|
||||
t("new_user_dialog.overview.highlight_3"),
|
||||
],
|
||||
media: {
|
||||
reactNode: jsx(OverviewMedia, {}),
|
||||
},
|
||||
primaryActionLabel: t("new_user_dialog.overview.primary"),
|
||||
onPrimaryAction: () => handleNavigateAndClose("/discover?type=search"),
|
||||
},
|
||||
{
|
||||
id: "ai",
|
||||
title: t("new_user_dialog.ai.title"),
|
||||
description: t("new_user_dialog.ai.description"),
|
||||
highlights: [
|
||||
t("new_user_dialog.ai.highlight_1"),
|
||||
t("new_user_dialog.ai.highlight_2"),
|
||||
t("new_user_dialog.ai.highlight_3"),
|
||||
],
|
||||
|
||||
media: {
|
||||
reactNode: jsx(AICopilotMedia, {}),
|
||||
},
|
||||
|
||||
primaryActionLabel: t("new_user_dialog.ai.primary"),
|
||||
onPrimaryAction: handleLaunchAiGuide,
|
||||
extra: jsx(AiSplineIndicatorToggle, {}),
|
||||
},
|
||||
{
|
||||
id: "import",
|
||||
title: t("new_user_dialog.import.title"),
|
||||
description: t("new_user_dialog.import.description"),
|
||||
highlights: [
|
||||
t("new_user_dialog.import.highlight_1"),
|
||||
t("new_user_dialog.import.highlight_2"),
|
||||
t("new_user_dialog.import.highlight_3"),
|
||||
],
|
||||
media: {
|
||||
reactNode: jsx(OpmlAbstractGraphic, {}),
|
||||
},
|
||||
|
||||
primaryActionLabel: t("new_user_dialog.import.primary"),
|
||||
onPrimaryAction: () => handleNavigateAndClose("/discover?type=import"),
|
||||
},
|
||||
]
|
||||
}, [handleLaunchAiGuide, handleNavigateAndClose, t])
|
||||
|
||||
useEffect(() => {
|
||||
const listener: EventListener = (event) => {
|
||||
const { detail } = event as CustomEvent<AppTipDebugOpenEventDetail>
|
||||
setForceOpen(true)
|
||||
setHasDismissed(false)
|
||||
setShowAiGuide(Boolean(detail?.openAiGuide))
|
||||
if (steps.length > 0 && typeof detail?.step === "number") {
|
||||
const boundedIndex = Math.min(Math.max(detail.step, 0), steps.length - 1)
|
||||
setActiveStep(boundedIndex)
|
||||
} else {
|
||||
setActiveStep(0)
|
||||
}
|
||||
}
|
||||
window.addEventListener(APP_TIP_DEBUG_EVENT, listener)
|
||||
return () => {
|
||||
window.removeEventListener(APP_TIP_DEBUG_EVENT, listener)
|
||||
}
|
||||
}, [setHasDismissed, steps.length])
|
||||
|
||||
const activeStepData = steps[activeStep] ?? steps[0] ?? null
|
||||
|
||||
return {
|
||||
shouldShowDialog,
|
||||
showAiGuide,
|
||||
steps,
|
||||
activeStepData,
|
||||
activeStepIndex: activeStep,
|
||||
handleDismiss,
|
||||
setActiveStep,
|
||||
}
|
||||
}
|
||||
|
||||
const AiSplineIndicatorToggle = () => {
|
||||
const { t } = useTranslation("ai")
|
||||
const showSplineButton = useAISettingKey("showSplineButton")
|
||||
|
||||
return (
|
||||
<div className="border-t pt-4">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-sm font-medium text-text">
|
||||
{t("settings.showSplineButton.label")}
|
||||
</Label>
|
||||
<p className="text-xs leading-relaxed text-text-secondary">
|
||||
{t("settings.showSplineButton.description")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Switch
|
||||
checked={showSplineButton}
|
||||
onCheckedChange={(v) => setAISetting("showSplineButton", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -11,11 +11,12 @@ import { useEffect, useRef, useState } from "react"
|
||||
import { Trans, useTranslation } from "react-i18next"
|
||||
import { toast } from "sonner"
|
||||
|
||||
import { PlainWithAnimationModal } from "~/components/ui/modal/stacked/custom-modal"
|
||||
import { useModalStack } from "~/components/ui/modal/stacked/hooks"
|
||||
import { ipcServices } from "~/lib/client"
|
||||
import { getNewIssueUrl } from "~/lib/issues"
|
||||
import { EnvironmentDebugModalContent } from "~/modules/app/EnvironmentIndicator"
|
||||
import { APP_TIP_DEBUG_EVENT } from "~/modules/app-tip"
|
||||
import { AppTipModalContent } from "~/modules/app-tip"
|
||||
|
||||
export const SettingAbout = () => {
|
||||
const { t } = useTranslation("settings")
|
||||
@@ -103,11 +104,16 @@ export const SettingAbout = () => {
|
||||
}
|
||||
|
||||
const handleOpenAiOnboarding = () => {
|
||||
window.dispatchEvent(
|
||||
new CustomEvent(APP_TIP_DEBUG_EVENT, {
|
||||
detail: { step: 0 },
|
||||
}),
|
||||
)
|
||||
present({
|
||||
title: "App Tip",
|
||||
content: () => <AppTipModalContent />,
|
||||
CustomModalComponent: PlainWithAnimationModal,
|
||||
modalContainerClassName: "flex items-center justify-center",
|
||||
modalClassName: "w-full max-w-5xl",
|
||||
canClose: true,
|
||||
clickOutsideToDismiss: false,
|
||||
overlay: false,
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user