Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/NapNeko/NapCatQQ
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Feb 5, 2025
2 parents 9cc7588 + 593fb13 commit f5dee80
Show file tree
Hide file tree
Showing 53 changed files with 210 additions and 150 deletions.
1 change: 1 addition & 0 deletions napcat.webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@heroui/pagination": "^2.2.9",
"@heroui/popover": "2.3.10",
"@heroui/select": "2.4.10",
"@heroui/skeleton": "^2.2.6",
"@heroui/slider": "2.4.8",
"@heroui/snippet": "2.2.11",
"@heroui/spinner": "2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion napcat.webui/src/components/audio_player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export default function AudioPlayer(props: AudioPlayerProps) {
: 'top-3 -left-8 rounded-l-full bg-opacity-50 backdrop-blur-md'
)}
variant="solid"
color="danger"
color="primary"
size="sm"
onPress={() => setIsCollapsed(!isCollapsed)}
>
Expand Down
2 changes: 1 addition & 1 deletion napcat.webui/src/components/button/add_button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const AddButton: React.FC<AddButtonProps> = (props) => {
>
<DropdownTrigger>
<Button
color="danger"
color="primary"
startContent={<IoAddCircleOutline className="text-2xl" />}
>
新建
Expand Down
2 changes: 1 addition & 1 deletion napcat.webui/src/components/button/save_buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const SaveButtons: React.FC<SaveButtonsProps> = ({
取消更改
</Button>
<Button
color="danger"
color="primary"
isLoading={isSubmitting}
onPress={() => onSubmit()}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const AudioInsert = () => {
<Tooltip content="发送音频">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<IoMic className="text-xl" />
</Button>
</PopoverTrigger>
Expand All @@ -120,7 +120,7 @@ const AudioInsert = () => {
<Tooltip content="上传音频">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -137,7 +137,7 @@ const AudioInsert = () => {
<PopoverTrigger tooltip="输入音频地址">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -154,7 +154,7 @@ const AudioInsert = () => {
placeholder="请输入音频地址"
/>
<Button
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand All @@ -177,7 +177,7 @@ const AudioInsert = () => {
<PopoverTrigger>
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -190,15 +190,15 @@ const AudioInsert = () => {
<PopoverContent className="flex-col gap-2 p-4">
<div className="flex gap-2">
<Button
color={isRecording ? 'danger' : 'danger'}
color={isRecording ? 'primary' : 'primary'}
variant="flat"
onPress={isRecording ? stopRecording : startRecording}
>
{isRecording ? '停止录制' : '开始录制'}
</Button>
{showPreview && audioPreview && (
<Button
color="danger"
color="primary"
variant="flat"
onPress={handleShowPreview}
>
Expand All @@ -212,7 +212,7 @@ const AudioInsert = () => {
className={clsx(
'w-4 h-4 rounded-full',
isRecording
? 'animate-pulse bg-danger-400'
? 'animate-pulse bg-primary-400'
: 'bg-success-400'
)}
></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DiceInsert = () => {
return (
<Tooltip content="发送骰子">
<Button
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const EmojiPicker = ({ onInsertEmoji, onOpenChange }: EmojiPickerProps) => {
<Tooltip content="插入表情">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<MdEmojiEmotions className="text-xl" />
</Button>
</PopoverTrigger>
Expand All @@ -65,7 +65,7 @@ const EmojiPicker = ({ onInsertEmoji, onOpenChange }: EmojiPickerProps) => {
{visibleEmojis.map((emoji) => (
<Button
key={emoji.id}
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const FileInsert = () => {
<Tooltip content="发送文件">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<FaFolder className="text-lg" />
</Button>
</PopoverTrigger>
Expand All @@ -45,7 +45,7 @@ const FileInsert = () => {
<Tooltip content="上传文件">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -62,7 +62,7 @@ const FileInsert = () => {
<PopoverTrigger tooltip="输入文件地址">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -79,7 +79,7 @@ const FileInsert = () => {
placeholder="请输入文件地址"
/>
<Button
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ImageInsert = ({ insertImage, onOpenChange }: ImageInsertProps) => {
<Tooltip content="插入图片">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<MdImage className="text-xl" />
</Button>
</PopoverTrigger>
Expand All @@ -33,7 +33,7 @@ const ImageInsert = ({ insertImage, onOpenChange }: ImageInsertProps) => {
<Tooltip content="上传图片">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -50,7 +50,7 @@ const ImageInsert = ({ insertImage, onOpenChange }: ImageInsertProps) => {
<PopoverTrigger tooltip="输入图片地址">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -67,7 +67,7 @@ const ImageInsert = ({ insertImage, onOpenChange }: ImageInsertProps) => {
placeholder="请输入图片地址"
/>
<Button
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const MusicInsert = () => {
<Tooltip content="发送音乐">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<IoMusicalNotes className="text-xl" />
</Button>
</PopoverTrigger>
Expand Down Expand Up @@ -132,7 +132,7 @@ const MusicInsert = () => {
<Button
fullWidth
size="lg"
color="danger"
color="primary"
variant="flat"
radius="full"
onPress={() => {
Expand Down Expand Up @@ -236,7 +236,7 @@ const MusicInsert = () => {
<Button
fullWidth
size="lg"
color="danger"
color="primary"
variant="flat"
radius="full"
type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ReplyInsert = ({ insertReply }: ReplyInsertProps) => {
<Tooltip content="回复消息">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<BsChatQuoteFill className="text-lg" />
</Button>
</PopoverTrigger>
Expand All @@ -38,7 +38,7 @@ const ReplyInsert = ({ insertReply }: ReplyInsertProps) => {
}}
/>
<Button
color="danger"
color="primary"
variant="flat"
radius="full"
isIconOnly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const RPSInsert = () => {
return (
<Tooltip content="发送猜拳">
<Button
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const VideoInsert = () => {
<Tooltip content="发送视频">
<div className="max-w-fit">
<PopoverTrigger>
<Button color="danger" variant="flat" isIconOnly radius="full">
<Button color="primary" variant="flat" isIconOnly radius="full">
<IoVideocam className="text-xl" />
</Button>
</PopoverTrigger>
Expand All @@ -45,7 +45,7 @@ const VideoInsert = () => {
<Tooltip content="上传视频">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -62,7 +62,7 @@ const VideoInsert = () => {
<PopoverTrigger tooltip="输入视频地址">
<Button
className="text-lg"
color="danger"
color="primary"
isIconOnly
variant="flat"
radius="full"
Expand All @@ -79,7 +79,7 @@ const VideoInsert = () => {
placeholder="请输入视频地址"
/>
<Button
color="danger"
color="primary"
variant="flat"
isIconOnly
radius="full"
Expand Down
2 changes: 1 addition & 1 deletion napcat.webui/src/components/chat_input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const ChatInput = () => {
<DiceInsert />
<RPSInsert />
<Button
color="danger"
color="primary"
onPress={() => {
const messages = getChatMessage()
showStructuredMessage(messages)
Expand Down
4 changes: 2 additions & 2 deletions napcat.webui/src/components/chat_input/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function ChatInputModal() {

return (
<>
<Button onPress={onOpen} color="danger" radius="full" variant="flat">
<Button onPress={onOpen} color="primary" radius="full" variant="flat">
构造聊天消息
</Button>
<Modal
Expand All @@ -36,7 +36,7 @@ export default function ChatInputModal() {
</div>
</ModalBody>
<ModalFooter>
<Button color="danger" onPress={onClose} variant="flat">
<Button color="primary" onPress={onClose} variant="flat">
关闭
</Button>
</ModalFooter>
Expand Down
2 changes: 1 addition & 1 deletion napcat.webui/src/components/display_card/common_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const NetworkDisplayCard = <T extends keyof NetworkType>({
{debug ? '关闭调试' : '开启调试'}
</Button>
<Button
color="danger"
color="primary"
startContent={<MdDeleteForever />}
onPress={handleDelete}
>
Expand Down
2 changes: 1 addition & 1 deletion napcat.webui/src/components/display_network_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const NetworkItemDisplay: React.FC<NetworkItemDisplayProps> = ({
className={clsx(
'bg-opacity-60 shadow-sm md:rounded-3xl',
size === 'md'
? 'col-span-8 md:col-span-2 bg-danger-50 shadow-danger-100'
? 'col-span-8 md:col-span-2 bg-primary-50 shadow-primary-100'
: 'col-span-2 md:col-span-1 bg-warning-100 shadow-warning-200'
)}
shadow="sm"
Expand Down
6 changes: 3 additions & 3 deletions napcat.webui/src/components/file_manage/create_file_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function CreateFileModal({
<ModalHeader>新建</ModalHeader>
<ModalBody>
<div className="flex flex-col gap-4">
<ButtonGroup color="danger">
<ButtonGroup color="primary">
<Button
variant={fileType === 'file' ? 'solid' : 'flat'}
onPress={() => onTypeChange('file')}
Expand All @@ -51,10 +51,10 @@ export default function CreateFileModal({
</div>
</ModalBody>
<ModalFooter>
<Button color="danger" variant="flat" onPress={onClose}>
<Button color="primary" variant="flat" onPress={onClose}>
取消
</Button>
<Button color="danger" onPress={onCreate}>
<Button color="primary" onPress={onCreate}>
创建
</Button>
</ModalFooter>
Expand Down
4 changes: 2 additions & 2 deletions napcat.webui/src/components/file_manage/file_edit_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ export default function FileEditModal({
</div>
</ModalBody>
<ModalFooter>
<Button color="danger" variant="flat" onPress={onClose}>
<Button color="primary" variant="flat" onPress={onClose}>
取消
</Button>
<Button color="danger" onPress={onSave}>
<Button color="primary" onPress={onSave}>
保存
</Button>
</ModalFooter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function FilePreviewModal({
{contentElement}
</ModalBody>
<ModalFooter>
<Button color="danger" variant="flat" onPress={onClose}>
<Button color="primary" variant="flat" onPress={onClose}>
关闭
</Button>
</ModalFooter>
Expand Down
Loading

0 comments on commit f5dee80

Please sign in to comment.