Skip to content

Commit

Permalink
fix: fix the problem that add role in search mode is invalid, close #19
Browse files Browse the repository at this point in the history
… (#29)
  • Loading branch information
ayangweb committed Mar 20, 2023
1 parent bb3f8fb commit dc25a44
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Function/components/SettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { apiKey, autoStart, isMemory } = storeToRefs(useSettingsStore())
<div class="flex flex-col gap-6">
<div class="flex gap-2">
<a-checkbox v-model="autoStart">开机自启动</a-checkbox>
<a-checkbox>隐藏菜单栏图标</a-checkbox>
<!-- <a-checkbox>隐藏菜单栏图标</a-checkbox> -->
</div>

<!-- 热键绑定 -->
Expand Down
8 changes: 7 additions & 1 deletion src/components/Input/components/RoleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ const { sessionDataList } = storeToRefs(useSessionStore())
const isAdd = ref(false)
const isEdit = computed(() => roleList.value.some((item) => item.isEdit))
const renderList = computed(() =>
filterRoleList.value.length && !isAdd.value
? filterRoleList.value
: roleList.value
)
const handleVisible = (value: boolean) => {
if (sessionDataList.value.length || isAdd.value || isEdit.value) return
Expand Down Expand Up @@ -131,7 +137,7 @@ const handleClose = () => {
<template #content>
<ul>
<li
v-for="item in filterRoleList.length ? filterRoleList : roleList"
v-for="item in renderList"
class="flex cursor-pointer items-center gap-4 bg-transparent p-4 text-[var(--color-text-1)] transition hover:bg-[var(--color-fill-2)]"
:class="{
'bg-[rgb(var(--blue-6))]!': currentRole?.id === item.id,
Expand Down
5 changes: 4 additions & 1 deletion src/utils/saveImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export const saveImage = async (nodeId: string) => {

// 下载图片到 download 文件夹
await writeBinaryFile(
{ path: `${Date.now()}.png`, contents: uint8Array },
{
path: `ChatGPT-Desktop-${Date.now()}.png`,
contents: uint8Array
},
{ dir: BaseDirectory.Download }
)

Expand Down

0 comments on commit dc25a44

Please sign in to comment.