mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
add emoji font
This commit is contained in:
parent
94f6596229
commit
9bdee84399
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ out
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*.log*
|
*.log*
|
||||||
.idea
|
.idea
|
||||||
|
*.ttf
|
||||||
|
|||||||
@ -257,6 +257,20 @@ const resolveEnableLoopback = () =>
|
|||||||
downloadURL: `https://github.com/Kuingsmile/uwp-tool/releases/download/latest/enableLoopback.exe`
|
downloadURL: `https://github.com/Kuingsmile/uwp-tool/releases/download/latest/enableLoopback.exe`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const resolveFont = async () => {
|
||||||
|
const targetPath = path.join(cwd, 'src', 'renderer', 'src', 'assets', 'NotoColorEmoji.ttf')
|
||||||
|
|
||||||
|
if (fs.existsSync(targetPath)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await downloadFile(
|
||||||
|
'https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoColorEmoji.ttf',
|
||||||
|
targetPath
|
||||||
|
)
|
||||||
|
|
||||||
|
console.log(`[INFO]: NotoColorEmoji.ttf finished`)
|
||||||
|
}
|
||||||
|
|
||||||
const tasks = [
|
const tasks = [
|
||||||
{
|
{
|
||||||
name: 'verge-mihomo-alpha',
|
name: 'verge-mihomo-alpha',
|
||||||
@ -271,6 +285,11 @@ const tasks = [
|
|||||||
{ name: 'mmdb', func: resolveMmdb, retry: 5 },
|
{ name: 'mmdb', func: resolveMmdb, retry: 5 },
|
||||||
{ name: 'geosite', func: resolveGeosite, retry: 5 },
|
{ name: 'geosite', func: resolveGeosite, retry: 5 },
|
||||||
{ name: 'geoip', func: resolveGeoIP, retry: 5 },
|
{ name: 'geoip', func: resolveGeoIP, retry: 5 },
|
||||||
|
{
|
||||||
|
name: 'font',
|
||||||
|
func: resolveFont,
|
||||||
|
retry: 5
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'enableLoopback',
|
name: 'enableLoopback',
|
||||||
func: resolveEnableLoopback,
|
func: resolveEnableLoopback,
|
||||||
|
|||||||
@ -2,6 +2,28 @@
|
|||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noto Color Emoji';
|
||||||
|
src: url('./NotoColorEmoji.ttf');
|
||||||
|
}
|
||||||
|
|
||||||
|
.flag-empji {
|
||||||
|
font-family:
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
'Segoe UI',
|
||||||
|
Roboto,
|
||||||
|
Oxygen,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
'Open Sans',
|
||||||
|
'Helvetica Neue',
|
||||||
|
sans-serif,
|
||||||
|
'Apple Color Emoji',
|
||||||
|
'Noto Color Emoji';
|
||||||
|
}
|
||||||
|
|
||||||
.no-scrollbar::-webkit-scrollbar {
|
.no-scrollbar::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ const EditFileModal: React.FC<Props> = (props) => {
|
|||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
mouseWheelZoom: true,
|
mouseWheelZoom: true,
|
||||||
fontFamily: `Fira Code, JetBrains Mono, Roboto Mono, "Source Code Pro", Consolas, Menlo, Monaco, monospace, "Courier New", "Apple Color Emoji"`,
|
fontFamily: `Fira Code, JetBrains Mono, Roboto Mono, "Source Code Pro", Consolas, Menlo, Monaco, monospace, "Courier New", "Apple Color Emoji", "Noto Color Emoji"`,
|
||||||
fontLigatures: true, // 连字符
|
fontLigatures: true, // 连字符
|
||||||
smoothScrolling: true // 平滑滚动
|
smoothScrolling: true // 平滑滚动
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ const ProxyItem: React.FC<Props> = (props) => {
|
|||||||
<CardBody className="p-2">
|
<CardBody className="p-2">
|
||||||
<div className="flex select-none justify-between items-center">
|
<div className="flex select-none justify-between items-center">
|
||||||
<div>
|
<div>
|
||||||
<div className="inline text-ellipsis whitespace-nowrap overflow-hidden">
|
<div className="flag-empji inline text-ellipsis whitespace-nowrap overflow-hidden">
|
||||||
{proxy.name}
|
{proxy.name}
|
||||||
</div>
|
</div>
|
||||||
{proxyDisplayMode === 'full' && (
|
{proxyDisplayMode === 'full' && (
|
||||||
|
|||||||
@ -46,7 +46,7 @@ const ConfigViewer: React.FC<Props> = (props) => {
|
|||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
mouseWheelZoom: true,
|
mouseWheelZoom: true,
|
||||||
fontFamily: `Fira Code, JetBrains Mono, Roboto Mono, "Source Code Pro", Consolas, Menlo, Monaco, monospace, "Courier New", "Apple Color Emoji"`,
|
fontFamily: `Fira Code, JetBrains Mono, Roboto Mono, "Source Code Pro", Consolas, Menlo, Monaco, monospace, "Courier New", "Apple Color Emoji", "Noto Color Empji"`,
|
||||||
fontLigatures: true, // 连字符
|
fontLigatures: true, // 连字符
|
||||||
smoothScrolling: true // 平滑滚动
|
smoothScrolling: true // 平滑滚动
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Button, Card, CardBody, CardFooter, Chip, Progress } from '@nextui-org/
|
|||||||
import { useProfileConfig } from '@renderer/hooks/use-profile-config'
|
import { useProfileConfig } from '@renderer/hooks/use-profile-config'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation, useNavigate } from 'react-router-dom'
|
||||||
import { calcTraffic, calcPercent } from '@renderer/utils/calc'
|
import { calcTraffic, calcPercent } from '@renderer/utils/calc'
|
||||||
import { LiaGripfire } from 'react-icons/lia'
|
import { CgLoadbarDoc } from 'react-icons/cg'
|
||||||
import { IoMdRefresh } from 'react-icons/io'
|
import { IoMdRefresh } from 'react-icons/io'
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||||
import 'dayjs/locale/zh-cn'
|
import 'dayjs/locale/zh-cn'
|
||||||
@ -57,7 +57,7 @@ const ProfileCard: React.FC = () => {
|
|||||||
setShowRuntimeConfig(true)
|
setShowRuntimeConfig(true)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LiaGripfire className={`text-[24px] ${match ? 'text-white' : 'text-foreground'}`} />
|
<CgLoadbarDoc className={`text-[24px] ${match ? 'text-white' : 'text-foreground'}`} />
|
||||||
</Button>
|
</Button>
|
||||||
{info.type === 'remote' && (
|
{info.type === 'remote' && (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@ -38,7 +38,7 @@ const PacEditorViewer: React.FC<Props> = (props) => {
|
|||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
mouseWheelZoom: true,
|
mouseWheelZoom: true,
|
||||||
fontFamily: `Fira Code, JetBrains Mono, Roboto Mono, "Source Code Pro", Consolas, Menlo, Monaco, monospace, "Courier New", "Apple Color Emoji"`,
|
fontFamily: `Fira Code, JetBrains Mono, Roboto Mono, "Source Code Pro", Consolas, Menlo, Monaco, monospace, "Courier New", "Apple Color Emoji", "Noto Color Empji"`,
|
||||||
fontLigatures: true, // 连字符
|
fontLigatures: true, // 连字符
|
||||||
smoothScrolling: true // 平滑滚动
|
smoothScrolling: true // 平滑滚动
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -158,14 +158,14 @@ const Proxies: React.FC = () => {
|
|||||||
src={groups[index].icon}
|
src={groups[index].icon}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="h-[32px] select-none text-ellipsis whitespace-nowrap overflow-hidden text-md leading-[32px]">
|
<div className="flag-emoji h-[32px] select-none text-ellipsis whitespace-nowrap overflow-hidden text-md leading-[32px]">
|
||||||
{groups[index].name}
|
{groups[index].name}
|
||||||
{proxyDisplayMode === 'full' && (
|
{proxyDisplayMode === 'full' && (
|
||||||
<>
|
<>
|
||||||
<div className="inline ml-2 text-sm text-default-500">
|
<div className="inline ml-2 text-sm text-default-500">
|
||||||
{groups[index].type}
|
{groups[index].type}
|
||||||
</div>
|
</div>
|
||||||
<div className="inline ml-2 text-sm text-default-500">
|
<div className="flag-empji inline ml-2 text-sm text-default-500">
|
||||||
{groups[index].now}
|
{groups[index].now}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user