Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/assets/demo_termflow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion packages/client-ui/src/App.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ describe('shared application routes', () => {
expect(logout.attributes('aria-label')).toBe('退出登录')
expect(logout.attributes('title')).toBe('退出登录')
expect(logout.find('svg').exists()).toBe(true)
expect(logout.get('.logout-label').text()).toBe('退出')
expect(logout.find('.logout-label').exists()).toBe(false)
expect(logout.text()).toBe('')
dashboard.unmount()
})

Expand Down
1 change: 0 additions & 1 deletion packages/client-ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
@click="logout"
>
<LogOut :size="18" aria-hidden="true" />
<span class="logout-label">退出</span>
</button>
</header>
<aside v-if="!terminalLayout && !bareLayout" class="side-nav" aria-label="主导航">
Expand Down
1 change: 1 addition & 0 deletions packages/client-ui/src/components/settings/ThemePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
type="button"
role="radio"
:aria-label="theme.label"
:title="theme.label"
:aria-checked="activeTheme === theme.id"
:tabindex="activeTheme === theme.id ? 0 : -1"
@click="choose(theme.id)"
Expand Down
47 changes: 26 additions & 21 deletions packages/client-ui/src/styles/app.css

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions packages/client-ui/src/views/TerminalView.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,13 @@ it('makes the Agent panel fill the workspace in the mobile media block', () => {
expect(mobileBlock).toContain('width: 100%')
expect(mobileBlock).toContain('height: 100%')
})

it('closes open titlebar menus when opening the Agent panel', async () => {
const { w } = await harness(true, '/term/t1', false)
await w.get('[data-action="toggle-display-menu"]').trigger('click')
expect(w.find('.display-menu').exists()).toBe(true)
await w.get('[data-action="toggle-agent"]').trigger('click')
await flushPromises()
expect(w.find('.display-menu').exists()).toBe(false)
w.unmount()
})
3 changes: 2 additions & 1 deletion packages/client-ui/src/views/TerminalView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const agentOverlayMedia = window.matchMedia('(max-width: 47.99rem), (pointer: co
const mobileOverlay = ref(agentOverlayMedia.matches)
function onAgentOverlayMediaChange(event: MediaQueryListEvent) { mobileOverlay.value = event.matches }
watch(agentConversationId, (id) => { if (id) agentOpen.value = true })
watch(agentOpen, (open) => { if (open) openMenu.value = null })
async function selectAgentConversation(id: string | null) {
const query = id && isAgentConversationId(id) ? { agent: id } : {}
await router.replace({ path: route.path, query, hash: route.hash })
Expand All @@ -59,7 +60,7 @@ async function closeAgent() {
await selectAgentConversation(null)
await nextTick(); agentToggle.value?.focus()
}
function toggleAgent() { if (agentOpen.value) void closeAgent(); else agentOpen.value = true }
function toggleAgent() { if (agentOpen.value) void closeAgent(); else { openMenu.value = null; agentOpen.value = true } }
const orientation = ref(orientationFor(window.innerWidth, window.innerHeight))
const orientationViews = reactive(createOrientationViewState())
const displayMode = computed<DisplayMode>({
Expand Down
Loading