fix(web): reorder remote connection panel
Help users identify the destination before choosing a sign-in method.
This commit is contained in:
1 parent
32f024ae7f
commit
f575fb30c0
25 files changed
+156
-133
No files matched your search
@@ -1,5 +1,12 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
@@ -10,10 +17,3 @@
|
||||
- timer: {{seconds}} 秒后过期
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
@@ -1,10 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,12 +1,12 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
- status:
|
||||
- paragraph: 二维码已过期,请生成新二维码登录
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,12 +1,12 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
- status:
|
||||
- paragraph: 二维码已过期,请生成新二维码登录
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,5 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
@@ -11,11 +16,6 @@
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- paragraph: HTTP 会明文传输登录凭据,请仅在可信网络中使用
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "连接选项":
|
||||
- heading "连接选项" [level=3]
|
||||
- button "刷新连接状态"
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
@@ -11,8 +16,3 @@
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- paragraph: HTTP 会明文传输登录凭据,请仅在可信网络中使用
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,5 +1,13 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
- paragraph: HTTP 会明文传输登录凭据,请仅在可信网络中使用
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
@@ -11,11 +19,3 @@
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- paragraph: HTTP 会明文传输登录凭据,请仅在可信网络中使用
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
- paragraph: HTTP 会明文传输登录凭据,请仅在可信网络中使用
|
||||
@@ -1,10 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,12 +1,12 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
@@ -1,11 +1,11 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}
|
||||
- button "重试"
|
||||
- alert: 无法获取登录链接,请重试
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
@@ -1,12 +1,12 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
@@ -1,12 +1,12 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "已复制"
|
||||
- paragraph: 请勿公开分享登录链接
|
||||
- paragraph: 持有此链接的人都可以直接登录,请仅发送给自己的设备,勿公开分享;重启服务后链接失效
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
@@ -1,10 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "生成二维码"
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,5 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
@@ -10,8 +15,3 @@
|
||||
- timer: {{seconds}} 秒后过期
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,5 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
@@ -10,8 +15,3 @@
|
||||
- timer: {{seconds}} 秒后过期
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,5 +1,10 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成" [disabled]
|
||||
@@ -10,8 +15,3 @@
|
||||
- timer: {{seconds}} 秒后过期
|
||||
- paragraph: 请勿分享登录二维码
|
||||
- paragraph: 二维码使用或过期前,持有它的人都可以登录,请勿传播
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -1,11 +1,11 @@
|
||||
- region "远程连接":
|
||||
- heading "远程连接" [level=2]
|
||||
- paragraph: 通过以下方式,在其他设备上登录并使用 DeepSeek Harness。
|
||||
- region "访问地址":
|
||||
- heading "访问地址" [level=3]
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
- region "二维码登录":
|
||||
- heading "二维码登录" [level=3]
|
||||
- button "重新生成"
|
||||
- status: 二维码已使用,请在手机上确认是否已登录
|
||||
- region "链接登录":
|
||||
- heading "链接登录" [level=3]
|
||||
- paragraph: 复制登录链接,在另一台设备的浏览器中打开
|
||||
- code: {{access-address}}?token={{login-token}}
|
||||
- button "复制链接"
|
||||
@@ -21,7 +21,7 @@ async function remoteSettings(page: Page): Promise<Locator> {
|
||||
.getByRole('button', { name: '远程连接', exact: true }).click()
|
||||
const section = page.getByRole('region', { name: '远程连接', exact: true })
|
||||
await section.waitFor()
|
||||
const link = section.getByRole('region', { name: '链接登录', exact: true })
|
||||
const link = section.getByRole('region', { name: '访问地址', exact: true })
|
||||
await expect.poll(() => link.getByRole('button', { name: /^(复制链接|重试)$/ }).isEnabled()).toBe(true)
|
||||
return section
|
||||
}
|
||||
@@ -166,7 +166,7 @@ describe('web e2e: one-use QR browser login', () => {
|
||||
await page.goto(secure.authenticatedUrl)
|
||||
const section = await remoteSettings(page)
|
||||
const qrSection = section.getByRole('region', { name: '二维码登录', exact: true })
|
||||
const linkSection = section.getByRole('region', { name: '链接登录', exact: true })
|
||||
const linkSection = section.getByRole('region', { name: '访问地址', exact: true })
|
||||
expect(await qrSection.count()).toBe(1)
|
||||
expect(await linkSection.count()).toBe(1)
|
||||
for (const card of [qrSection, linkSection]) {
|
||||
@@ -270,13 +270,14 @@ describe('web e2e: one-use QR browser login', () => {
|
||||
const section = await remoteSettings(page)
|
||||
await createCode(page, section)
|
||||
const qr = section.getByRole('region', { name: '二维码登录', exact: true })
|
||||
const link = section.getByRole('region', { name: '链接登录', exact: true })
|
||||
const link = section.getByRole('region', { name: '访问地址', exact: true })
|
||||
const copy = link.getByRole('button', { name: '复制链接', exact: true })
|
||||
const beforeSection = await section.boundingBox()
|
||||
const beforeQr = await qr.boundingBox()
|
||||
const beforeField = await link.locator('code').locator('..').boundingBox()
|
||||
const beforeCopy = await copy.boundingBox()
|
||||
const scrollport = page.getByRole('dialog', { name: '设置', exact: true }).locator('[data-slot="settings.section"]').locator('..')
|
||||
const beforeLink = await link.boundingBox()
|
||||
const beforeGutter = await scrollport.evaluate(element => element.getBoundingClientRect().width - element.clientWidth)
|
||||
const screenshots = process.env['DSH_REMOTE_CONNECTION_SCREENSHOTS']
|
||||
if (screenshots !== undefined) {
|
||||
@@ -292,8 +293,16 @@ describe('web e2e: one-use QR browser login', () => {
|
||||
expect(beforeField).not.toBeNull()
|
||||
expect(beforeCopy).not.toBeNull()
|
||||
const gutterChange = await scrollport.evaluate(element => element.getBoundingClientRect().width - element.clientWidth) - beforeGutter
|
||||
expect(beforeLink).not.toBeNull()
|
||||
expect((await section.boundingBox())!.width).toBe(beforeSection!.width - gutterChange)
|
||||
expect(await qr.boundingBox()).toEqual({ ...beforeQr!, width: beforeQr!.width - gutterChange })
|
||||
const afterQr = await qr.boundingBox()
|
||||
const afterLink = await link.boundingBox()
|
||||
expect(afterQr).not.toBeNull()
|
||||
expect(afterLink).not.toBeNull()
|
||||
expect(afterLink!.height).toBeGreaterThan(beforeLink!.height)
|
||||
expect(afterQr).toEqual({
|
||||
...beforeQr!, y: beforeQr!.y + afterLink!.height - beforeLink!.height, width: beforeQr!.width - gutterChange,
|
||||
})
|
||||
expect(await link.locator('code').locator('..').boundingBox()).toEqual({ ...beforeField!, width: beforeField!.width - gutterChange })
|
||||
expect(await link.getByRole('button', { name: '已复制', exact: true }).boundingBox()).toEqual({ ...beforeCopy!, x: beforeCopy!.x - gutterChange })
|
||||
expect(await qr.getByRole('img').count()).toBe(1)
|
||||
@@ -547,7 +556,7 @@ describe('web e2e: one-use QR browser login', () => {
|
||||
const section = await remoteSettings(page)
|
||||
await createCode(page, section)
|
||||
const qr = section.getByRole('region', { name: '二维码登录', exact: true })
|
||||
const link = section.getByRole('region', { name: '链接登录', exact: true })
|
||||
const link = section.getByRole('region', { name: '访问地址', exact: true })
|
||||
const qrBox = await qr.boundingBox()
|
||||
const linkBox = await link.boundingBox()
|
||||
const symbol = await qr.getByRole('img').boundingBox()
|
||||
@@ -706,7 +715,7 @@ describe('web e2e: one-use QR browser login', () => {
|
||||
const nav = page.getByRole('dialog', { name: '设置', exact: true })
|
||||
.getByRole('button', { name: '远程连接', exact: true })
|
||||
const custom = page.getByRole('region', { name: '自定义远程连接', exact: true })
|
||||
const linkCard = section.getByRole('region', { name: '链接登录', exact: true })
|
||||
const linkCard = section.getByRole('region', { name: '访问地址', exact: true })
|
||||
expect(await nav.count()).toBe(1)
|
||||
expect(await svg.innerHTML()).toBe(initialSvg)
|
||||
expect(await section.getByRole('button', { name: '复制链接', exact: true }).isEnabled()).toBe(true)
|
||||
@@ -723,7 +732,7 @@ describe('web e2e: one-use QR browser login', () => {
|
||||
expect((await refreshed).status()).toBe(200)
|
||||
await extension.getByRole('status').filter({ hasText: '等待扫码' }).waitFor()
|
||||
expect(await svg.innerHTML()).toBe(initialSvg)
|
||||
const loginUrl = await section.getByRole('region', { name: '链接登录', exact: true }).locator('code').textContent()
|
||||
const loginUrl = await section.getByRole('region', { name: '访问地址', exact: true }).locator('code').textContent()
|
||||
expect(loginUrl).not.toBeNull()
|
||||
const extendedAria = await captureStableAria(page, '[data-slot="settings.section"]', scaffold.workspaceCwd, {
|
||||
replacements: [[loginUrl!, '{{access-address}}?token={{login-token}}'], [invitationId, '{{invitation-id}}']],
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
en: 9bbd5b81d7f513ef
|
||||
zh: ba7d27a7b0f22dc9
|
||||
/deepseek-ai-dsh-client-remote-connection/summary:
|
||||
en: 639f29d44170cd2e
|
||||
zh: 91cb391d44fe3bf5
|
||||
en: a6d289a2f6e19673
|
||||
zh: d2d0edc1ebf4dd7b
|
||||
/deepseek-ai-dsh-client-remote-connection/table-of-contents:
|
||||
en: ee070d32177b96d9
|
||||
zh: f946b0eba6746ffd
|
||||
|
||||
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
The settings panel separates QR code login and link login. A signed-in owner can generate a one-use QR code or copy a tokenized URL to sign another browser into the same Host. QR redemption issues a Remote browser cookie; copied links continue to use the independent Token login. The QR code, countdown, and credential warning stack vertically; expiry appears as a warning banner. Credential warnings appear only after generation or successful copying. The login link displays its token and fades at the right edge. Clipboard outcomes use a shell toast that survives closing settings.
|
||||
Settings shows shared sign-in guidance, then access-address and QR login cards. A signed-in owner can generate a one-use QR code or copy a tokenized URL to sign another browser into the same Host. QR redemption issues a Remote browser cookie; copied links continue to use the independent Token login. The QR code, countdown, and credential warning stack vertically; expiry appears as a warning banner. Credential warnings appear only after generation or successful copying. The login link displays its token and fades at the right edge. Clipboard outcomes use a shell toast that survives closing settings.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ kind: "package-reference"
|
||||
|
||||
## 概述
|
||||
|
||||
设置面板将二维码登录与链接登录分为两个区块。已登录的 owner 可以生成一次性二维码,或复制带 token 的 URL,让另一个浏览器登录同一 Host。二维码兑换签发 Remote 浏览器 cookie;复制链接继续使用独立的 Token 登录。二维码、倒计时和凭据告警纵向排列;二维码过期时显示告警 banner。凭据告警仅在生成二维码或成功复制链接后出现。登录链接直接显示 token,并在右侧渐隐。复制结果通过关闭设置后仍可见的外壳 toast 提示成功或失败。
|
||||
设置面板在共用登录说明下依次显示访问地址和二维码登录卡片。已登录的 owner 可以生成一次性二维码,或复制带 token 的 URL,让另一个浏览器登录同一 Host。二维码兑换签发 Remote 浏览器 cookie;复制链接继续使用独立的 Token 登录。二维码、倒计时和凭据告警纵向排列;二维码过期时显示告警 banner。凭据告警仅在生成二维码或成功复制链接后出现。登录链接直接显示 token,并在右侧渐隐。复制结果通过关闭设置后仍可见的外壳 toast 提示成功或失败。
|
||||
|
||||
## 目录
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** Separate QR and tokenized-link controls for signing another browser in. */
|
||||
/** Access address and QR login controls for browser sign-in. */
|
||||
import { QRCodeSVG } from 'qrcode.react'
|
||||
import { Button, IconWarningOutlineMedium, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
|
||||
@@ -9,7 +9,7 @@ import css from './RemoteConnectionSection.module.css'
|
||||
export type RemoteConnectionSectionProps = RemoteConnectionContentProps & PropsLocale<'remoteConnection'>
|
||||
|
||||
/**
|
||||
* Present independent QR and tokenized-link cards with loading confined to the QR preview.
|
||||
* Present shared sign-in guidance followed by access address and QR login cards.
|
||||
* @param props - Section injection and standard slot props.
|
||||
* @returns Remote connection settings content.
|
||||
*/
|
||||
@@ -20,9 +20,10 @@ export function RemoteConnectionSection(props: RemoteConnectionSectionProps) {
|
||||
return <section className={css.section} aria-label={t('title')}>
|
||||
<header className={css.header}>
|
||||
<h2 className={css.title}>{t('title')}</h2>
|
||||
<p className={css.description}>{t('addressDescription')}</p>
|
||||
</header>
|
||||
<AccessAddressCard {...props} />
|
||||
<QrLoginCard {...props} />
|
||||
<LinkLoginCard {...props} />
|
||||
</section>
|
||||
}
|
||||
|
||||
@@ -75,17 +76,16 @@ function QrLoginCard({ t, useRemoteConnection, create, cancel, reload }: Pick<Re
|
||||
</section>
|
||||
}
|
||||
|
||||
function LinkLoginCard({ t, useRemoteConnection, useLoginLink, copyLink, reloadLink }: Pick<RemoteConnectionSectionProps,
|
||||
function AccessAddressCard({ t, useRemoteConnection, useLoginLink, copyLink, reloadLink }: Pick<RemoteConnectionSectionProps,
|
||||
't' | 'useRemoteConnection' | 'useLoginLink' | 'copyLink' | 'reloadLink'>) {
|
||||
const deployment = useRemoteConnection(state => state.deployment)
|
||||
const link = useLoginLink(state => state)
|
||||
const available = deployment?.availability === 'available'
|
||||
const http = deployment?.url.startsWith('http:') === true
|
||||
const retryLink = link.phase === 'error'
|
||||
return <section className={css.card} aria-label={t('linkTitle')}>
|
||||
return <section className={css.card} aria-label={t('addressTitle')}>
|
||||
<header className={css.header}>
|
||||
<h3 className={css.methodTitle}>{t('linkTitle')}</h3>
|
||||
<p className={css.description}>{t('linkDescription')}</p>
|
||||
<h3 className={css.methodTitle}>{t('addressTitle')}</h3>
|
||||
</header>
|
||||
{deployment !== null && <div className={css.linkRow}>
|
||||
<div className={css.linkPreview}>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
export const en = {
|
||||
title: 'Remote connection',
|
||||
qrTitle: 'QR code login',
|
||||
linkTitle: 'Link login',
|
||||
linkDescription: 'Copy the login link and open it in the browser on your other device.',
|
||||
addressTitle: 'Access address',
|
||||
addressDescription: 'Use the methods below to sign in to DeepSeek Harness on another device.',
|
||||
copyLink: 'Copy link',
|
||||
copied: 'Copied',
|
||||
copying: 'Copying login link',
|
||||
@@ -45,8 +45,8 @@ export type RemoteConnectionLocaleKey = keyof typeof en
|
||||
export const zh: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: '远程连接',
|
||||
qrTitle: '二维码登录',
|
||||
linkTitle: '链接登录',
|
||||
linkDescription: '复制登录链接,在另一台设备的浏览器中打开',
|
||||
addressTitle: '访问地址',
|
||||
addressDescription: '通过以下方式,在其他设备上登录并使用 DeepSeek Harness。',
|
||||
copyLink: '复制链接',
|
||||
copied: '已复制',
|
||||
copying: '正在复制登录链接',
|
||||
@@ -83,8 +83,8 @@ export const zh: Record<RemoteConnectionLocaleKey, string> = {
|
||||
export const ja: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: 'リモート接続',
|
||||
qrTitle: 'QRコードでログイン',
|
||||
linkTitle: 'リンクでログイン',
|
||||
linkDescription: 'ログインリンクをコピーし、別の端末のブラウザーで開いてください。',
|
||||
addressTitle: 'アクセスアドレス',
|
||||
addressDescription: '以下の方法で別の端末から DeepSeek Harness にログインしてください。',
|
||||
copyLink: 'リンクをコピー',
|
||||
copied: 'コピー済み',
|
||||
copying: 'ログインリンクをコピー中',
|
||||
@@ -121,8 +121,8 @@ export const ja: Record<RemoteConnectionLocaleKey, string> = {
|
||||
export const es: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: 'Conexión remota',
|
||||
qrTitle: 'Inicio de sesión con QR',
|
||||
linkTitle: 'Inicio de sesión con enlace',
|
||||
linkDescription: 'Copia el enlace y ábrelo en el navegador de tu otro dispositivo.',
|
||||
addressTitle: 'Dirección de acceso',
|
||||
addressDescription: 'Usa los métodos siguientes para iniciar sesión en DeepSeek Harness desde otro dispositivo.',
|
||||
copyLink: 'Copiar enlace',
|
||||
copied: 'Copiado',
|
||||
copying: 'Copiando enlace',
|
||||
@@ -159,8 +159,8 @@ export const es: Record<RemoteConnectionLocaleKey, string> = {
|
||||
export const fr: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: 'Connexion à distance',
|
||||
qrTitle: 'Connexion par code QR',
|
||||
linkTitle: 'Connexion par lien',
|
||||
linkDescription: 'Copiez le lien et ouvrez-le dans le navigateur de votre autre appareil.',
|
||||
addressTitle: 'Adresse d’accès',
|
||||
addressDescription: 'Utilisez les méthodes ci-dessous pour vous connecter à DeepSeek Harness depuis un autre appareil.',
|
||||
copyLink: 'Copier le lien',
|
||||
copied: 'Copié',
|
||||
copying: 'Copie du lien',
|
||||
@@ -197,8 +197,8 @@ export const fr: Record<RemoteConnectionLocaleKey, string> = {
|
||||
export const de: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: 'Fernverbindung',
|
||||
qrTitle: 'Anmeldung per QR-Code',
|
||||
linkTitle: 'Anmeldung per Link',
|
||||
linkDescription: 'Kopieren Sie den Link und öffnen Sie ihn im Browser Ihres anderen Geräts.',
|
||||
addressTitle: 'Zugriffsadresse',
|
||||
addressDescription: 'Verwenden Sie die folgenden Methoden, um sich auf einem anderen Gerät bei DeepSeek Harness anzumelden.',
|
||||
copyLink: 'Link kopieren',
|
||||
copied: 'Kopiert',
|
||||
copying: 'Anmeldelink wird kopiert',
|
||||
@@ -235,8 +235,8 @@ export const de: Record<RemoteConnectionLocaleKey, string> = {
|
||||
export const ru: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: 'Удалённое подключение',
|
||||
qrTitle: 'Вход по QR-коду',
|
||||
linkTitle: 'Вход по ссылке',
|
||||
linkDescription: 'Скопируйте ссылку и откройте её в браузере другого устройства.',
|
||||
addressTitle: 'Адрес доступа',
|
||||
addressDescription: 'Используйте указанные ниже способы для входа в DeepSeek Harness с другого устройства.',
|
||||
copyLink: 'Копировать ссылку',
|
||||
copied: 'Скопировано',
|
||||
copying: 'Копирование ссылки',
|
||||
@@ -273,8 +273,8 @@ export const ru: Record<RemoteConnectionLocaleKey, string> = {
|
||||
export const pt: Record<RemoteConnectionLocaleKey, string> = {
|
||||
title: 'Conexão remota',
|
||||
qrTitle: 'Login por código QR',
|
||||
linkTitle: 'Login por link',
|
||||
linkDescription: 'Copie o link e abra-o no navegador do seu outro dispositivo.',
|
||||
addressTitle: 'Endereço de acesso',
|
||||
addressDescription: 'Use os métodos abaixo para entrar no DeepSeek Harness em outro dispositivo.',
|
||||
copyLink: 'Copiar link',
|
||||
copied: 'Copiado',
|
||||
copying: 'Copiando link',
|
||||
|
||||
@@ -186,7 +186,7 @@ describe('remote connection settings registration', () => {
|
||||
await act(async () => { await earlier.await() })
|
||||
const earlierRegion = screen.getByRole('region', { name: 'Earlier options' })
|
||||
expect(screen.getAllByRole('region').map(region => region.getAttribute('aria-label')))
|
||||
.toEqual([zh.title, zh.qrTitle, zh.linkTitle, 'Earlier options', 'Later options'])
|
||||
.toEqual([zh.title, zh.addressTitle, zh.qrTitle, 'Earlier options', 'Later options'])
|
||||
expect(screen.getByRole('img', { name: zh.qr })).toBe(qr)
|
||||
expect(earlierRegion.dataset).toMatchObject({ phase: 'pending', ticket: 'extension-invitation', link: 'ready' })
|
||||
expect(laterRegion.dataset).toMatchObject({ phase: 'pending', ticket: 'extension-invitation', link: 'ready' })
|
||||
|
||||
@@ -39,6 +39,20 @@ function panel(overrides: Partial<RemoteConnectionState> = {}, language: 'en' |
|
||||
}
|
||||
|
||||
describe('Remote connection section', () => {
|
||||
it.each(['en', 'zh'] as const)('introduces the access address before QR login in %s', (language) => {
|
||||
const copy = language === 'en' ? en : zh
|
||||
panel({}, language)
|
||||
const section = screen.getByRole('region', { name: copy.title })
|
||||
expect(within(section).getAllByRole('heading', { level: 3 }).map(heading => heading.textContent))
|
||||
.toEqual([copy.addressTitle, copy.qrTitle])
|
||||
expect(within(section).getAllByRole('region')).toHaveLength(2)
|
||||
const description = within(section).getByText(copy.addressDescription)
|
||||
for (const card of within(section).getAllByRole('region')) {
|
||||
expect(within(card).queryByText(copy.addressDescription)).toBeNull()
|
||||
expect(description.compareDocumentPosition(card) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy()
|
||||
}
|
||||
})
|
||||
|
||||
it('separates QR and link login and shows no credential warnings before either action', () => {
|
||||
const { create, copyLink } = panel()
|
||||
expect(screen.getByRole('region', { name: en.title })).toBeTruthy()
|
||||
@@ -47,7 +61,7 @@ describe('Remote connection section', () => {
|
||||
expect(screen.queryByText(en.httpWarning)).toBeNull()
|
||||
expect(screen.queryByRole('img')).toBeNull()
|
||||
const qr = screen.getByRole('region', { name: en.qrTitle })
|
||||
const link = screen.getByRole('region', { name: en.linkTitle })
|
||||
const link = screen.getByRole('region', { name: en.addressTitle })
|
||||
expect(within(qr).queryByRole('button', { name: en.copyLink })).toBeNull()
|
||||
expect(within(link).queryByRole('button', { name: en.generate })).toBeNull()
|
||||
expect(within(qr).queryByText('https://host.example/app/')).toBeNull()
|
||||
@@ -110,7 +124,7 @@ describe('Remote connection section', () => {
|
||||
it('keeps the link card and its focus while the QR is generated or refreshed', () => {
|
||||
const { state, copyLink } = panel({ phase: 'pending', ticket }, 'en', { copied: true })
|
||||
const qr = screen.getByRole('region', { name: en.qrTitle })
|
||||
const link = screen.getByRole('region', { name: en.linkTitle })
|
||||
const link = screen.getByRole('region', { name: en.addressTitle })
|
||||
const copy = within(link).getByRole('button', { name: en.copied })
|
||||
copy.focus()
|
||||
for (const phase of ['creating', 'loading'] as const) {
|
||||
@@ -119,7 +133,7 @@ describe('Remote connection section', () => {
|
||||
expect(within(qr).getByRole('status', { name: en[phase] })).toBeTruthy()
|
||||
expect(within(qr).queryByRole('img')).toBeNull()
|
||||
expect(within(qr).queryByRole('timer')).toBeNull()
|
||||
expect(screen.getByRole('region', { name: en.linkTitle })).toBe(link)
|
||||
expect(screen.getByRole('region', { name: en.addressTitle })).toBe(link)
|
||||
expect(within(link).getByRole('button', { name: en.copied })).toBe(copy)
|
||||
expect(copy).toHaveProperty('disabled', false)
|
||||
expect(document.activeElement).toBe(copy)
|
||||
@@ -215,7 +229,7 @@ describe('Remote connection section', () => {
|
||||
|
||||
it('reuses the copy button to retry a failed link read while QR creation remains available', () => {
|
||||
const { reloadLink, copyLink, linkState } = panel({}, 'en', { phase: 'error', url: null })
|
||||
const link = screen.getByRole('region', { name: en.linkTitle })
|
||||
const link = screen.getByRole('region', { name: en.addressTitle })
|
||||
expect(within(link).getByRole('alert').textContent).toBe(en.linkFailed)
|
||||
expect(within(link).getAllByRole('button')).toHaveLength(1)
|
||||
const action = within(link).getByRole('button', { name: en.retry })
|
||||
|
||||
Reference in new issue
Block a user