mirror of
https://github.com/unslothai/unsloth
synced 2026-04-21 13:37:39 +00:00
Fix onboarding followups (#5064)
* Fix onboarding followups * Rename sidebar studio to train
This commit is contained in:
parent
7ef65bd2e5
commit
bc9ddb3af6
3 changed files with 24 additions and 20 deletions
|
|
@ -330,7 +330,7 @@ export function AppSidebar() {
|
|||
<SidebarMenu>
|
||||
<NavItem
|
||||
icon={ZapIcon}
|
||||
label="Studio"
|
||||
label="Train"
|
||||
active={pathname === "/studio" || pathname.startsWith("/studio/")}
|
||||
disabled={chatOnly}
|
||||
onClick={() => {
|
||||
|
|
@ -511,7 +511,7 @@ export function AppSidebar() {
|
|||
/>
|
||||
<div className="flex flex-col gap-0.5 leading-none group-data-[collapsible=icon]:hidden">
|
||||
<span className="truncate text-sm font-semibold">Unsloth</span>
|
||||
<span className="truncate text-[11px] text-muted-foreground">Studio</span>
|
||||
<span className="truncate text-[11px] text-muted-foreground">Train</span>
|
||||
</div>
|
||||
<ChevronsUpDown strokeWidth={1.25} className="ml-auto size-4 text-muted-foreground group-data-[collapsible=icon]:hidden" />
|
||||
</SidebarMenuButton>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export function WizardFooter({
|
|||
if (currentStep === 1 && sessionStorage.getItem("unsloth_chat_only") === "1") {
|
||||
sessionStorage.removeItem("unsloth_chat_only");
|
||||
markOnboardingDone();
|
||||
window.location.assign(returnTo);
|
||||
window.location.assign("/chat");
|
||||
} else {
|
||||
nextStep();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import {
|
|||
} from "@/components/ui/dialog";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { usePlatformStore } from "@/config/env";
|
||||
import { resetOnboardingDone } from "@/features/auth";
|
||||
import { useChatRuntimeStore } from "@/features/chat/stores/chat-runtime-store";
|
||||
import { useSettingsDialogStore } from "@/features/settings";
|
||||
|
|
@ -95,6 +96,7 @@ export function GeneralTab() {
|
|||
const setHfToken = useChatRuntimeStore((s) => s.setHfToken);
|
||||
const autoTitle = useChatRuntimeStore((s) => s.autoTitle);
|
||||
const setAutoTitle = useChatRuntimeStore((s) => s.setAutoTitle);
|
||||
const chatOnly = usePlatformStore((s) => s.chatOnly);
|
||||
const redirectTo = `${pathname}${search}`;
|
||||
|
||||
const [draftToken, setDraftToken] = useState(hfToken ?? "");
|
||||
|
|
@ -170,24 +172,26 @@ export function GeneralTab() {
|
|||
</SettingsRow>
|
||||
</SettingsSection>
|
||||
|
||||
<SettingsSection title="Getting started">
|
||||
<SettingsRow
|
||||
label="Start onboarding"
|
||||
description="Open the setup wizard again without changing your account."
|
||||
>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
resetOnboardingDone();
|
||||
closeDialog();
|
||||
navigate({ to: "/onboarding", search: { redirectTo } });
|
||||
}}
|
||||
{!chatOnly && (
|
||||
<SettingsSection title="Getting started">
|
||||
<SettingsRow
|
||||
label="Start onboarding"
|
||||
description="Open the setup wizard again without changing your account."
|
||||
>
|
||||
Start onboarding
|
||||
</Button>
|
||||
</SettingsRow>
|
||||
</SettingsSection>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
resetOnboardingDone();
|
||||
closeDialog();
|
||||
navigate({ to: "/onboarding", search: { redirectTo } });
|
||||
}}
|
||||
>
|
||||
Start onboarding
|
||||
</Button>
|
||||
</SettingsRow>
|
||||
</SettingsSection>
|
||||
)}
|
||||
|
||||
<SettingsSection title="Danger zone">
|
||||
<SettingsRow
|
||||
|
|
|
|||
Loading…
Reference in a new issue