@@ -94,7 +93,7 @@ export default function MessageBs({ data, onUnlike = () => { }, flow_type, onSou
{/* {(data.flow_id == "06b1d374-ba97-46e6-8782-c56dec8dcc17" || data.flow_id == "ed8e21f6-9757-43d0-b076-8c6e81bb0580") &&
}
{(data.flow_id != "06b1d374-ba97-46e6-8782-c56dec8dcc17" && data.flow_id != "ed8e21f6-9757-43d0-b076-8c6e81bb0580" && data.flow_id != "ca214b41-2b73-4585-b172-bf1e546cf6ec") &&
{/*
diff --git a/src/components/bs-comp/chatComponent/MessagePanne.tsx b/src/components/bs-comp/chatComponent/MessagePanne.tsx
index 0797967..1416b98 100644
--- a/src/components/bs-comp/chatComponent/MessagePanne.tsx
+++ b/src/components/bs-comp/chatComponent/MessagePanne.tsx
@@ -10,7 +10,7 @@ import RunLog from "./RunLog";
import Separator from "./Separator";
import { useMessageStore } from "./messageStore";
-export default function MessagePanne({ useName, guideWord, loadMore, flow_type }) {
+export default function MessagePanne({logo, useName, guideWord, loadMore, flow_type }) {
const { t } = useTranslation()
const { chatId, messages } = useMessageStore()
@@ -75,7 +75,6 @@ export default function MessagePanne({ useName, guideWord, loadMore, flow_type }
} else if (msg.thought) {
type = 'system'
}
- // console.log(type)
switch (type) {
case 'user':
return
;
diff --git a/src/components/bs-comp/chatComponent/index.tsx b/src/components/bs-comp/chatComponent/index.tsx
index 92b024b..40b0c9d 100644
--- a/src/components/bs-comp/chatComponent/index.tsx
+++ b/src/components/bs-comp/chatComponent/index.tsx
@@ -1,9 +1,22 @@
import ChatInput from "./ChatInput";
import MessagePanne from "./MessagePanne";
-export default function ChatComponent({ clear = false, questions = [], form = false, useName, inputForm = null, guideWord, wsUrl, onBeforSend, type, loadMore = () => { } }) {
+export default function ChatComponent({
+ stop = false,
+ logo = '',
+ clear = false,
+ questions = [],
+ form = false,
+ useName,
+ inputForm = null,
+ guideWord,
+ wsUrl,
+ onBeforSend,
+ type,
+ loadMore = () => { }
+}) {
return
-
+
};
diff --git a/src/components/bs-comp/chatComponent/messageStore.ts b/src/components/bs-comp/chatComponent/messageStore.ts
index 2b13410..28ee300 100644
--- a/src/components/bs-comp/chatComponent/messageStore.ts
+++ b/src/components/bs-comp/chatComponent/messageStore.ts
@@ -4,6 +4,7 @@ import { MessageDB, getChatHistory } from '@/controllers/API'
import { ChatMessageType } from '@/types/chat'
import { cloneDeep } from 'lodash'
import { create } from 'zustand'
+import { formatDate } from '@/util/utils';
/**
* 会话消息管理
@@ -19,6 +20,8 @@ type State = {
/** 没有更多历史纪录 */
historyEnd: boolean,
messages: ChatMessageType[]
+ /** 历史回话独立存储 */
+ hisMessages: ChatMessageType[]
/**
* 控制引导问题的显示状态
*/
@@ -26,8 +29,8 @@ type State = {
}
type Actions = {
- loadHistoryMsg: (flowid: string, chatId: string, flow_type: string) => Promise
;
- loadMoreHistoryMsg: (flowid: string, flow_type: string) => Promise;
+ loadHistoryMsg: (flowid: string, chatId: string, data: { appendHistory: boolean, lastMsg: string }, flow_type: string) => Promise;
+ loadMoreHistoryMsg: (flowid: string, appendHistory: boolean, flow_type: string) => Promise;
destory: () => void;
createSendMsg: (inputs: any, inputKey?: string) => void;
createWsMsg: (data: any) => void;
@@ -38,6 +41,7 @@ type Actions = {
insetSystemMsg: (text: string) => void;
insetBsMsg: (text: string) => void;
setShowGuideQuestion: (text: boolean) => void;
+ clearMsgs: () => void;
}
@@ -76,18 +80,32 @@ export const useMessageStore = create((set, get) => ({
running: false,
chatId: '',
messages: [],
+ hisMessages: [],
historyEnd: false,
showGuideQuestion: false,
setShowGuideQuestion(bln: boolean) {
set({ showGuideQuestion: bln })
},
- async loadHistoryMsg(flowid, chatId, flow_type) {
+ async loadHistoryMsg(flowid, chatId, { appendHistory, lastMsg }, flow_type) {
const res = await getChatHistory(flowid, chatId, 30, 0, flow_type)
const msgs = handleHistoryMsg(res)
currentChatId = chatId
- set({ historyEnd: false, messages: msgs.reverse() })
+ const hisMessages = appendHistory ? [] : msgs.reverse()
+ if (hisMessages.length) {
+ hisMessages.push({
+ ...bsMsgItem,
+ id: Math.random() * 1000000,
+ category: 'divider',
+ message: lastMsg,
+ })
+ }
+ set({
+ historyEnd: false,
+ messages: appendHistory ? msgs.reverse() : [],
+ hisMessages
+ })
},
- async loadMoreHistoryMsg(flowid, flow_type) {
+ async loadMoreHistoryMsg(flowid, appendHistory, flow_type) {
if (get().running) return // 会话进行中禁止加载more历史
if (get().historyEnd) return // 没有更多历史纪录
const chatId = get().chatId
@@ -101,11 +119,16 @@ export const useMessageStore = create((set, get) => ({
}
const msgs = handleHistoryMsg(res)
if (msgs.length) {
- set({ messages: [...msgs.reverse(), ...prevMsgs] })
+ set({ [appendHistory ? 'messages' : 'hisMessages']: [...msgs.reverse(), ...prevMsgs] })
} else {
set({ historyEnd: true })
}
},
+ clearMsgs() {
+ setTimeout(() => {
+ set({ hisMessages: [], messages: [], historyEnd: true })
+ }, 0);
+ },
destory() {
set({ chatId: '', messages: [] })
},
@@ -122,7 +145,8 @@ export const useMessageStore = create((set, get) => ({
category: '',
files: [],
end: false,
- user_name: ""
+ user_name: "",
+ update_time: formatDate(new Date(), 'yyyy-MM-ddTHH:mm:ss')
}]
}))
},
@@ -151,13 +175,20 @@ export const useMessageStore = create((set, get) => ({
// if (wsdata.end) {
// debugger
// }
- console.log('change updateCurrentMessage');
+ // console.log('change updateCurrentMessage');
const messages = get().messages
const isRunLog = runLogsTypes.includes(wsdata.category);
// run log类型存在嵌套情况,使用 extra 匹配 currentMessage; 否则取最近
- const currentMessageIndex = isRunLog ?
- messages.findLastIndex((msg) => msg.extra === wsdata.extra)
- : messages.findLastIndex((msg) => !runLogsTypes.includes(msg.category))
+ let currentMessageIndex = 0
+ for (let i = messages.length - 1; i >= 0; i--) {
+ if (isRunLog && messages[i].extra === wsdata.extra) {
+ currentMessageIndex = i;
+ break;
+ } else if (!isRunLog && !runLogsTypes.includes(messages[i].category)) {
+ currentMessageIndex = i;
+ break;
+ }
+ }
const currentMessage = messages[currentMessageIndex]
const newCurrentMessage = {
@@ -166,13 +197,17 @@ export const useMessageStore = create((set, get) => ({
id: isRunLog ? wsdata.extra : wsdata.messageId, // 每条消息必唯一
message: isRunLog ? JSON.parse(wsdata.message) : currentMessage.message + wsdata.message,
thought: currentMessage.thought + (wsdata.thought ? `${wsdata.thought}\n` : ''),
- files: wsdata.files || null,
+ files: wsdata.files || [],
category: wsdata.category || '',
source: wsdata.source
}
+ // 无id补上(如文件解析完成消息,后端无返回messageid)
+ if (!newCurrentMessage.id) {
+ newCurrentMessage.id = Math.random() * 1000000
+ // console.log('msg:', newCurrentMessage);
+ }
messages[currentMessageIndex] = newCurrentMessage
- // console.log(messages,currentMessageIndex,newCurrentMessage)
// 会话特殊处理,兼容后端的缺陷
if (!isRunLog) {
// start - end 之间没有内容删除load
diff --git a/src/components/bs-comp/loadMore/index.tsx b/src/components/bs-comp/loadMore/index.tsx
new file mode 100644
index 0000000..35e866a
--- /dev/null
+++ b/src/components/bs-comp/loadMore/index.tsx
@@ -0,0 +1,24 @@
+import { useEffect, useRef } from "react";
+
+export default function LoadMore({ onScrollLoad }) {
+ // scroll load
+ const footerRef = useRef(null)
+ useEffect(function () {
+ const observer = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ onScrollLoad()
+ }
+ });
+ }, {
+ // root: null, // 视口
+ rootMargin: '0px', // 视口的边距
+ threshold: 0.1 // 目标元素超过视口的10%即触发回调
+ });
+
+ observer.observe(footerRef.current);
+ return () => footerRef.current && observer.unobserve(footerRef.current);
+ }, [])
+
+ return
+};
diff --git a/src/components/bs-comp/selectComponent/Users.tsx b/src/components/bs-comp/selectComponent/Users.tsx
new file mode 100644
index 0000000..655e77c
--- /dev/null
+++ b/src/components/bs-comp/selectComponent/Users.tsx
@@ -0,0 +1,48 @@
+import MultiSelect from "@/components/bs-ui/select/multi";
+import { getUsersApi } from "@/controllers/API/user";
+import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
+
+export default function UsersSelect({ multiple = false, lockedValues = [], value, disabled = false, onChange, children }:
+ { multiple?: boolean, lockedValues?: any[], value: any, disabled?: boolean, onChange: (a: any) => any, children?: (fun: any) => React.ReactNode }) {
+
+ const { t } = useTranslation()
+ const [options, setOptions] = useState([]);
+ const originOptionsRef = useRef([])
+
+ const pageRef = useRef(1)
+ const reload = (page, name) => {
+ getUsersApi({ page, pageSize: 40, name }).then(res => {
+ pageRef.current = page
+ originOptionsRef.current = res.data
+ const opts = res.data.map(el => ({ label: el.user_name, value: el.user_id }))
+ setOptions(_ops => page > 1 ? [..._ops, ...opts] : opts)
+ })
+ }
+
+ useEffect(() => {
+ reload(1, '')
+ }, [])
+
+ // 加载更多
+ const loadMore = (name) => {
+ reload(pageRef.current + 1, name)
+ }
+
+ return reload(1, '')}
+ onSearch={(val) => reload(1, val)}
+ onScrollLoad={(val) => loadMore(val)}
+ >
+ {children?.(reload)}
+
+};
diff --git a/src/components/bs-comp/selectComponent/knowledge.tsx b/src/components/bs-comp/selectComponent/knowledge.tsx
new file mode 100644
index 0000000..5b22111
--- /dev/null
+++ b/src/components/bs-comp/selectComponent/knowledge.tsx
@@ -0,0 +1,51 @@
+import MultiSelect from "@/components/bs-ui/select/multi";
+import { readFileLibDatabase } from "@/controllers/API";
+import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
+
+export default function KnowledgeSelect({ multiple = false, value, disabled = false, onChange, children }:
+ { multiple?: boolean, value: any, disabled?: boolean, onChange: (a: any) => any, children?: (fun: any) => React.ReactNode }) {
+
+ const { t } = useTranslation()
+ const [options, setOptions] = useState([]);
+ const originOptionsRef = useRef([])
+
+ const pageRef = useRef(1)
+ const reload = (page, name) => {
+ readFileLibDatabase(page, 60, name).then(res => {
+ pageRef.current = page
+ originOptionsRef.current = res.data
+ const opts = res.data.map(el => ({ label: el.name, value: el.id }))
+ setOptions(_ops => page > 1 ? [..._ops, ...opts] : opts)
+ })
+ }
+
+ useEffect(() => {
+ reload(1, '')
+ }, [])
+
+ // const handleChange = (res) => {
+ // // id => obj
+ // onChange(res.map(el => originOptionsRef.current.find(el2 => el2.id === el)))
+ // }
+
+ // 加载更多
+ const loadMore = (name) => {
+ reload(pageRef.current + 1, name)
+ }
+
+ return reload(1, '')}
+ onSearch={(val) => reload(1, val)}
+ onScrollLoad={(val) => loadMore(val)}
+ >
+ {children?.(reload)}
+
+};
diff --git a/src/components/bs-comp/sheets/SkillChatSheet.tsx b/src/components/bs-comp/sheets/SkillChatSheet.tsx
index 8af1ac7..cf14c32 100644
--- a/src/components/bs-comp/sheets/SkillChatSheet.tsx
+++ b/src/components/bs-comp/sheets/SkillChatSheet.tsx
@@ -19,6 +19,8 @@ import zidingyi1 from "../../../assets/npc/zidingyi1.png";
import zidingyi2 from "../../../assets/npc/zidingyi2.png";
import npcIcon from "../../../assets/npc/npcIcon.png";
import nengliIcon from "../../../assets/npc/nengliIcon.png";
+import { useDebounce } from "@/util/hook";
+import LoadMore from "../loadMore";
export default function SkillChatSheet({ children, onSelect }) {
const [open, setOpen] = useState(false)
@@ -30,34 +32,45 @@ export default function SkillChatSheet({ children, onSelect }) {
const [keyword, setKeyword] = useState(' ')
const allDataRef = useRef([])
- useEffect(() => {
- open && getChatOnlineApi().then(res => {
- allDataRef.current = res
- setKeyword('')
+ const pageRef = useRef(1)
+ const searchRef = useRef('')
+ const [options, setOptions] = useState([])
+
+ const loadData = (more = false) => {
+ open && getChatOnlineApi(pageRef.current, searchRef.current).then(res => {
+ setOptions(opts => more ? [...opts, ...res] : res)
})
+ }
+ const debounceLoad = useDebounce(loadData, 600, false)
+
+ useEffect(() => {
+ // open && getChatOnlineApi().then(res => {
+ // allDataRef.current = res
+ // setKeyword('')
+ // })
// setKeyword(' ')
+ pageRef.current = 1
+ searchRef.current = ''
+ loadData()
}, [open])
- const options = useMemo(() => {
- return allDataRef.current.filter(el => el.name.toLowerCase().includes(keyword.toLowerCase()))
- }, [keyword])
+ // const options = useMemo(() => {
+ // return allDataRef.current.filter(el => el.name.toLowerCase().includes(keyword.toLowerCase()))
+ // }, [keyword])
+
+ const handleSearch = (e) => {
+ pageRef.current = 1
+ searchRef.current = e.target.value
+ debounceLoad()
+ }
+
+ const handleLoadMore = () => {
+ pageRef.current++
+ loadData(true)
+ }
const render = (item: any) => (
{ onSelect(item); setOpen(false) }}>
- {/* */}
- {/*
- {item.name}
- {item.name}
- */}
- {/* onSelect(item)}>
-
-
-
- {item.name}
-
- {item.description}
-
- */}
@@ -68,16 +81,11 @@ export default function SkillChatSheet({ children, onSelect }) {
- {/* {(item.id == "06b1d374-ba97-46e6-8782-c56dec8dcc17" || item.id == "ed8e21f6-9757-43d0-b076-8c6e81bb0580") &&

}
- {item.id == "ca214b41-2b73-4585-b172-bf1e546cf6ec" &&

}
- {(item.id != "06b1d374-ba97-46e6-8782-c56dec8dcc17" && item.id != "ed8e21f6-9757-43d0-b076-8c6e81bb0580" && item.id != "ca214b41-2b73-4585-b172-bf1e546cf6ec") &&

} */}
- {/*

*/}
@@ -100,31 +108,12 @@ export default function SkillChatSheet({ children, onSelect }) {
选择对话
选择一个您想使用的上线NPC或能力
- setKeyword(e.target.value)} />
+ {/* setKeyword(e.target.value)} /> */}
+
- {/* {
- options.length ? options.map((flow, i) => (
-
- {flow.flow_type === 'flow' ? '技能' : 'NPC'}
-
- }
- onClick={() => { onSelect(flow); setOpen(false) }}
- />
- )) :
-
{t('build.empty')}
-
-
- } */}
+
diff --git a/src/components/bs-icons/.DS_Store b/src/components/bs-icons/.DS_Store
new file mode 100644
index 0000000..cdbb4d8
Binary files /dev/null and b/src/components/bs-icons/.DS_Store differ
diff --git a/src/components/bs-icons/del/Del.svg b/src/components/bs-icons/del/Del.svg
index 76aafca..8749d7c 100644
--- a/src/components/bs-icons/del/Del.svg
+++ b/src/components/bs-icons/del/Del.svg
@@ -1,11 +1,11 @@
\ No newline at end of file
diff --git a/src/components/bs-icons/del/index.tsx b/src/components/bs-icons/del/index.tsx
index 9311cb6..d5ba290 100644
--- a/src/components/bs-icons/del/index.tsx
+++ b/src/components/bs-icons/del/index.tsx
@@ -5,5 +5,5 @@ export const DelIcon = forwardRef<
SVGSVGElement & { className: any },
React.PropsWithChildren<{ className?: string }>
>((props, ref) => {
- return
;
+ return
;
});
diff --git a/src/components/bs-icons/down/DropDown.svg b/src/components/bs-icons/down/DropDown.svg
new file mode 100644
index 0000000..520177b
--- /dev/null
+++ b/src/components/bs-icons/down/DropDown.svg
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/components/bs-icons/down/index.tsx b/src/components/bs-icons/down/index.tsx
new file mode 100644
index 0000000..432f3fe
--- /dev/null
+++ b/src/components/bs-icons/down/index.tsx
@@ -0,0 +1,9 @@
+import React, { forwardRef } from "react";
+import { ReactComponent as DropDown } from "./DropDown.svg";
+
+export const DropDownIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>((props, ref) => {
+ return
;
+});
\ No newline at end of file
diff --git a/src/components/bs-icons/en/En.svg b/src/components/bs-icons/en/En.svg
index e7d4ea3..f0cad0e 100644
--- a/src/components/bs-icons/en/En.svg
+++ b/src/components/bs-icons/en/En.svg
@@ -1,3 +1,3 @@
diff --git a/src/components/bs-icons/filter/Filter.svg b/src/components/bs-icons/filter/Filter.svg
new file mode 100644
index 0000000..d4e2e2f
--- /dev/null
+++ b/src/components/bs-icons/filter/Filter.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/components/bs-icons/filter/index.tsx b/src/components/bs-icons/filter/index.tsx
new file mode 100644
index 0000000..de5c392
--- /dev/null
+++ b/src/components/bs-icons/filter/index.tsx
@@ -0,0 +1,9 @@
+import React, { forwardRef } from "react";
+import { ReactComponent as Filter } from "./Filter.svg";
+
+export const FilterIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>((props, ref) => {
+ return
;
+});
\ No newline at end of file
diff --git a/src/components/bs-icons/index.ts b/src/components/bs-icons/index.ts
new file mode 100644
index 0000000..8fcf52f
--- /dev/null
+++ b/src/components/bs-icons/index.ts
@@ -0,0 +1,40 @@
+export { AddToIcon } from './addTo';
+export { ApplicationIcon } from './menu/application';
+export { AssistantIcon } from './assistant';
+export { AvatarIcon } from './avatar';
+export { BookOpenIcon } from './bookOpen';
+export { ClearIcon } from './clear';
+export { DelIcon } from './del';
+export { EnIcon } from './en';
+export { FilterIcon } from './filter';
+export { FormIcon } from './form';
+export { GithubIcon } from './github';
+export { GoIcon } from './go';
+export { KnowledgeIcon } from './knowledge';
+export { LoadIcon } from './loading';
+export { ModelIcon } from './menu/model';
+export { MoonIcon } from './moon';
+export { MoveOneIcon } from './moveOne';
+export { NewApplicationIcon } from './newApplication';
+export { WordIcon } from './office';
+export { PlusIcon } from './plus';
+export { PlusBoxIcon } from './plusBox';
+export { QuestionMarkIcon } from './questionMark';
+export { QuitIcon } from './quit';
+export { SaveIcon } from './save';
+export { SearchIcon } from './search';
+export { SendIcon } from './send';
+export { SettingIcon } from './setting';
+export { SkillIcon } from './skill';
+export { SystemIcon } from './menu/system';
+export { TabIcon } from './tab';
+export { TechnologyIcon } from './menu/technology';
+export { ThunmbIcon } from './thumbs';
+export { TipIcon } from './tip';
+export { ToastIcon } from './toast';
+export { ToolIcon } from './tool';
+export { UploadIcon } from './upload';
+export { UserIcon } from './user';
+export { LogIcon } from './menu/log';
+export { EvaluatingIcon } from './menu/evaluation';
+export { DropDownIcon } from './down'
diff --git a/src/components/bs-icons/application/Application.svg b/src/components/bs-icons/menu/application/Application.svg
similarity index 100%
rename from src/components/bs-icons/application/Application.svg
rename to src/components/bs-icons/menu/application/Application.svg
diff --git a/src/components/bs-icons/application/index.tsx b/src/components/bs-icons/menu/application/index.tsx
similarity index 100%
rename from src/components/bs-icons/application/index.tsx
rename to src/components/bs-icons/menu/application/index.tsx
diff --git a/src/components/bs-icons/menu/evaluation/Evaluation.svg b/src/components/bs-icons/menu/evaluation/Evaluation.svg
new file mode 100644
index 0000000..5775358
--- /dev/null
+++ b/src/components/bs-icons/menu/evaluation/Evaluation.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/components/bs-icons/menu/evaluation/index.tsx b/src/components/bs-icons/menu/evaluation/index.tsx
new file mode 100644
index 0000000..c84605f
--- /dev/null
+++ b/src/components/bs-icons/menu/evaluation/index.tsx
@@ -0,0 +1,9 @@
+import React, { forwardRef } from "react";
+import { ReactComponent as Icon } from "./Evaluation.svg";
+
+export const EvaluatingIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>(({ className, ...props }, ref) => {
+ return
;
+});
\ No newline at end of file
diff --git a/src/components/bs-icons/menu/log/Log.svg b/src/components/bs-icons/menu/log/Log.svg
new file mode 100644
index 0000000..ac0bcf3
--- /dev/null
+++ b/src/components/bs-icons/menu/log/Log.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/components/bs-icons/menu/log/index.tsx b/src/components/bs-icons/menu/log/index.tsx
new file mode 100644
index 0000000..3fa9b18
--- /dev/null
+++ b/src/components/bs-icons/menu/log/index.tsx
@@ -0,0 +1,9 @@
+import React, { forwardRef } from "react";
+import { ReactComponent as Log } from "./Log.svg";
+
+export const LogIcon = forwardRef<
+ SVGSVGElement & { className: any },
+ React.PropsWithChildren<{ className?: string }>
+>(({ className, ...props }, ref) => {
+ return
;
+});
\ No newline at end of file
diff --git a/src/components/bs-icons/model/Model.svg b/src/components/bs-icons/menu/model/Model.svg
similarity index 100%
rename from src/components/bs-icons/model/Model.svg
rename to src/components/bs-icons/menu/model/Model.svg
diff --git a/src/components/bs-icons/model/index.tsx b/src/components/bs-icons/menu/model/index.tsx
similarity index 100%
rename from src/components/bs-icons/model/index.tsx
rename to src/components/bs-icons/menu/model/index.tsx
diff --git a/src/components/bs-icons/system/System.svg b/src/components/bs-icons/menu/system/System.svg
similarity index 100%
rename from src/components/bs-icons/system/System.svg
rename to src/components/bs-icons/menu/system/System.svg
diff --git a/src/components/bs-icons/system/index.tsx b/src/components/bs-icons/menu/system/index.tsx
similarity index 100%
rename from src/components/bs-icons/system/index.tsx
rename to src/components/bs-icons/menu/system/index.tsx
diff --git a/src/components/bs-icons/technology/Technology.svg b/src/components/bs-icons/menu/technology/Technology.svg
similarity index 100%
rename from src/components/bs-icons/technology/Technology.svg
rename to src/components/bs-icons/menu/technology/Technology.svg
diff --git a/src/components/bs-icons/technology/index.tsx b/src/components/bs-icons/menu/technology/index.tsx
similarity index 100%
rename from src/components/bs-icons/technology/index.tsx
rename to src/components/bs-icons/menu/technology/index.tsx
diff --git a/src/components/bs-icons/office/index.tsx b/src/components/bs-icons/office/index.tsx
index 60a88a8..10e6163 100644
--- a/src/components/bs-icons/office/index.tsx
+++ b/src/components/bs-icons/office/index.tsx
@@ -5,6 +5,6 @@ export const WordIcon = forwardRef<
SVGSVGElement & { className: any },
React.PropsWithChildren<{ className?: string }>
>(({ className, ...props }, ref) => {
- const _className = 'transition text-[#43AFD2] ' + (className || '')
+ const _className = 'transition text-gray-950 ' + (className || '')
return
;
});
diff --git a/src/components/bs-icons/plusBox/PlusBox.svg b/src/components/bs-icons/plusBox/PlusBox.svg
index bbf3b3e..117bfcc 100644
--- a/src/components/bs-icons/plusBox/PlusBox.svg
+++ b/src/components/bs-icons/plusBox/PlusBox.svg
@@ -1,10 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/bs-icons/questionMark/index.tsx b/src/components/bs-icons/questionMark/index.tsx
index da07354..afed6f1 100644
--- a/src/components/bs-icons/questionMark/index.tsx
+++ b/src/components/bs-icons/questionMark/index.tsx
@@ -5,6 +5,6 @@ export const QuestionMarkIcon = forwardRef<
SVGSVGElement & { className: any },
React.PropsWithChildren<{ className?: string }>
>(({ className, ...props }, ref) => {
- const _className = 'transition text-gray-950 ' + (className || '')
+ const _className = 'transition text-[#999] ' + (className || '')
return
;
});
diff --git a/src/components/bs-icons/quit/Quit-dark.svg b/src/components/bs-icons/quit/Quit-dark.svg
deleted file mode 100644
index 37c3cc3..0000000
--- a/src/components/bs-icons/quit/Quit-dark.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/src/components/bs-icons/quit/Quit.svg b/src/components/bs-icons/quit/Quit.svg
index 260f02a..6313b64 100644
--- a/src/components/bs-icons/quit/Quit.svg
+++ b/src/components/bs-icons/quit/Quit.svg
@@ -1,8 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/bs-icons/quit/index.tsx b/src/components/bs-icons/quit/index.tsx
index da09bec..bd198cd 100644
--- a/src/components/bs-icons/quit/index.tsx
+++ b/src/components/bs-icons/quit/index.tsx
@@ -1,17 +1,9 @@
import React, { forwardRef } from "react";
import { ReactComponent as Quit } from "./Quit.svg";
-import { ReactComponent as QuitDark } from "./Quit-dark.svg";
export const QuitIcon = forwardRef<
SVGSVGElement & { className: any },
React.PropsWithChildren<{ className?: string }>
->(({className,...props}, ref) => {
- return
;
-});
-
-export const QuitIconDark = forwardRef<
- SVGSVGElement & { className: any },
- React.PropsWithChildren<{ className?: string }>
->(({className,...props}, ref) => {
- return
;
+>(({ className, ...props }, ref) => {
+ return
;
});
\ No newline at end of file
diff --git a/src/components/bs-icons/search/Search.svg b/src/components/bs-icons/search/Search.svg
index 8929c0f..469d30f 100644
--- a/src/components/bs-icons/search/Search.svg
+++ b/src/components/bs-icons/search/Search.svg
@@ -1,8 +1,8 @@
\ No newline at end of file
diff --git a/src/components/bs-icons/thumbs/copy.svg b/src/components/bs-icons/thumbs/copy.svg
index a00df83..dd48ab2 100644
--- a/src/components/bs-icons/thumbs/copy.svg
+++ b/src/components/bs-icons/thumbs/copy.svg
@@ -1,8 +1,8 @@
\ No newline at end of file
diff --git a/src/components/bs-icons/thumbs/copyDark.svg b/src/components/bs-icons/thumbs/copyDark.svg
deleted file mode 100644
index a917cc5..0000000
--- a/src/components/bs-icons/thumbs/copyDark.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/src/components/bs-icons/thumbs/index.tsx b/src/components/bs-icons/thumbs/index.tsx
index eaa613d..fcfc2fe 100644
--- a/src/components/bs-icons/thumbs/index.tsx
+++ b/src/components/bs-icons/thumbs/index.tsx
@@ -1,11 +1,8 @@
import React, { forwardRef } from "react";
import { ReactComponent as copy } from "./copy.svg";
-import { ReactComponent as copyDark } from "./copyDark.svg";
import { ReactComponent as like } from "./like.svg";
-import { ReactComponent as likeDark } from "./likeDark.svg";
import { ReactComponent as unLike } from "./unLike.svg";
-import { ReactComponent as unLikeDark } from "./unLikeDark.svg";
-
+import { cname } from "@/components/bs-ui/utils";
type ThunmbIconType = 'copy' | 'like' | 'unLike' | 'copyDark' | 'likeDark' | 'unLikeDark';
@@ -15,13 +12,10 @@ export const ThunmbIcon = forwardRef<
>((props, ref) => {
const comps = {
'copy': copy,
- 'copyDark': copyDark,
'like': like,
- 'likeDark': likeDark,
'unLike': unLike,
- 'unLikeDark': unLikeDark,
}
const Comp = comps[props.type];
- const _className = 'transition text-gray-400 ' + (props.className || '')
+ const _className = cname('transition text-gray-400 hover:text-gray-500', props.className)
return
;
});
diff --git a/src/components/bs-icons/thumbs/like.svg b/src/components/bs-icons/thumbs/like.svg
index 948999c..01c4599 100644
--- a/src/components/bs-icons/thumbs/like.svg
+++ b/src/components/bs-icons/thumbs/like.svg
@@ -1,15 +1,15 @@