fix: keep world login separate from router proof
This commit is contained in:
parent
f5eb5e7cdb
commit
07a573f660
2 changed files with 11 additions and 12 deletions
|
|
@ -375,6 +375,16 @@ describe('HoloLakeHome', () => {
|
|||
expect(screen.getAllByText('在线只读')).toHaveLength(4)
|
||||
})
|
||||
|
||||
it('does not promote an authorized world login into a Fifth Domain router receipt', () => {
|
||||
useGuanghuWorldLoginMock.mockReturnValue(worldLogin('online'))
|
||||
useGuanghuRouterMock.mockReturnValue(offlineRouter())
|
||||
|
||||
render(<HoloLakeHome locale="zh-CN" onEnterKnowledgeBase={vi.fn()} />)
|
||||
|
||||
expect(screen.getByRole('button', { name: /第五域.*等待真实回执/ })).toBeInTheDocument()
|
||||
expect(screen.queryByRole('button', { name: /第五域.*当前所在/ })).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('opens the origin channel directly from the zero-point core', () => {
|
||||
render(<HoloLakeHome locale="zh-CN" onEnterKnowledgeBase={vi.fn()} />)
|
||||
|
||||
|
|
|
|||
|
|
@ -117,18 +117,7 @@ export function HoloLakeHome({
|
|||
const worldOpen = login.state.phase === 'online'
|
||||
const isVisualPreview = login.state.workorderId === 'local-visual-preview'
|
||||
const fifthDomainOpen = worldOpen && route !== 'world'
|
||||
const worldRouterState = worldOpen && router.state.status !== 'online'
|
||||
? {
|
||||
...router.state,
|
||||
latestReceipt: {
|
||||
connection_id: login.state.workorderId ?? 'email-authorized-session',
|
||||
node_id: login.state.nodeId,
|
||||
receipt_id: login.state.workorderId ?? 'email-authorized-session',
|
||||
state: 'online',
|
||||
},
|
||||
status: 'online' as const,
|
||||
}
|
||||
: router.state
|
||||
const worldRouterState = router.state
|
||||
const t = (key: TranslationKey) => translate(locale, key)
|
||||
|
||||
const executeLivingPlan = useCallback((
|
||||
|
|
|
|||
Loading…
Reference in a new issue