refactor: replace @iconify/tailwind with @egoist/tailwindcss-icons (#1154)

This commit is contained in:
Stephen Zhou 2023-12-16 15:17:57 +08:00 committed by GitHub
parent 9002dce682
commit b50ff968f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 254 additions and 182 deletions

View File

@ -161,8 +161,8 @@
"zustand": "4.4.6"
},
"devDependencies": {
"@egoist/tailwindcss-icons": "1.7.0",
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@iconify/tailwind": "0.1.4",
"@next/bundle-analyzer": "14.0.3",
"@types/async-lock": "1.4.2",
"@types/canvas-confetti": "1.6.4",

View File

@ -394,12 +394,12 @@ dependencies:
version: 4.4.6(@types/react@18.2.38)(immer@10.0.3)(react@18.2.0)
devDependencies:
'@egoist/tailwindcss-icons':
specifier: 1.7.0
version: 1.7.0(tailwindcss@3.3.5)
'@ianvs/prettier-plugin-sort-imports':
specifier: 4.1.1
version: 4.1.1(prettier@3.1.0)
'@iconify/tailwind':
specifier: 0.1.4
version: 0.1.4
'@next/bundle-analyzer':
specifier: 14.0.3
version: 14.0.3
@ -568,6 +568,17 @@ packages:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.20
/@antfu/install-pkg@0.1.1:
resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==}
dependencies:
execa: 5.1.1
find-up: 5.0.0
dev: true
/@antfu/utils@0.7.7:
resolution: {integrity: sha512-gFPqTG7otEJ8uP6wrhDv6mqwGWYZKNvAcCq6u9hOj0c+IKCEsY4L1oC9trPq2SaWIzAfHvqfBDxF591JkMf+kg==}
dev: true
/@anthropic-ai/sdk@0.9.1:
resolution: {integrity: sha512-wa1meQ2WSfoY8Uor3EdrJq0jTiZJoKoSii2ZVWRY1oN4Tlr5s59pADg9T79FTbPe1/se5c3pBeZgJL63wmuoBA==}
dependencies:
@ -1728,6 +1739,17 @@ packages:
resolution: {integrity: sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw==}
dev: false
/@egoist/tailwindcss-icons@1.7.0(tailwindcss@3.3.5):
resolution: {integrity: sha512-KfZgcl8ln1y/BEzB10vyu6v5MgX79wYqgiIW0VvEZnGmaGsl91lJ6kZDS9vh76tMd/cW2MJnOlbxYcxuidwToQ==}
peerDependencies:
tailwindcss: '*'
dependencies:
'@iconify/utils': 2.1.13
tailwindcss: 3.3.5
transitivePeerDependencies:
- supports-color
dev: true
/@emoji-mart/data@1.1.2:
resolution: {integrity: sha512-1HP8BxD2azjqWJvxIaWAMyTySeZY0Osr83ukYjltPVkNXeJvTz7yDrPLBtnrD5uqJ3tg4CcLuuBW09wahqL/fg==}
dev: false
@ -2283,15 +2305,22 @@ packages:
'@iconify/types': 2.0.0
dev: false
/@iconify/tailwind@0.1.4:
resolution: {integrity: sha512-U7RzcU2fkwOfMDsGQ3mtpLIaApSnqb+vgcJJknPPbg8/NF5s7tI1o5otEMfcpnLGk4PbYB8bxmKTz7IJVUlU2Q==}
dependencies:
'@iconify/types': 2.0.0
dev: true
/@iconify/types@2.0.0:
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
/@iconify/utils@2.1.13:
resolution: {integrity: sha512-6uWvJIo715xYRy1KmCCyZYW0YYkLjaojEExoEkxpOHKhi9cyHW8hVKo+m8zrxzNVSqjUx9OuVRa2BWXeXfkp5A==}
dependencies:
'@antfu/install-pkg': 0.1.1
'@antfu/utils': 0.7.7
'@iconify/types': 2.0.0
debug: 4.3.4
kolorist: 1.8.0
local-pkg: 0.4.3
transitivePeerDependencies:
- supports-color
dev: true
/@ioredis/commands@1.2.0:
resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==}
dev: false
@ -6582,6 +6611,21 @@ packages:
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
engines: {node: '>=0.8.x'}
/execa@5.1.1:
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
engines: {node: '>=10'}
dependencies:
cross-spawn: 7.0.3
get-stream: 6.0.1
human-signals: 2.1.0
is-stream: 2.0.1
merge-stream: 2.0.0
npm-run-path: 4.0.1
onetime: 5.1.2
signal-exit: 3.0.7
strip-final-newline: 2.0.0
dev: true
/execa@8.0.1:
resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}
engines: {node: '>=16.17'}
@ -6919,6 +6963,11 @@ packages:
engines: {node: '>=12'}
dev: true
/get-stream@6.0.1:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
dev: true
/get-stream@8.0.1:
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
engines: {node: '>=16'}
@ -7489,6 +7538,11 @@ packages:
- supports-color
dev: false
/human-signals@2.1.0:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
dev: true
/human-signals@5.0.0:
resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
engines: {node: '>=16.17.0'}
@ -7826,6 +7880,11 @@ packages:
call-bind: 1.0.2
dev: true
/is-stream@2.0.1:
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
engines: {node: '>=8'}
dev: true
/is-stream@3.0.0:
resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -8184,6 +8243,10 @@ packages:
engines: {node: '>=6'}
dev: false
/kolorist@1.8.0:
resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
dev: true
/langchain-core@0.0.1:
resolution: {integrity: sha512-0WDRf3acbJ1zG+HeFUrs8H+mKzwjaPOgnAvbj+wmmSHYoszN6jq7978DWFRwL+ghy23s7RFewzlJCC6k9KsnoQ==}
engines: {node: '>=18'}
@ -8630,6 +8693,11 @@ packages:
engines: {node: '>=6.11.5'}
dev: true
/local-pkg@0.4.3:
resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==}
engines: {node: '>=14'}
dev: true
/locate-path@5.0.0:
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
engines: {node: '>=8'}
@ -9613,6 +9681,13 @@ packages:
resolution: {integrity: sha512-5PDmaAsVfnWUgTUbJ3ERwn7u79Z0dYxN9ErxCpVJJqe2RK0PJ3z+iFUxuqjwtlDDegXvtWoxD/3Fzxox7tFGWA==}
dev: false
/npm-run-path@4.0.1:
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
engines: {node: '>=8'}
dependencies:
path-key: 3.1.1
dev: true
/npm-run-path@5.1.0:
resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -11473,6 +11548,11 @@ packages:
engines: {node: '>=4'}
dev: true
/strip-final-newline@2.0.0:
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
engines: {node: '>=6'}
dev: true
/strip-final-newline@3.0.0:
resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
engines: {node: '>=12'}

View File

@ -48,7 +48,7 @@ export default async function Tag({
<Hydrate state={dehydratedState}>
<div className="border rounded-xl px-5 py-6 mb-4 space-y-2 relative bg-zinc-50">
<div className="text-2xl flex items-center font-bold">
<i className="icon-[mingcute--tag-line] mr-1" />
<i className="i-mingcute-tag-line mr-1" />
{params.tag}
</div>
<ParticipateButton tag={params.tag} />

View File

@ -53,7 +53,7 @@ export default async function Topic({
<Hydrate state={dehydratedState}>
<div className="border rounded-xl px-5 py-6 mb-4 space-y-2 relative bg-zinc-50">
<div className="text-2xl flex items-center font-bold">
<i className="icon-[mingcute--tag-line] mr-1" />
<i className="i-mingcute-tag-line mr-1" />
{info?.includeTags[0]}
</div>
<p className="text-zinc-600">{t(info?.description || "")}</p>

View File

@ -20,7 +20,7 @@ async function Home() {
<OriginEntranceButton
connectedContent={
<>
<span className="icon-[mingcute--grid-line] text-xl mr-2 inline-block"></span>
<span className="i-mingcute-grid-line text-xl mr-2 inline-block"></span>
<span>{t("Dashboard")}</span>
</>
}
@ -163,7 +163,7 @@ async function Home() {
<span className="mb-1 sm:mb-3">{t("Explore the xLog way")}</span>
<Link
href="#features"
className="cursor-pointer inline-block icon-[mingcute--down-line] text-3xl"
className="cursor-pointer inline-block i-mingcute-down-line text-3xl"
></Link>
</div>
</div>
@ -318,7 +318,7 @@ async function Home() {
<ul className="mt-14 grid grid-cols-3 sm:grid-cols-5 gap-y-14 gap-x-2">
<Integration />
<li className="flex items-center justify-center">
<i className="icon-[mingcute--more-1-line] text-5xl" />
<i className="i-mingcute-more-1-line text-5xl" />
</li>
</ul>
</div>

View File

@ -574,7 +574,7 @@ const EditorExtraProperties = memo(
onClick={openAdvancedOptions}
>
<span className="inline-flex items-center">
<i className="icon-[mingcute--settings-4-fill] inline-block mr-2" />
<i className="i-mingcute-settings-4-fill inline-block mr-2" />
<span>{t("Advanced Settings")}</span>
</span>
</Button>

View File

@ -164,7 +164,7 @@ export default function EventsPage() {
}
>
{t("Learn more")}{" "}
<i className="icon-[mingcute--right-line] text-xl ml-1" />
<i className="i-mingcute-right-line text-xl ml-1" />
</UniLink>
</div>
</div>

View File

@ -108,19 +108,19 @@ export default function DashboardLayout({
{
href: `/dashboard/${subdomain}`,
isActive: ({ href, pathname }) => href === pathname,
icon: "icon-[mingcute--grid-line]",
icon: "i-mingcute-grid-line",
text: "Dashboard",
},
{
isActive: ({ href, pathname }) => href === pathname,
icon: "icon-[mingcute--add-circle-line]",
icon: "i-mingcute-add-circle-line",
text: "Publishing",
},
{
href: `/dashboard/${subdomain}/posts`,
isActive: ({ href, pathname, searchParams }) =>
href === pathname || searchParams?.get("type") === "post",
icon: "icon-[mingcute--news-line]",
icon: "i-mingcute-news-line",
text: "Posts",
lever: 2,
},
@ -128,7 +128,7 @@ export default function DashboardLayout({
href: `/dashboard/${subdomain}/pages`,
isActive: ({ href, pathname, searchParams }) =>
href === pathname || searchParams?.get("type") === "page",
icon: "icon-[mingcute--file-line]",
icon: "i-mingcute-file-line",
text: "Pages",
lever: 2,
},
@ -136,7 +136,7 @@ export default function DashboardLayout({
href: `/dashboard/${subdomain}/shorts`,
isActive: ({ href, pathname, searchParams }) =>
href === pathname || searchParams?.get("type") === "short",
icon: "icon-[mingcute--ins-line]",
icon: "i-mingcute-ins-line",
text: "Shorts",
lever: 2,
},
@ -144,7 +144,7 @@ export default function DashboardLayout({
href: `/dashboard/${subdomain}/portfolios`,
isActive: ({ href, pathname, searchParams }) =>
href === pathname || searchParams?.get("type") === "portfolio",
icon: "icon-[mingcute--cloud-line]",
icon: "i-mingcute-cloud-line",
text: "Portfolios",
lever: 2,
},
@ -152,7 +152,7 @@ export default function DashboardLayout({
href: `/dashboard/${subdomain}/import`,
isActive: ({ pathname }) =>
!!pathname?.startsWith(`/dashboard/${subdomain}/import`),
icon: "icon-[mingcute--file-import-line]",
icon: "i-mingcute-file-import-line",
text: "Import",
lever: 2,
},
@ -160,50 +160,50 @@ export default function DashboardLayout({
href: `/dashboard/${subdomain}/events`,
isActive: ({ href, pathname }) => href === pathname,
icon: isEventsAllRead
? "icon-[mingcute--flag-4-line]"
: "icon-[mingcute--flag-4-fill]",
? "i-mingcute-flag-4-line"
: "i-mingcute-flag-4-fill",
text: isEventsAllRead ? "Events" : "New Events",
lever: 2,
},
{
isActive: ({ href, pathname }) => href === pathname,
icon: "icon-[mingcute--heartbeat-line]",
icon: "i-mingcute-heartbeat-line",
text: "Interaction",
},
{
onClick: showNotificationModal,
isActive: ({ href, pathname }) => href === pathname,
icon: isAllRead
? "icon-[mingcute--notification-line]"
: "icon-[mingcute--notification-fill]",
? "i-mingcute-notification-line"
: "i-mingcute-notification-fill",
text: isAllRead ? "Notifications" : "Unread notifications",
lever: 2,
},
{
href: `/dashboard/${subdomain}/comments`,
isActive: ({ href, pathname }) => href === pathname,
icon: "icon-[mingcute--comment-line]",
icon: "i-mingcute-comment-line",
text: "Comments",
lever: 2,
},
{
href: `/dashboard/${subdomain}/achievements`,
isActive: ({ href, pathname }) => href === pathname,
icon: "icon-[mingcute--trophy-line]",
icon: "i-mingcute-trophy-line",
text: "Achievements",
lever: 2,
},
{
href: `/dashboard/${subdomain}/tokens`,
isActive: ({ href, pathname }) => href === pathname,
icon: "icon-[mingcute--pig-money-line]",
icon: "i-mingcute-pig-money-line",
text: "Tokens",
},
{
href: `/dashboard/${subdomain}/settings/general`,
isActive: ({ pathname }) =>
!!pathname?.startsWith(`/dashboard/${subdomain}/settings`),
icon: "icon-[mingcute--settings-3-line]",
icon: "i-mingcute-settings-3-line",
text: "Settings",
},
]
@ -293,7 +293,7 @@ export default function DashboardLayout({
href={DISCORD_LINK}
className="space-x-1 text-zinc-500 hover:text-zinc-800 flex w-full h-12 items-center justify-center transition-colors mb-2"
>
<i className="icon-[mingcute--question-line] text-lg" />
<i className="i-mingcute-question-line text-lg" />
{<span>{t("Need help?")}</span>}
</UniLink>
<UniLink
@ -302,7 +302,7 @@ export default function DashboardLayout({
})}
className="space-x-2 border rounded-lg border-slate-200 text-accent hover:scale-105 transition-transform flex w-full h-12 items-center justify-center bg-white drop-shadow-sm"
>
<span className="icon-[mingcute--home-1-line]"></span>
<span className="i-mingcute-home-1-line"></span>
{<span>{t("View Site")}</span>}
</UniLink>
</div>
@ -402,7 +402,7 @@ export default function DashboardLayout({
href={DISCORD_LINK}
className="space-x-1 text-zinc-500 hover:text-zinc-800 flex w-full h-12 items-center justify-center transition-colors mb-2"
>
<i className="icon-[mingcute--question-line] text-lg" />
<i className="i-mingcute-question-line text-lg" />
<span>{t("Need help?")}</span>
</UniLink>
<UniLink
@ -411,7 +411,7 @@ export default function DashboardLayout({
})}
className="space-x-2 border rounded-lg border-slate-200 text-accent hover:scale-105 transition-transform flex w-full h-12 items-center justify-center bg-white drop-shadow-sm"
>
<span className="icon-[mingcute--home-1-line]"></span>
<span className="i-mingcute-home-1-line"></span>
<span>{t("View Site")}</span>
</UniLink>
</div>

View File

@ -38,19 +38,19 @@ export default function SubdomainIndex() {
const statMap = [
{
icon: "icon-[mingcute--news-line]",
icon: "i-mingcute-news-line",
name: "Creation",
value: stat.data?.notesCount ?? "-",
url: `/dashboard/${subdomain}/posts`,
},
{
icon: "icon-[mingcute--comment-line]",
icon: "i-mingcute-comment-line",
name: "Comments",
value: stat.data?.commentsCount ?? "-",
url: `/dashboard/${subdomain}/comments`,
},
{
icon: "icon-[mingcute--heart-line]",
icon: "i-mingcute-heart-line",
name: "Tips1",
value: `${
tips.data?.pages?.[0]?.list
@ -60,7 +60,7 @@ export default function SubdomainIndex() {
url: `/dashboard/${subdomain}/tokens`,
},
{
icon: "icon-[mingcute--thumb-up-2-line]",
icon: "i-mingcute-thumb-up-2-line",
name: "Likes",
value: stat.data?.likesCount ?? "-",
url: getSiteLink({
@ -68,7 +68,7 @@ export default function SubdomainIndex() {
}),
},
{
icon: "icon-[mingcute--user-follow-line]",
icon: "i-mingcute-user-follow-line",
name: "Followers",
value: stat.data?.subscriptionCount ?? "-",
url: getSiteLink({
@ -76,13 +76,13 @@ export default function SubdomainIndex() {
}),
},
{
icon: "icon-[mingcute--trophy-line]",
icon: "i-mingcute-trophy-line",
name: "Achievements",
value: stat.data?.achievements ?? "-",
url: `/dashboard/${subdomain}/achievements`,
},
{
icon: "icon-[mingcute--eye-line]",
icon: "i-mingcute-eye-line",
name: "Viewed",
value: stat.data?.viewsCount ?? "-",
url: getSiteLink({
@ -90,7 +90,7 @@ export default function SubdomainIndex() {
}),
},
{
icon: "icon-[mingcute--history-line]",
icon: "i-mingcute-history-line",
name: "Become xLogger for",
value:
date.dayjs().diff(date.dayjs(stat.data?.createdAt), "day") +

View File

@ -35,7 +35,7 @@ const SortableNavigationItem = ({
type="button"
className="drag-handle cursor-grab -mt-1 text-zinc-400 rounded-lg h-8 w-6 flex items-center justify-center hover:text-zinc-800 hover:bg-zinc-200"
>
<i className="icon-[mingcute--dot-grid-fill]" />
<i className="i-mingcute-dot-grid-fill" />
</button>
</div>
<Input

View File

@ -44,7 +44,7 @@ const SortableNavigationItem = ({
type="button"
className="drag-handle cursor-grab -mt-1 text-zinc-400 rounded-lg h-8 w-6 flex items-center justify-center hover:text-zinc-800 hover:bg-zinc-200"
>
<i className="icon-[mingcute--dot-grid-fill]" />
<i className="i-mingcute-dot-grid-fill" />
</button>
</div>
<Input

View File

@ -66,7 +66,7 @@ export const BlockchainInfo = ({
rel="noreferrer"
href={`${SITE_URL}/about`}
>
<i className="icon-[mingcute--question-line]" />
<i className="i-mingcute-question-line" />
</a>
</span>
<ul className="space-y-2 text-[13px] text-gray-500 overflow-hidden">

View File

@ -226,7 +226,7 @@ export const CommentInput = ({
{({ open }: { open: boolean }) => (
<>
<Popover.Button className="group items-center rounded-md px-2 text-xl text-zinc-400 hover:text-zinc-500 hidden sm:inline-flex">
<span className="icon-[mingcute--emoji-2-line] text-2xl"></span>
<span className="i-mingcute-emoji-2-line text-2xl"></span>
</Popover.Button>
<Popover.Panel className="absolute left-0 top-full z-10">
<EmojiPicker
@ -276,7 +276,7 @@ export const CommentInput = ({
)}
childrenClassName="hidden sm:inline-flex ml-1"
>
<i className="icon-[mingcute--question-line]" />
<i className="i-mingcute-question-line" />
</Tooltip>
</label>
</div>

View File

@ -171,7 +171,7 @@ export const CommentItem = ({
variant="text"
onClick={() => setEditOpen(!editOpen)}
>
<i className="icon-[mingcute--edit-line] mx-1" />{" "}
<i className="i-mingcute-edit-line mx-1" />{" "}
{t(`${editOpen ? "Cancel " : ""}Edit`)}
</Button>
)}
@ -184,7 +184,7 @@ export const CommentItem = ({
onClick={() => setDeleteConfirmModalOpen(true)}
isLoading={deletePage.isLoading}
>
<i className="icon-[mingcute--delete-2-line] mx-1" />{" "}
<i className="i-mingcute-delete-2-line mx-1" />{" "}
{t("Delete")}
</Button>
<DeleteConfirmationModal

View File

@ -117,24 +117,24 @@ export const ConnectButton = ({
const dropdownLinks: HeaderLinkType[] = [
account?.character
? {
icon: "icon-[mingcute--home-1-line]",
icon: "i-mingcute-home-1-line",
label: t("My xLog") || "",
href: getSiteLink({
subdomain: account?.character?.handle || "",
}),
}
: {
icon: "icon-[mingcute--home-1-line]",
icon: "i-mingcute-home-1-line",
label: t("My xLog") || "",
onClick: () => walletMintNewCharacterModal.show(),
},
{
icon: "icon-[mingcute--grid-line]",
icon: "i-mingcute-grid-line",
label: t("Dashboard") || "",
href: `${SITE_URL}/dashboard`,
},
{
icon: "icon-[mingcute--copy-2-line]",
icon: "i-mingcute-copy-2-line",
label: t(copyLabelDisplay) || "",
onClick: (e) => {
e.preventDefault()
@ -144,7 +144,7 @@ export const ConnectButton = ({
...(account?.type === "wallet"
? [
{
icon: "icon-[mingcute--seal-line]",
icon: "i-mingcute-seal-line",
label: (
<>
{t("Operator Sign")} (
@ -165,7 +165,7 @@ export const ConnectButton = ({
},
},
{
icon: "icon-[mingcute--currency-euro-line]",
icon: "i-mingcute-currency-euro-line",
label: (
<span className={InsufficientBalance ? "text-red-400" : ""}>
{balance?.formatted.replace(/\.(\d{5})\d*$/, ".$1") ||
@ -176,20 +176,20 @@ export const ConnectButton = ({
onClick: csbDetailModal.show,
},
{
icon: "icon-[mingcute--repeat-line]",
icon: "i-mingcute-repeat-line",
label: t("Switch Characters") || "",
onClick: selectCharactersModal.show,
},
]
: [
{
icon: "icon-[mingcute--vip-2-line]",
icon: "i-mingcute-vip-2-line",
label: t("Upgrade to Wallet") || "",
onClick: upgradeAccountModal.show,
},
]),
{
icon: "icon-[mingcute--exit-line]",
icon: "i-mingcute-exit-line",
label: t("Disconnect") || "",
onClick: disconnect,
},
@ -197,22 +197,22 @@ export const ConnectButton = ({
const addDropdownLinks: HeaderLinkType[] = [
{
icon: "icon-[mingcute--news-line]",
icon: "i-mingcute-news-line",
label: t("New Post") || "",
href: `${SITE_URL}/dashboard/${account?.character?.handle}/editor?type=post`,
},
{
icon: "icon-[mingcute--file-line]",
icon: "i-mingcute-file-line",
label: t("New Page") || "",
href: `${SITE_URL}/dashboard/${account?.character?.handle}/editor?type=page`,
},
{
icon: "icon-[mingcute--ins-line]",
icon: "i-mingcute-ins-line",
label: t("New Short") || "",
href: `${SITE_URL}/dashboard/${account?.character?.handle}/editor?type=short`,
},
{
icon: "icon-[mingcute--cloud-line]",
icon: "i-mingcute-cloud-line",
label: t("New Portfolio") || "",
href: `${SITE_URL}/dashboard/${account?.character?.handle}/editor?type=portfolio`,
},
@ -356,7 +356,7 @@ export const ConnectButton = ({
</span>
)}
</div>
<i className="icon-[mingcute--down-line] text-xl ml-[2px]" />
<i className="i-mingcute-down-line text-xl ml-[2px]" />
</>
)}
</button>

View File

@ -103,7 +103,7 @@ const ThemeSwitcher = () => {
buildThemeTransition(e, "light")
}}
>
<i className="icon-[mingcute--sun-line]" />
<i className="i-mingcute-sun-line" />
</button>
<button
aria-label="Switch to system theme"
@ -113,7 +113,7 @@ const ThemeSwitcher = () => {
buildThemeTransition(e, "system")
}}
>
<i className="icon-[mingcute--computer-line]" />
<i className="i-mingcute-computer-line" />
</button>
<button
aria-label="Switch to dark theme"
@ -123,7 +123,7 @@ const ThemeSwitcher = () => {
buildThemeTransition(e, "dark")
}}
>
<i className="icon-[mingcute--moon-line]" />
<i className="i-mingcute-moon-line" />
</button>
</div>
)

View File

@ -115,18 +115,18 @@ export const FollowingButton = ({
{subscription.data ? (
<>
<span className="group-hover:hidden inline-flex items-center">
<span className="icon-[mingcute--user-follow-fill] inline-block sm:mr-2"></span>{" "}
<span className="i-mingcute-user-follow-fill inline-block sm:mr-2"></span>{" "}
<span className="hidden sm:inline">{t("Following")}</span>
</span>
<span className="hidden group-hover:inline-flex items-center">
<span className="icon-[mingcute--user-remove-fill] inline-block sm:mr-2"></span>{" "}
<span className="i-mingcute-user-remove-fill inline-block sm:mr-2"></span>{" "}
<span className="hidden sm:inline">{t("Unfollow")}</span>
</span>
</>
) : (
<span className="inline-flex items-center">
{!isLoading && (
<span className="icon-[mingcute--user-add-fill] inline-block sm:mr-2"></span>
<span className="i-mingcute-user-add-fill inline-block sm:mr-2"></span>
)}{" "}
<span className="hidden sm:inline">{t("Follow")}</span>
</span>

View File

@ -20,7 +20,7 @@ export function LanguageSwitch() {
<Menu
placement="top"
target={
<button className="inline-block icon-[mingcute--translate-2-line] text-2xl"></button>
<button className="inline-block i-mingcute-translate-2-line text-2xl"></button>
}
dropdown={
<>
@ -36,7 +36,7 @@ export function LanguageSwitch() {
>
<span>{nameMap[lo]}</span>
{locale === lo && (
<span className="ml-2 icon-[mingcute--check-line]"></span>
<span className="ml-2 i-mingcute-check-line"></span>
)}
</Menu.Item>
))}

View File

@ -33,7 +33,7 @@ export const PatronButton = ({
>
<span className="inline-flex items-center">
<i className="text-red-400 text-xl inline-flex items-center">
<i className="icon-[mingcute--heart-fill] inline-block" />
<i className="i-mingcute-heart-fill inline-block" />
</i>
<span className="text-zinc-500 ml-1">{t("Patron")}</span>
</span>

View File

@ -35,7 +35,7 @@ export const usePatronModal = () => {
title: (
<span className="inline-flex items-center justify-center w-full space-x-1">
<span className="text-red-500 flex w-6 h-6 -mb-[1px]">
<i className="icon-[mingcute--heart-fill] text-2xl -mb-[1px]" />
<i className="i-mingcute-heart-fill text-2xl -mb-[1px]" />
</span>
<span className="truncate">{title}</span>
</span>
@ -257,7 +257,7 @@ const PatronModal = ({
</div>
<div className="text-zinc-500 text-xs space-y-1 mt-2">
<p className="flex items-center justify-center">
<i className="icon-[mingcute--question-line] mr-1 text-sm" />
<i className="i-mingcute-question-line mr-1 text-sm" />
<UniLink href={MIRA_LINK}>
{t("What is MIRA? Where can I get some?")}
</UniLink>

View File

@ -95,7 +95,7 @@ const Card = ({
>
{comment && (
<div className="font-medium text-zinc-700 line-clamp-2">
<i className="icon-[mingcute--comment-fill] mr-2" />
<i className="i-mingcute-comment-fill mr-2" />
{comment}
</div>
)}
@ -158,7 +158,7 @@ const Card = ({
</Tooltip>
{!!post.stat?.portfolio?.videoViewsCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--youtube-line] mr-[2px] text-base" />
<i className="i-mingcute-youtube-line mr-[2px] text-base" />
<FormattedNumber
value={post.stat.portfolio.videoViewsCount}
/>
@ -166,7 +166,7 @@ const Card = ({
)}
{!!post.stat?.portfolio?.audoListensCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--headphone-line] mr-[2px] text-base" />
<i className="i-mingcute-headphone-line mr-[2px] text-base" />
<FormattedNumber
value={post.stat.portfolio.audoListensCount}
/>
@ -174,7 +174,7 @@ const Card = ({
)}
{!!post.stat?.portfolio?.projectStarsCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--star-line] mr-[2px] text-base" />
<i className="i-mingcute-star-line mr-[2px] text-base" />
<FormattedNumber
value={post.stat.portfolio.projectStarsCount}
/>
@ -182,7 +182,7 @@ const Card = ({
)}
{!!post.stat?.portfolio?.textViewsCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--eye-line] mr-[2px] text-base" />
<i className="i-mingcute-eye-line mr-[2px] text-base" />
<FormattedNumber
value={post.stat.portfolio.textViewsCount}
/>
@ -190,7 +190,7 @@ const Card = ({
)}
{!!post.stat?.portfolio?.commentsCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--comment-line] mr-[2px] text-base" />
<i className="i-mingcute-comment-line mr-[2px] text-base" />
<FormattedNumber
value={post.stat.portfolio.commentsCount}
/>
@ -207,25 +207,25 @@ const Card = ({
router.push(`/tag/${post.metadata?.content?.tags?.[1]}`)
}}
>
<i className="icon-[mingcute--tag-line] mr-[2px]" />
<i className="i-mingcute-tag-line mr-[2px]" />
{post.metadata?.content?.tags?.[1]}
</span>
)}
{!isShort && !!post.stat?.viewDetailCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--eye-line] mr-[2px] text-base" />
<i className="i-mingcute-eye-line mr-[2px] text-base" />
<FormattedNumber value={post.stat?.viewDetailCount} />
</span>
)}
{!!post.stat?.commentsCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--comment-line] mr-[2px] text-base" />
<i className="i-mingcute-comment-line mr-[2px] text-base" />
<FormattedNumber value={post.stat.commentsCount} />
</span>
)}
{!post.stat?.commentsCount && (
<span className="xlog-post-word-count sm:inline-flex items-center hidden">
<i className="icon-[mingcute--sandglass-line] mr-[2px] text-sm" />
<i className="i-mingcute-sandglass-line mr-[2px] text-sm" />
<span
style={{
wordSpacing: "-.2ch",
@ -282,13 +282,13 @@ const Card = ({
<span className="xlog-post-meta text-zinc-400 flex items-center text-[13px] truncate space-x-2 !ml-2">
{!!post.stat?.likesCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--thumb-up-2-line] mr-[2px] text-base" />
<i className="i-mingcute-thumb-up-2-line mr-[2px] text-base" />
<FormattedNumber value={post.stat?.likesCount} />
</span>
)}
{!!post.stat?.commentsCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--comment-line] mr-[2px] text-base" />
<i className="i-mingcute-comment-line mr-[2px] text-base" />
<FormattedNumber value={post.stat?.commentsCount} />
</span>
)}
@ -324,7 +324,7 @@ const Card = ({
</div>
{isPinned && (
<span className="absolute top-2 right-2 text-xs border transition-colors text-zinc-500 inline-flex items-center bg-zinc-100 rounded-full px-2 py-[1.5px]">
<i className="icon-[mingcute--pin-2-fill] mr-1" />
<i className="i-mingcute-pin-2-fill mr-1" />
{t("Pinned")}
</span>
)}

View File

@ -45,9 +45,7 @@ export const ReactionComment = ({
>
{(() => {
const inner = (
<i
className={cn("icon-[mingcute--comment-fill]", "text-[33px]")}
/>
<i className={cn("i-mingcute-comment-fill", "text-[33px]")} />
)
return (
<Tooltip label={t("Comments")} placement="right">

View File

@ -162,7 +162,7 @@ export const ReactionLike = ({
const inner = (
<i
className={cn(
"icon-[mingcute--thumb-up-2-fill]",
"i-mingcute-thumb-up-2-fill",
size === "sm"
? "text-base"
: vertical

View File

@ -129,7 +129,7 @@ export const ReactionMint = ({
const inner = (
<i
className={cn(
"icon-[mingcute--magic-1-fill]",
"i-mingcute-magic-1-fill",
size === "sm"
? "text-base"
: vertical

View File

@ -60,7 +60,7 @@ const shareList = [
{
name: "Copy",
icon: <i className="icon-[mingcute--copy-fill]" />,
icon: <i className="i-mingcute-copy-fill" />,
onClick: (data: ShareData) => {
navigator.clipboard.writeText(data.url)
toast.success("Copied to clipboard", {
@ -113,7 +113,7 @@ export const ReactionShare: FC<{
const inner = (
<i
className={cn(
"icon-[mingcute--share-forward-fill]",
"i-mingcute-share-forward-fill",
size === "sm"
? "text-base"
: vertical

View File

@ -90,7 +90,7 @@ export const ReactionTip = ({
const inner = (
<i
className={cn(
"icon-[mingcute--heart-fill]",
"i-mingcute-heart-fill",
vertical ? "text-[33px]" : "text-[38px]",
)}
/>

View File

@ -35,7 +35,7 @@ export const SearchInput = ({
className="absolute left-0 top-1/2 -translate-y-1/2 text-2xl text-zinc-500 h-11 ml-4 flex items-center justify-center cursor-pointer"
onClick={handleSubmit}
>
<i className="icon-[mingcute--search-line] block" />
<i className="i-mingcute-search-line block" />
</div>
<input
id="content"

View File

@ -11,11 +11,11 @@ const icons: {
} = {
"xLog contributor": {
bg: "bg-zinc-700 text-white",
icon: "icon-[mingcute--terminal-line]",
icon: "i-mingcute-terminal-line",
},
Organization: {
bg: "bg-sky-700 text-white",
icon: "icon-[mingcute--building-1-line]",
icon: "i-mingcute-building-1-line",
},
}

View File

@ -244,9 +244,9 @@ export default function DualColumnEditor({
onClick={() => setIsRendering(!isRendering)}
>
{isRendering ? (
<i className="icon-[mingcute--right-line] text-2xl inline-block w-6 h-6" />
<i className="i-mingcute-right-line text-2xl inline-block w-6 h-6" />
) : (
<i className="icon-[mingcute--left-line] text-2xl inline-block w-6 h-6" />
<i className="i-mingcute-left-line text-2xl inline-block w-6 h-6" />
)}
</div>
</div>

View File

@ -44,9 +44,9 @@ export const OptionsButton = ({
onClick={() => renderPage(!isRendering)}
>
{isRendering ? (
<i className="icon-[mingcute--eye-close-line] text-xl inline-block w-5 h-5" />
<i className="i-mingcute-eye-close-line text-xl inline-block w-5 h-5" />
) : (
<i className="icon-[mingcute--eye-2-line] text-xl inline-block w-5 h-5" />
<i className="i-mingcute-eye-2-line text-xl inline-block w-5 h-5" />
)}
</div>
<Popover className="relative">
@ -60,7 +60,7 @@ export const OptionsButton = ({
// }}
>
<div className="bg-accent rounded-full cursor-pointer text-white w-6 h-6 flex justify-center items-center">
<i className="icon-[mingcute--settings-6-line] text-xl inline-block w-5 h-5" />
<i className="i-mingcute-settings-6-line text-xl inline-block w-5 h-5" />
</div>
</Popover.Button>
<Transition
@ -88,9 +88,9 @@ export const OptionsButton = ({
<Menu.Button>
<div className="bg-accent rounded-full cursor-pointer text-white w-6 h-6 flex items-center justify-center">
{open ? (
<i className="icon-[mingcute--send-fill] text-2xl inline-block w-5 h-5" />
<i className="i-mingcute-send-fill text-2xl inline-block w-5 h-5" />
) : (
<i className="icon-[mingcute--send-line] text-2xl inline-block w-5 h-5" />
<i className="i-mingcute-send-line text-2xl inline-block w-5 h-5" />
)}
</div>
</Menu.Button>

View File

@ -281,7 +281,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
router.push(`/dashboard/${subdomain}/editor?type=${type}`)
}
>
<span className="icon-[mingcute--add-line] inline-block"></span>
<span className="i-mingcute-add-line inline-block"></span>
<span>
{t(`New ${type.charAt(0).toUpperCase() + type.slice(1)}`)}
</span>
@ -293,7 +293,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
placement="bottom"
>
<Button className={cn(`space-x-2`)} onClick={importFile}>
<span className="icon-[mingcute--file-import-line] inline-block"></span>
<span className="i-mingcute-file-import-line inline-block"></span>
<span>{t("Import")}</span>
</Button>
</Tooltip>
@ -385,12 +385,12 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
<>
{!!page.metadata?.content?.tags?.[1] && (
<span className="xlog-post-tags border transition-colors text-zinc-500 inline-flex items-center bg-zinc-100 rounded-full px-2 py-[1.5px] truncate text-xs sm:text-[13px] mr-2">
<i className="icon-[mingcute--tag-line] mr-[2px]" />
<i className="i-mingcute-tag-line mr-[2px]" />
{page.metadata?.content?.tags?.[1]}
</span>
)}
<span className="xlog-post-word-count sm:inline-flex items-center hidden mr-2">
<i className="icon-[mingcute--time-line] mr-[2px]" />
<i className="i-mingcute-time-line mr-[2px]" />
<span
style={{
wordSpacing: "-.2ch",
@ -401,7 +401,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
</span>
{!!page.stat?.viewDetailCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--eye-line] mr-[2px]" />
<i className="i-mingcute-eye-line mr-[2px]" />
<span>{page.stat?.viewDetailCount}</span>
</span>
)}
@ -424,7 +424,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
<>
<span className="mx-2">·</span>
<span>
<i className="icon-[mingcute--pin-2-fill] translate-y-[18%]" />{" "}
<i className="i-mingcute-pin-2-fill translate-y-[18%]" />{" "}
{t("Pinned")}
</span>
</>
@ -470,8 +470,8 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
batchSelected.includes(
page.noteId || page.draftKey || 0,
)
? "icon-[mingcute--check-fill]"
: "icon-[mingcute--add-line]"
? "i-mingcute-check-fill"
: "i-mingcute-add-line"
} text-lg`}
/>
</button>
@ -490,7 +490,7 @@ export const PagesManager = ({ type }: { type: NoteType }) => {
e.stopPropagation()
}}
>
<i className="icon-[mingcute--more-1-line] text-2xl" />
<i className="i-mingcute-more-1-line text-2xl" />
</button>
</Menu.Button>

View File

@ -91,21 +91,19 @@ export const PagesManagerMenu = ({
const items: Item[] = [
{
text: "Edit",
icon: <span className="icon-[mingcute--edit-line] inline-block"></span>,
icon: <span className="i-mingcute-edit-line inline-block"></span>,
onClick() {
router.push(editLink)
},
},
{
text: pinPage.isPinned ? "Unpin" : "Pin",
icon: <span className="icon-[mingcute--pin-2-line] inline-block"></span>,
icon: <span className="i-mingcute-pin-2-line inline-block"></span>,
onClick: pinPage.togglePin,
},
{
text: "Convert to " + (type === "post" ? "Page" : "Post"),
icon: (
<span className="icon-[mingcute--transfer-3-line] inline-block"></span>
),
icon: <span className="i-mingcute-transfer-3-line inline-block"></span>,
onClick() {
const toastId = toast.loading("Converting...")
@ -135,7 +133,7 @@ export const PagesManagerMenu = ({
},
{
text: "Preview",
icon: <span className="icon-[mingcute--eye-line] inline-block"></span>,
icon: <span className="i-mingcute-eye-line inline-block"></span>,
onClick() {
const slug = getNoteSlugFromNote(page)
if (!slug) return
@ -144,9 +142,7 @@ export const PagesManagerMenu = ({
},
{
text: "Share to Twitter",
icon: (
<span className="icon-[mingcute--twitter-line] inline-block"></span>
),
icon: <span className="i-mingcute-twitter-line inline-block"></span>,
onClick() {
if (site.data) {
const twitterShareUrl = getTwitterShareUrl({
@ -160,9 +156,7 @@ export const PagesManagerMenu = ({
},
{
text: "Delete",
icon: (
<span className="icon-[mingcute--delete-2-line] inline-block"></span>
),
icon: <span className="i-mingcute-delete-2-line inline-block"></span>,
onClick() {
setDeleteConfirmModalOpen(true)
},

View File

@ -59,7 +59,7 @@ export const PublishButton = ({
isDisabled={isSaving}
className="!rounded-r-full"
>
<i className="icon-[mingcute--down-line]" />
<i className="i-mingcute-down-line" />
</Button>
}
dropdown={
@ -68,7 +68,7 @@ export const PublishButton = ({
className="flex w-full h-8 hover:bg-zinc-100 items-center px-5"
onClick={() => window.open(twitterShareUrl)}
>
<i className="icon-[mingcute--twitter-line] mr-1"></i>
<i className="i-mingcute-twitter-line mr-1"></i>
{t("Share to Twitter")}
</button>
{isModified && (
@ -76,7 +76,7 @@ export const PublishButton = ({
className="flex w-full h-8 hover:bg-zinc-100 items-center px-5"
onClick={discardChanges}
>
<i className="icon-[mingcute--delete-back-line] mr-1"></i>
<i className="i-mingcute-delete-back-line mr-1"></i>
{t("Discard Changes")}
</button>
)}
@ -84,7 +84,7 @@ export const PublishButton = ({
className="flex w-full h-8 hover:bg-zinc-100 items-center px-5"
onClick={() => setDeleteConfirmModalOpen(true)}
>
<i className="icon-[mingcute--delete-2-line] mr-1"></i>
<i className="i-mingcute-delete-2-line mr-1"></i>
{t("Delete")}
</button>
</div>

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const AlignCenter: ICommand = {
name: "align center",
label: "Align Center",
icon: "icon-[mingcute--align-center-line]",
icon: "i-mingcute-align-center-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: ":p[", append: "]{.center}" })
},

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const AlignRight: ICommand = {
name: "align right",
label: "Align Right",
icon: "icon-[mingcute--align-right-line]",
icon: "i-mingcute-align-right-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: ":p[", append: "]{.right}" })
},

View File

@ -9,7 +9,7 @@ const action = (view: EditorView) => {
export const Bold: ICommand = {
name: "bold",
label: "Bold",
icon: "icon-[mingcute--bold-line]",
icon: "i-mingcute-bold-line",
execute({ view }) {
action(view)
},

View File

@ -53,7 +53,7 @@ const uploadResources = async (text: string) => {
export const Cloud: ICommand = {
name: "cloud",
label: "Upload All Images to IPFS",
icon: "icon-[mingcute--upload-3-line]",
icon: "i-mingcute-upload-3-line",
execute: async ({ view }) => {
const docJson = view.state.doc.toJSON()
const newDocJson = await Promise.all(

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const Code: ICommand = {
name: "code",
label: "Inline Code",
icon: "icon-[mingcute--code-line]",
icon: "i-mingcute-code-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "`", append: "`" })
},

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const CodeBlock: ICommand = {
name: "codeblock",
label: "Code Block",
icon: "icon-[mingcute--web-line]",
icon: "i-mingcute-web-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "```\n", append: "\n```" })
},

View File

@ -5,7 +5,7 @@ import { ICommand, wrapExecute } from "."
export const Emoji: ICommand<string> = {
name: "emoji",
label: "Emoji",
icon: "icon-[mingcute--emoji-2-line]",
icon: "i-mingcute-emoji-2-line",
execute: ({ view, payload }) => {
wrapExecute({ view, prepend: payload || "", append: "" })
},

View File

@ -3,7 +3,7 @@ import { ICommand } from "."
export const Focus: ICommand = {
name: "focus",
label: "Toggle Focus Mode",
icon: "icon-[mingcute--fullscreen-line]",
icon: "i-mingcute-fullscreen-line",
execute: () => {
let elem = document.getElementById("dashboard-main")
if (!elem) {

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const Formula: ICommand = {
name: "formula",
label: "Formula",
icon: "icon-[mingcute--formula-line]",
icon: "i-mingcute-formula-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "$$ ", append: " $$" })
},

View File

@ -3,7 +3,7 @@ import { ICommand, prependExecute } from "."
export const Heading: ICommand = {
name: "heading",
label: "Heading",
icon: "icon-[mingcute--heading-2-line]",
icon: "i-mingcute-heading-2-line",
execute: ({ view }) => {
prependExecute({ view, prepend: "## " })
},

View File

@ -5,7 +5,7 @@ import { ICommand } from "."
export const Help: ICommand = {
name: "help",
label: "Help: Markdown syntax and components used by xLog",
icon: "icon-[mingcute--question-line]",
icon: "i-mingcute-question-line",
execute: ({ view }) => {
window.open(
`${getSiteLink({

View File

@ -9,7 +9,7 @@ const action = (view: EditorView) => {
export const Italic: ICommand = {
name: "italic",
label: "Italic",
icon: "icon-[mingcute--italic-line]",
icon: "i-mingcute-italic-line",
execute({ view }) {
action(view)
},

View File

@ -9,7 +9,7 @@ const action = (view: EditorView) => {
export const Link: ICommand = {
name: "link",
label: "Link",
icon: "icon-[mingcute--link-2-line]",
icon: "i-mingcute-link-2-line",
execute({ view }) {
action(view)
},

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const ListOrdered: ICommand = {
name: "list-ordered",
label: "Ordered List",
icon: "icon-[mingcute--list-ordered-line]",
icon: "i-mingcute-list-ordered-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "1. ", append: "\n" })
},

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const ListUnordered: ICommand = {
name: "list-unordered",
label: "Unordered List",
icon: "icon-[mingcute--list-check-line]",
icon: "i-mingcute-list-check-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "- ", append: "\n" })
},

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const Mention: ICommand = {
name: "mention",
label: "Mention",
icon: "icon-[mingcute--at-line]",
icon: "i-mingcute-at-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "@", append: "" })
},

View File

@ -101,7 +101,7 @@ export async function editorUpload(file: File, view: EditorView) {
export const Multimedia: ICommand = {
name: "upload-multimedia",
label: "Upload Image, Audio or Video",
icon: "icon-[mingcute--photo-album-line]",
icon: "i-mingcute-photo-album-line",
execute: ({ view }) => {
const input = document.createElement("input")
input.type = "file"

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const Quote: ICommand = {
name: "quote",
label: "Quote",
icon: "icon-[mingcute--quote-left-fill]",
icon: "i-mingcute-quote-left-fill",
execute: ({ view }) => {
wrapExecute({ view, prepend: "> ", append: "\n" })
},

View File

@ -3,7 +3,7 @@ import { ICommand, wrapExecute } from "."
export const Strikethrough: ICommand = {
name: "strikethrough",
label: "Strikethrough",
icon: "icon-[mingcute--strikethrough-line]",
icon: "i-mingcute-strikethrough-line",
execute: ({ view }) => {
wrapExecute({ view, prepend: "~~", append: "~~" })
},

View File

@ -9,7 +9,7 @@ const action = (view: EditorView) => {
export const Underline: ICommand = {
name: "underline",
label: "Underline",
icon: "icon-[mingcute--underline-line]",
icon: "i-mingcute-underline-line",
execute: ({ view }) => {
action(view)
},

View File

@ -166,7 +166,7 @@ export const HomeFeed = ({ type }: { type?: FeedType }) => {
<div className="space-y-10">
{hasFiltering && (
<div className="flex items-center text-zinc-500">
<i className="icon-[mingcute--sparkles-line] mr-2 text-lg" />
<i className="i-mingcute-sparkles-line mr-2 text-lg" />
<span className="mr-1 cursor-default">
{t("Enable AI Filtering")}
</span>
@ -175,7 +175,7 @@ export const HomeFeed = ({ type }: { type?: FeedType }) => {
"Filter out possible low-quality content based on AI ratings",
)}
>
<i className="icon-[mingcute--question-line]" />
<i className="i-mingcute-question-line" />
</Tooltip>
<Switch
checked={aiFiltering}

View File

@ -61,13 +61,13 @@ export default function PostCover({
id={`swiper-button-prev-${uniqueKey}`}
className="swiper-button left-2"
>
<i className="icon-[mingcute--left-fill]" />
<i className="i-mingcute-left-fill" />
</div>
<div
id={`swiper-button-next-${uniqueKey}`}
className="swiper-button right-2"
>
<i className="icon-[mingcute--right-fill]" />
<i className="i-mingcute-right-fill" />
</div>
</>
) : images?.length === 1 ? (

View File

@ -37,7 +37,7 @@ export default function PostModal({
}}
>
<UniLink className="block" href={window.location.href} target="_blank">
<i className="icon-[mingcute--expand-player-line]" />
<i className="i-mingcute-expand-player-line" />
</UniLink>
<UniLink
className="block"
@ -46,7 +46,7 @@ export default function PostModal({
})}
target="_blank"
>
<i className="icon-[mingcute--user-3-line]" />
<i className="i-mingcute-user-3-line" />
</UniLink>
</div>
<div className="overflow-hidden rounded-xl flex flex-col">{children}</div>

View File

@ -21,7 +21,7 @@ export default async function PromotionLinks({
subdomain: "xlog",
})}/xlog-rss`}
>
<span className="inline-block icon-[mingcute--rss-2-fill] text-2xl"></span>
<span className="inline-block i-mingcute-rss-2-fill text-2xl"></span>
</UniLink>
<Tooltip
className="z-10 bg-white"
@ -45,7 +45,7 @@ export default async function PromotionLinks({
className="flex-1 flex justify-center text-[#181717]"
href={GITHUB_LINK}
>
<span className="inline-block icon-[mingcute--github-fill] text-2xl"></span>
<span className="inline-block i-mingcute-github-fill text-2xl"></span>
</UniLink>
)}
{DISCORD_LINK && (
@ -53,7 +53,7 @@ export default async function PromotionLinks({
className="flex-1 flex justify-center text-[#7289da]"
href={DISCORD_LINK}
>
<span className="inline-block icon-[mingcute--discord-fill] text-2xl"></span>
<span className="inline-block i-mingcute-discord-fill text-2xl"></span>
</UniLink>
)}
{TWITTER_LINK && (
@ -61,7 +61,7 @@ export default async function PromotionLinks({
className="flex-1 flex justify-center text-[#1DA1F2]"
href={TWITTER_LINK}
>
<span className="inline-block icon-[mingcute--twitter-fill] text-2xl"></span>
<span className="inline-block i-mingcute-twitter-fill text-2xl"></span>
</UniLink>
)}
</div>

View File

@ -10,7 +10,7 @@ export const BlockchainIcon = ({ className }: { className?: string }) => {
"xlog-site-blockchain-icon text-green-600 inline-flex items-center",
)}
>
<i className="icon-[mingcute--safety-certificate-line] text-lg max-w-full max-h-full inline-block" />
<i className="i-mingcute-safety-certificate-line text-lg max-w-full max-h-full inline-block" />
</span>
)
}

View File

@ -36,7 +36,7 @@ export const BackToTopFAB = () => {
}}
className="xlog-back-to-top"
>
<i className="icon-[mingcute--arow-to-up-line]"></i>
<i className="i-mingcute-arow-to-up-line"></i>
</FABBase>
)
}

View File

@ -33,7 +33,7 @@ export const EditButton = ({
className="xlog-post-editor inline-flex items-center"
href={`${SITE_URL}/dashboard/${handle}/editor?id=${noteId}&type=${type}`}
>
<i className="icon-[mingcute--edit-line] mx-1" /> {t("Edit")}
<i className="i-mingcute-edit-line mx-1" /> {t("Edit")}
</UniLink>
)}
</>

View File

@ -213,7 +213,7 @@ export const Platform = ({
/>
) : (
<span className="rounded-md inline-flex text-white justify-center items-center bg-zinc-300">
<i className="icon-[mingcute--planet-line] text-xl" />
<i className="i-mingcute-planet-line text-xl" />
</span>
)}
</span>

View File

@ -38,7 +38,7 @@ export default async function PostMeta({
</>
) : null}
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--eye-line] mr-[2px]" />
<i className="i-mingcute-eye-line mr-[2px]" />
<span>{page.stat?.viewDetailCount}</span>
</span>
<UniLink
@ -57,7 +57,7 @@ export default async function PostMeta({
{summary && (
<div className="xlog-post-summary border rounded-xl mt-5 p-4 space-y-2">
<div className="font-bold text-zinc-700 flex items-center">
<i className="icon-[mingcute--sparkles-line] mr-2 text-lg" />
<i className="i-mingcute-sparkles-line mr-2 text-lg" />
{translated?.["AI-generated summary"] || "AI-generated summary"}
</div>
<div className="text-zinc-500 leading-loose text-sm">{summary}</div>

View File

@ -38,7 +38,7 @@ export default function ShortList({
>
<Link href="/shorts">
<h2 className="flex items-center font-bold text-lg">
<i className="icon-[mingcute--ins-line] mr-1" />
<i className="i-mingcute-ins-line mr-1" />
{t("Shorts")}
</h2>
</Link>
@ -89,7 +89,7 @@ export default function ShortList({
href="/shorts"
className="bg-white rounded-full z-[1] w-8 h-8 flex items-center justify-center"
>
<i className="icon-[mingcute--right-fill]" />
<i className="i-mingcute-right-fill" />
</Link>
</Tooltip>
</div>

View File

@ -25,7 +25,7 @@ function MoreActions({ children }: React.PropsWithChildren<{}>) {
aria-label="more"
className="-mx-2 text-zinc-600"
>
<i className="icon-[mingcute--more-1-line] text-2xl" />
<i className="i-mingcute-more-1-line text-2xl" />
</Button>
}
dropdown={<div className="text-sm">{children}</div>}
@ -104,7 +104,7 @@ export const SiteHeaderMenu = ({
text: "Search on this site",
icon: (
<span className="text-stone-400">
<i className="icon-[mingcute--search-line] block" />
<i className="i-mingcute-search-line block" />
</span>
),
onClick: () => setSearchOpen(true),

View File

@ -28,7 +28,7 @@ export default async function TranslationInfo({
)}
>
<span className="xlog-post-views inline-flex items-center">
<i className="icon-[mingcute--translate-2-line] mr-[2px]" />
<i className="i-mingcute-translate-2-line mr-[2px]" />
<span>
{t.rich("Translated by", {
from: () => (

View File

@ -88,7 +88,7 @@ const APlayer = memo(function APlayer({
onClick={playNow}
className="p-2 rounded-full bg-accent opacity-90 hover:opacity-100 transition-opacity"
>
<i className="icon-[mingcute--play-fill] block text-4xl text-white" />
<i className="i-mingcute-play-fill block text-4xl text-white" />
</button>
</Tooltip>
</div>
@ -100,7 +100,7 @@ const APlayer = memo(function APlayer({
onClick={addToList}
className="p-2 rounded-full bg-gray-50 hover:bg-gray-100"
>
<i className="icon-[mingcute--calendar-add-line] block text-2xl" />
<i className="i-mingcute-calendar-add-line block text-2xl" />
</button>
</Tooltip>
</div>

View File

@ -7,7 +7,7 @@ export const EmptyState = ({ resource = "post" }: { resource?: string }) => {
return (
<div className="text-center py-10 mb-10 text-2xl text-zinc-300 font-medium flex justify-center flex-col items-center">
<span className="icon-[mingcute--ghost-line] text-5xl mb-2"></span>
<span className="i-mingcute-ghost-line text-5xl mb-2"></span>
<div className="capitalize">
{" "}
{t(`No ${resource.charAt(0).toUpperCase() + resource.slice(1)} Yet`)}

View File

@ -104,7 +104,7 @@ export const Modal = forwardRef<HTMLDivElement, ModalProps>(
className="absolute right-4 w-7 h-7 text-xl cursor-pointer bg-white flex items-center justify-center"
onClick={() => setOpen(false)}
>
<i className="icon-[mingcute--close-line] inline-block" />
<i className="i-mingcute-close-line inline-block" />
</span>
</Dialog.Title>
)}

View File

@ -28,7 +28,7 @@ export const rehypeWrapCode: Plugin<Array<void>, Root> = () => {
u("element", {
tagName: "span",
properties: {
className: "icon-[mingcute--copy-2-line]",
className: "i-mingcute-copy-2-line",
},
children: [],
}),

View File

@ -5,11 +5,11 @@ import {
variableColorsPlugin,
} from "tailwindcss-variable-colors"
import { addDynamicIconSelectors } from "@iconify/tailwind"
import { iconsPlugin } from "@egoist/tailwindcss-icons"
const config: Config = {
content: ["./src/**/*.tsx"],
safelist: ["icon-[mingcute--link-line]", "icon-[mingcute--copy-2-line]"],
safelist: ["i-mingcute-link-line", "i-mingcute-copy-2-line"],
darkMode: ["class", "html.dark"],
theme: {
colors: createVariableColors(),
@ -79,7 +79,7 @@ const config: Config = {
plugins: [
require("tailwindcss-animate"),
require("tailwind-scrollbar-hide"),
addDynamicIconSelectors(),
iconsPlugin(),
variableColorsPlugin(),
],
}