44import Logo from "@/app/asset/logo.svg" ;
55import { Button } from "@/app/element/button" ;
66import { FlexiModal } from "@/app/modals/modal" ;
7- import { disableGlobalKeybindings , enableGlobalKeybindings , globalRefocus } from "@/app/store/keymodel" ;
8- import { WorkspaceLayoutModel } from "@/app/workspace/workspace-layout-model" ;
9- import * as services from "@/store/services" ;
10- import { OverlayScrollbarsComponent } from "overlayscrollbars-react" ;
11- import { useEffect , useRef , useState } from "react" ;
12- import { debounce } from "throttle-debounce" ;
13-
147import { OnboardingFeatures } from "@/app/onboarding/onboarding-features" ;
15- import { atoms , globalStore } from "@/app/store/global" ;
8+ import { ClientModel } from "@/app/store/client-model" ;
9+ import { atoms } from "@/app/store/global" ;
10+ import { disableGlobalKeybindings , enableGlobalKeybindings , globalRefocus } from "@/app/store/keymodel" ;
1611import { modalsModel } from "@/app/store/modalmodel" ;
1712import * as WOS from "@/app/store/wos" ;
1813import { RpcApi } from "@/app/store/wshclientapi" ;
1914import { TabRpcClient } from "@/app/store/wshrpcutil" ;
15+ import { WorkspaceLayoutModel } from "@/app/workspace/workspace-layout-model" ;
16+ import * as services from "@/store/services" ;
2017import { fireAndForget } from "@/util/util" ;
2118import { atom , PrimitiveAtom , useAtom , useAtomValue , useSetAtom } from "jotai" ;
19+ import { OverlayScrollbarsComponent } from "overlayscrollbars-react" ;
20+ import { useEffect , useRef , useState } from "react" ;
21+ import { debounce } from "throttle-debounce" ;
2222
2323// Page flow:
2424// init -> (telemetry enabled) -> features
@@ -30,7 +30,7 @@ const pageNameAtom: PrimitiveAtom<PageName> = atom<PageName>("init");
3030
3131const InitPage = ( { isCompact } : { isCompact : boolean } ) => {
3232 const settings = useAtomValue ( atoms . settingsAtom ) ;
33- const clientData = useAtomValue ( atoms . client ) ;
33+ const clientData = useAtomValue ( ClientModel . getInstance ( ) . clientAtom ) ;
3434 const [ telemetryEnabled , setTelemetryEnabled ] = useState < boolean > ( ! ! settings [ "telemetry:enabled" ] ) ;
3535 const setPageName = useSetAtom ( pageNameAtom ) ;
3636
@@ -157,7 +157,7 @@ const NoTelemetryStarPage = ({ isCompact }: { isCompact: boolean }) => {
157157 const setPageName = useSetAtom ( pageNameAtom ) ;
158158
159159 const handleStarClick = async ( ) => {
160- const clientId = globalStore . get ( atoms . clientId ) ;
160+ const clientId = ClientModel . getInstance ( ) . clientId ;
161161 await RpcApi . SetMetaCommand ( TabRpcClient , {
162162 oref : WOS . makeORef ( "client" , clientId ) ,
163163 meta : { "onboarding:githubstar" : true } ,
@@ -167,7 +167,7 @@ const NoTelemetryStarPage = ({ isCompact }: { isCompact: boolean }) => {
167167 } ;
168168
169169 const handleMaybeLater = async ( ) => {
170- const clientId = globalStore . get ( atoms . clientId ) ;
170+ const clientId = ClientModel . getInstance ( ) . clientId ;
171171 await RpcApi . SetMetaCommand ( TabRpcClient , {
172172 oref : WOS . makeORef ( "client" , clientId ) ,
173173 meta : { "onboarding:githubstar" : false } ,
@@ -227,7 +227,7 @@ const FeaturesPage = () => {
227227const NewInstallOnboardingModal = ( ) => {
228228 const modalRef = useRef < HTMLDivElement | null > ( null ) ;
229229 const [ pageName , setPageName ] = useAtom ( pageNameAtom ) ;
230- const clientData = useAtomValue ( atoms . client ) ;
230+ const clientData = useAtomValue ( ClientModel . getInstance ( ) . clientAtom ) ;
231231 const [ isCompact , setIsCompact ] = useState < boolean > ( window . innerHeight < 800 ) ;
232232
233233 const updateModalHeight = ( ) => {
0 commit comments