mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
fix: resolve context switch failure in browser automation (#380)
* fix: resolve context switch failure in browser automation * feat: update logo and optimize sidebar empty state --------- Co-authored-by: 晨苒 <16112591+chen-ran@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
</SidebarHeader>
|
||||
|
||||
<SidebarContent>
|
||||
<SidebarContent class="@container/bots">
|
||||
<SidebarGroup class="px-2 py-0">
|
||||
<SidebarGroupContent>
|
||||
<SidebarMenu class="gap-1">
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
<div
|
||||
v-if="!isLoading && bots.length === 0"
|
||||
class="px-3 py-6 text-center text-xs text-muted-foreground"
|
||||
class="px-3 py-6 text-center text-xs text-muted-foreground @max-[50px]/bots:hidden"
|
||||
>
|
||||
{{ t('bots.emptyTitle') }}
|
||||
</div>
|
||||
|
||||
@@ -74,14 +74,16 @@ const openStatus = reactive({
|
||||
:model-value="selectContext(item.id as string).value"
|
||||
@update:model-value="(isSelect) => {
|
||||
if (isSelect) {
|
||||
curContext.value = item
|
||||
curContext = item
|
||||
}
|
||||
}"
|
||||
>
|
||||
<AppWindow
|
||||
class="mr-2"
|
||||
/>
|
||||
{{ item.name }}
|
||||
<span>
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</Toggle>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
|
||||
@@ -340,8 +340,8 @@ const { data: botData } = useQuery(getBotsQuery())
|
||||
const botList = computed(() => botData.value?.items ?? [])
|
||||
|
||||
watch(botList, (list) => {
|
||||
if (!selectedBotId.value && list.length > 0 && list[0].id) {
|
||||
selectedBotId.value = list[0].id
|
||||
if (!selectedBotId.value && list.length > 0 && list[0]!.id) {
|
||||
selectedBotId.value = list[0]!.id
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user