Skip to content

Commit

Permalink
ci(package.json): 使用 @iconify/react 替换 @remixicon/react
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwumm committed Jan 16, 2025
1 parent e3a88a2 commit cb9a901
Show file tree
Hide file tree
Showing 32 changed files with 172 additions and 189 deletions.
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"nameTip":"Please fill in the internationalization field",
"path":"Path",
"icon":"Icon",
"iconTip":"Enter the icon name, for example, ri:home-line",
"redirect":"Redirect"
}
},
Expand Down
1 change: 1 addition & 0 deletions messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"nameTip":"请填写国际化字段",
"path":"路由地址",
"icon":"图标",
"iconTip":"请填写图标名称,如:ri:home-line",
"redirect":"重定向地址"
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"dependencies": {
"@auth/prisma-adapter": "^2.7.4",
"@hookform/resolvers": "^3.9.1",
"@iconify/react": "^5.2.0",
"@internationalized/date": "^3.6.0",
"@nextui-org/react": "^2.6.11",
"@prisma/client": "^6.2.1",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@remixicon/react": "^4.6.0",
"ahooks": "^3.8.4",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
Expand Down
30 changes: 18 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/app/dashboard/components/GithubCommit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-12-20 09:19:01
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-08 14:36:29
* @LastEditTime: 2025-01-16 16:24:55
* @Description: Github 提交日志
*/
'use client';

// 引入中文语言包
import 'dayjs/locale/zh-cn';

import { Icon } from '@iconify/react';
import { Avatar, Chip, cn, Listbox, ListboxItem, Tooltip } from '@nextui-org/react';
import { RiGitCommitLine, RiResetRightLine } from '@remixicon/react';
import { useRequest } from 'ahooks';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
Expand Down Expand Up @@ -50,7 +50,8 @@ export default function GithubCommit() {
{t('dashboard.github-log')}
</Chip>
<Tooltip content={t('dashboard.get-latest')}>
<RiResetRightLine
<Icon
icon="ri:reset-right-line"
className={`h-4 w-4 text-muted-foreground cursor-pointer ${loading ? 'animate-spin' : ''}`}
onClick={() => run()}
/>
Expand All @@ -71,7 +72,7 @@ export default function GithubCommit() {
<ListboxItem key={item.sha} showDivider textValue={item.sha} onPress={() => window.open(item.html_url)}>
<div className="flex flex-col gap-1">
<div className="flex gap-2 items-center">
<RiGitCommitLine />
<Icon icon="ri:git-commit-line" className="h-6 w-6" />
<div className="font-sm font-semibold">{item.commit.message}</div>
</div>
<div className="flex gap-2 items-center">
Expand Down
10 changes: 5 additions & 5 deletions src/app/dashboard/components/JuejinArticle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-12-18 17:04:59
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-08 14:49:28
* @LastEditTime: 2025-01-16 16:28:25
* @Description: 掘金文章列表
*/
'use client';

import { Icon } from '@iconify/react';
import { Chip, cn, Pagination, User } from '@nextui-org/react';
import { RiArticleLine, RiFontSize2, RiTimeLine } from '@remixicon/react';
import { useRequest } from 'ahooks';
import dayjs from 'dayjs';
import { useTranslations } from 'next-intl';
Expand Down Expand Up @@ -75,16 +75,16 @@ export default function JuejinArticle() {
description={
<div className="flex items-center gap-2">
<div className="flex items-center gap-1 text-xs font-medium mt-1">
<RiTimeLine size={14} />
<Icon icon="ri:time-line" className="text-sm" />
{t('dashboard.read')}{get(article_info, 'read_time', '')}
</div>
<div className="flex items-center gap-1 text-xs font-medium mt-1">
<RiArticleLine size={14} />
<Icon icon="ri:article-line" className="text-sm" />
{t('dashboard.published')}
{dayjs(parseInt(get(article_info, 'ctime'), 10) * 1000).format('YYYY-MM-DD HH:mm')}
</div>
<div className="flex items-center gap-1 text-xs font-medium mt-1">
<RiFontSize2 size={14} />
<Icon icon="ri:font-size-2" className="text-sm" />
{t('dashboard.words')}{get(article_info, 'content_count', 0)}
</div>
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/app/dashboard/components/PageViewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-12-18 13:57:51
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-08 14:59:51
* @LastEditTime: 2025-01-16 16:33:18
* @Description: 访问量
*/
import { Icon } from '@iconify/react';
import { cn } from '@nextui-org/react';
import { Card, CardBody, CardFooter, CardHeader } from '@nextui-org/react';
import { RiArrowDownLine, RiArrowUpLine, RiResetRightLine } from '@remixicon/react';
import { useMount, useSetState } from 'ahooks';
import dayjs from 'dayjs';
import { useTranslations } from 'next-intl';
Expand Down Expand Up @@ -84,9 +84,9 @@ export default function PageViewCard() {

setArrow(
random(0, 1) < 0.5 ? (
<RiArrowDownLine key={random(0, 1)} size={16} color="#F5222D" />
<Icon icon="ri:arrow-down-line" key={random(0, 1)} color="#F5222D" className="text-base" />
) : (
<RiArrowUpLine key={random(0, 1)} size={16} color="#52C41A" />
<Icon icon="ri:arrow-up-line" key={random(0, 1)} color="#52C41A" className="text-base" />
),
);
});
Expand All @@ -101,7 +101,8 @@ export default function PageViewCard() {
<CountUp end={sum(chartData.map((v) => v.value))} separator="," />
</div>
</div>
<RiResetRightLine
<Icon
icon="ri:reset-right-line"
className={cn(`h-4 w-4 text-muted-foreground cursor-pointer `, data.loading ? 'animate-spin' : '')}
onClick={() => reset()}
/>
Expand Down
11 changes: 6 additions & 5 deletions src/app/dashboard/components/PaymentNumberCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-12-18 13:57:51
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-08 15:00:13
* @LastEditTime: 2025-01-16 16:34:38
* @Description: 支付笔数
*/
import { Icon } from '@iconify/react';
import { Card, CardBody, CardFooter, CardHeader } from '@nextui-org/react';
import { RiArrowDownLine, RiArrowUpLine, RiResetRightLine } from '@remixicon/react';
import { useMount, useSetState } from 'ahooks';
import dayjs from 'dayjs';
import { useTranslations } from 'next-intl';
Expand Down Expand Up @@ -83,9 +83,9 @@ export default function PaymentNumberCard() {

setArrow(
random(0, 1) < 0.5 ? (
<RiArrowDownLine key={random(0, 1)} size={16} color="#F5222D" />
<Icon icon="ri:arrow-down-line" key={random(0, 1)} color="#F5222D" className="text-base" />
) : (
<RiArrowUpLine key={random(0, 1)} size={16} color="#52C41A" />
<Icon icon="ri:arrow-up-line" key={random(0, 1)} color="#52C41A" className="text-base" />
),
);
});
Expand All @@ -100,7 +100,8 @@ export default function PaymentNumberCard() {
<CountUp end={sum(chartData.map((v) => v.value))} separator="," />
</div>
</div>
<RiResetRightLine
<Icon
icon="ri:reset-right-line"
className={`h-4 w-4 text-muted-foreground cursor-pointer ${data.loading ? 'animate-spin' : ''}`}
onClick={() => reset()}
/>
Expand Down
10 changes: 5 additions & 5 deletions src/app/dashboard/components/SaleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
* @Description: 总销售额卡片
*/
'use client';

import { Icon } from '@iconify/react';
import { Card, CardBody, CardFooter, CardHeader, Divider } from '@nextui-org/react';
import { RiArrowDownLine, RiArrowUpLine, RiResetRightLine } from '@remixicon/react';
import { useMount, useSetState } from 'ahooks';
import { useTranslations } from 'next-intl';
import { ReactNode, useState } from 'react';
Expand Down Expand Up @@ -52,9 +51,9 @@ export default function SaleCard() {
// 创建一个包含随机箭头组件的数组
const randomArrows = Array.from({ length: 3 }).map(() =>
random(0, 1) < 0.5 ? (
<RiArrowDownLine key={random(0, 1)} size={16} color="#F5222D" />
<Icon icon="ri:arrow-down-line" key={random(0, 1)} color="#F5222D" className="text-base" />
) : (
<RiArrowUpLine key={random(0, 1)} size={16} color="#52C41A" />
<Icon icon="ri:arrow-up-line" key={random(0, 1)} color="#52C41A" className="text-base" />
),
);

Expand All @@ -67,7 +66,8 @@ export default function SaleCard() {
<ContentLoading loading={data.loading} />
<CardHeader className="flex flex-row items-center justify-between space-y-0 py-2">
<div className="text-sm font-medium">{t('sales-total')}</div>
<RiResetRightLine
<Icon
icon="ri:reset-right-line"
className={`h-4 w-4 text-muted-foreground cursor-pointer ${data.loading ? 'animate-spin' : ''}`}
onClick={() => initData()}
/>
Expand Down
11 changes: 6 additions & 5 deletions src/app/dashboard/components/SatisfactionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-12-18 13:57:51
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-08 15:06:15
* @LastEditTime: 2025-01-16 16:36:25
* @Description: 客户满意度
*/
import { Icon } from '@iconify/react';
import { Card, CardBody, CardFooter, CardHeader } from '@nextui-org/react';
import { RiArrowDownLine, RiArrowUpLine, RiResetRightLine } from '@remixicon/react';
import { useMount, useSetState } from 'ahooks';
import dayjs from 'dayjs';
import { useTranslations } from 'next-intl';
Expand Down Expand Up @@ -88,9 +88,9 @@ export default function SatisfactionCard() {
// 创建一个包含随机箭头组件的数组
const randomArrows = Array.from({ length: 2 }).map(() =>
random(0, 1) < 0.5 ? (
<RiArrowDownLine key={random(0, 1)} size={16} color="#F5222D" />
<Icon icon="ri:arrow-down-line" key={random(0, 1)} color="#F5222D" className="text-base" />
) : (
<RiArrowUpLine key={random(0, 1)} size={16} color="#52C41A" />
<Icon icon="ri:arrow-up-line" key={random(0, 1)} color="#52C41A" className="text-base" />
),
);

Expand All @@ -108,7 +108,8 @@ export default function SatisfactionCard() {
<CountUp end={data.total} suffix="%" />
</div>
</div>
<RiResetRightLine
<Icon
icon="ri:reset-right-line"
className={`h-4 w-4 text-muted-foreground cursor-pointer ${data.loading ? 'animate-spin' : ''}`}
onClick={() => reset()}
/>
Expand Down
10 changes: 5 additions & 5 deletions src/app/features/captcha/components/DragCaptcha.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-10-11 10:58:33
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-02 17:40:46
* @LastEditTime: 2025-01-16 16:12:27
* @Description: 滑块验证码
*/
import { RiArrowRightDoubleLine, RiCheckboxCircleLine, RiLockLine, RiLockUnlockLine } from '@remixicon/react';
import { Icon } from '@iconify/react';
import { useMount } from 'ahooks';
import dayjs from 'dayjs';
import { FC, type MouseEventHandler, RefObject, useImperativeHandle, useRef, useState } from 'react';
Expand Down Expand Up @@ -202,7 +202,7 @@ const DragCaptcha: FC<DragCaptchaProps> = ({
}}
>
<div className="flex justify-center items-center gap-2" style={{ color: isPassing ? '#fff' : textColor }}>
{isPassing ? <RiLockUnlockLine size={16} /> : <RiLockLine size={16} />}
<Icon icon={isPassing ? 'ri:lock-unlock-line' : 'ri:lock-line'} />
{isPassing ? successText : text}
</div>
</div>
Expand All @@ -220,9 +220,9 @@ const DragCaptcha: FC<DragCaptchaProps> = ({
onMouseDown={dragStart}
>
{isPassing ? (
<RiCheckboxCircleLine size={16} color={completedBg} />
<Icon icon="ri:checkbox-circle-line" color={completedBg} />
) : (
<RiArrowRightDoubleLine size={16} color="#000" />
<Icon icon="ri:arrow-right-double-line" />
)}
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/app/features/captcha/components/PuzzleCaptcha.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-10-14 17:57:23
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-08 15:21:50
* @LastEditTime: 2025-01-16 16:16:10
* @Description: 拼图验证码
*/
import { RiArrowRightDoubleLine, RiResetLeftLine } from '@remixicon/react';
import { Icon } from '@iconify/react';
import { useMount, useSetState } from 'ahooks';
import React, { FC, type MouseEventHandler, ReactNode, RefObject, useImperativeHandle, useRef, useState } from 'react';

Expand Down Expand Up @@ -305,7 +305,7 @@ const PuzzleCaptcha: FC<PuzzleCaptchaProp> = ({
}}
onMouseDown={handleDragStart}
>
<RiArrowRightDoubleLine size={18} color="#000" />
<Icon icon="ri:arrow-right-double-line" />
</div>
</div>
<div className="opacity-65 select-none text-sm dark:text-slate-800" style={{ lineHeight: `${slideHeight}px` }}>
Expand All @@ -314,7 +314,7 @@ const PuzzleCaptcha: FC<PuzzleCaptchaProp> = ({
</div>
{/* 刷新按钮 */}
<div onClick={handleRefresh} className="absolute right-1.5 top-1.5 cursor-pointer">
<RiResetLeftLine color="#fff" />
<Icon icon="ri:reset-left-line" color="#fff" />
</div>
</div>
);
Expand Down
Loading

0 comments on commit cb9a901

Please sign in to comment.