Commit 846a4f0f5d

846a4f0f5dd9e2e35f22bd402bb3c9f4356b250c

parent: e240c1a830

Unsigned

TubaApollo <86665265+TubaApollo@users.noreply.github.com> · 2026-04-10 15:47 UTC

refactor: unify aliases and labels into single aliasDefs map

Layout: unified · split

docs/.vitepress/configs/markdown/emoji.ts +76 −92
@@ -45,118 +45,102 @@ const emojis: { pack: IconifyJSON; prefix?: string }[] = [
45 { pack: iconoir, prefix: 'iconoir-' } 45 { pack: iconoir, prefix: 'iconoir-' }
46] 46]
47 47
48// Add aliases here... 48// Add aliases here: [icon, label?]
49const aliases: Record<string, string> = { 49// Label is optional — omit for icons that don't need a tooltip.
50const aliasDefs: Record<string, [string, string?]> = {
50 // System 51 // System
51 and: 'simple-icons-android', 52 and: ['simple-icons-android', 'Android'],
52 ios: 'simple-icons-apple', 53 ios: ['simple-icons-apple', 'iOS / iPadOS'],
53 win: 'simple-icons-windows', 54 win: ['simple-icons-windows', 'Windows'],
54 app: 'ri-finder-fill', 55 app: ['ri-finder-fill', 'MacOS'],
55 lin: 'simple-icons-linux', 56 lin: ['simple-icons-linux', 'Linux'],
56 bsd: 'simple-icons-freebsd', 57 bsd: ['simple-icons-freebsd', 'BSD'],
57 cmd: 'material-symbols-terminal-rounded', 58 cmd: ['material-symbols-terminal-rounded', 'CLI / TUI'],
58 ff: 'simple-icons-firefoxbrowser', 59 ff: ['simple-icons-firefoxbrowser', 'Firefox'],
59 cr: 'simple-icons-googlechrome', 60 cr: ['simple-icons-googlechrome', 'Chromium'],
60 web: 'mdi-web', 61 web: ['mdi-web', 'Web'],
61 62
62 // Type 63 // Type
63 strm: 'material-symbols-play-circle-outline', 64 strm: ['material-symbols-play-circle-outline', 'Stream'],
64 ddl: 'material-symbols-cloud-download-outline-rounded', 65 ddl: ['material-symbols-cloud-download-outline-rounded', 'Online / DDL'],
65 mag: 'lucide-magnet', 66 mag: ['lucide-magnet', 'Torrent / p2p'],
66 lcl: 'iconoir-floppy-disk', 67 lcl: ['iconoir-floppy-disk', 'Local file'],
67 batch: 'material-symbols-package-2-outline', 68 batch: ['material-symbols-package-2-outline', 'Batch Download'],
68 sp: `lucide-file`, 69 sp: ['lucide-file', 'Single Page Mode'],
69 dp: `lucide-book-open`, 70 dp: ['lucide-book-open', 'Double Page Mode'],
70 ls: `lucide-scroll`, 71 ls: ['lucide-scroll', 'Long-Strip Mode'],
71 72
72 // Tracking 73 // Tracking
73 sync: `material-symbols-sync`, 74 sync: ['material-symbols-sync', 'Sync'],
74 ie: `material-symbols-arrows-up-down-circle-outline-rounded`, 75 ie: ['material-symbols-arrows-up-down-circle-outline-rounded', 'Import / Export'],
75 76
76 // Price 77 // Price
77 paid: 'ic-round-attach-money', 78 paid: ['ic-round-attach-money', 'Paid'],
78 fm: 'ic-round-add-shopping-cart', 79 fm: ['ic-round-add-shopping-cart', 'Freemium'],
79 free: 'ic-round-money-off-csred', 80 free: ['ic-round-money-off-csred', 'Has free content'],
80 sub: 'ic-round-currency-exchange', 81 sub: ['ic-round-currency-exchange', 'Subscription'],
81 coin: 'akar-icons-coin', 82 coin: ['akar-icons-coin', 'Coin / Point'],
82 83
83 // Source 84 // Source
84 src: 'mdi-package-variant', 85 src: ['mdi-package-variant', 'Source Code'],
85 cs: 'mdi-package-variant-closed-remove', 86 cs: ['mdi-package-variant-closed-remove', 'Closed Source'],
86 87
87 // Platform 88 // Platform
88 d: 'simple-icons-discord', 89 d: ['simple-icons-discord', 'Discord'],
89 f: 'simple-icons-4chan', 90 f: ['simple-icons-4chan', '4chan'],
90 x: 'simple-icons-twitter', 91 x: ['simple-icons-twitter', 'Twitter'],
91 tg: 'simple-icons-telegram', 92 tg: ['simple-icons-telegram', 'Telegram'],
92 mal: 'simple-icons-myanimelist', 93 mal: ['simple-icons-myanimelist', 'MyAnimeList'],
93 al: 'simple-icons-anilist', 94 al: ['simple-icons-anilist', 'AniList'],
94 k: 'simple-icons-kitsu', 95 k: ['simple-icons-kitsu', 'Kitsu'],
95 simkl: 'simple-icons-simkl', 96 simkl: ['simple-icons-simkl', 'Simkl'],
96 97
97 // Storage 98 // Storage
98 sgd: 'simple-icons-googledrive', 99 sgd: ['simple-icons-googledrive', 'Google Drive'],
99 sm: 'simple-icons-mega', 100 sm: ['simple-icons-mega', 'MEGA'],
100 smf: 'simple-icons-mediafire', 101 smf: ['simple-icons-mediafire', 'MediaFire'],
101 host: 'mdi-snail', 102 host: ['mdi-snail', 'Other Host'],
102 103
103 // Flag 104 // Region
104 fjp: 'twemoji-flag-japan', 105 fjp: ['twemoji-flag-japan', 'Japan'],
105 fkr: 'twemoji-flag-south-korea', 106 fkr: ['twemoji-flag-south-korea', 'Korea'],
106 fcn: 'twemoji-flag-china', 107 fcn: ['twemoji-flag-china', 'China'],
107 108
108 // Code 109 // Code
109 py: 'simple-icons-python', 110 py: ['simple-icons-python', 'Python'],
110 js: 'simple-icons-javascript', 111 js: ['simple-icons-javascript', 'JavaScript'],
111 css: 'mdi-language-css3', 112 css: ['mdi-language-css3', 'CSS'],
112 dock: 'simple-icons-docker', 113 dock: ['simple-icons-docker', 'Docker'],
113 114
114 // Others 115 // Others
115 s: 'twemoji-glowing-star', 116 s: ['twemoji-glowing-star', 'Favorite'],
116 e: 'mdi-puzzle', 117 e: ['mdi-puzzle', 'Extension / Plugin'],
117 n: 'material-symbols-science', 118 n: ['material-symbols-science', 'Nightly build'],
118 alt: 'ic-round-looks-two', 119 alt: ['ic-round-looks-two', 'Alternative'],
119 ero: 'twemoji-no-one-under-eighteen', 120 ero: ['twemoji-no-one-under-eighteen', 'R18'],
120 acc: 'material-symbols-person-add', 121 acc: ['material-symbols-person-add', 'Needs account'],
121 rss: 'simple-icons-rss', 122 rss: ['simple-icons-rss', 'RSS Feed'],
122 prx: 'material-symbols-directions-alt', 123 prx: ['material-symbols-directions-alt', 'Proxies'],
123 tf: 'mdi-airplane', 124 tf: ['mdi-airplane', 'Testflight'],
124 more: 'mdi-arrow-right-bold', 125 more: ['mdi-arrow-right-bold', 'Related'],
125 help: 'material-symbols-help', 126 help: ['material-symbols-help', 'Help / Docs'],
126 yes: 'twemoji-check-mark-button', 127 yes: ['twemoji-check-mark-button', 'Yes / Available'],
127 no: 'twemoji-cross-mark', 128 no: ['twemoji-cross-mark', 'No / Unavailable'],
128 global: 'twemoji-globe-showing-asia-australia', 129 global: ['twemoji-globe-showing-asia-australia', 'Global'],
129 up: 'material-symbols-upload', 130 up: ['material-symbols-upload', 'Self Upload'],
130 ms: 'material-symbols-file-copy-rounded', 131 ms: ['material-symbols-file-copy-rounded', 'Multi Source'],
131 ps: 'material-symbols-file-copy-outline-rounded', 132 ps: ['material-symbols-file-copy-outline-rounded'],
132 ss: 'material-symbols-file-copy-off-rounded', 133 ss: ['material-symbols-file-copy-off-rounded'],
133 cc: 'mdi-closed-caption', 134 cc: ['mdi-closed-caption', 'Soft Subtitle / CC'],
134 hs: 'mdi-hulu' 135 hs: ['mdi-hulu', 'Hardsubs']
135} 136}
136 137
137// Tooltip labels for icon aliases (desktop hover) 138// Derived maps from aliasDefs
138const aliasLabels: Record<string, string> = { 139const aliases: Record<string, string> = {}
139 s: 'Favorite', src: 'Source Code', cs: 'Closed Source', 140const aliasLabels: Record<string, string> = {}
140 e: 'Extension / Plugin', prx: 'Proxies', ero: 'R18', 141for (const [key, [icon, label]] of Object.entries(aliasDefs)) {
141 acc: 'Needs account', help: 'Help / Docs', more: 'Related', 142 aliases[key] = icon
142 and: 'Android', ios: 'iOS / iPadOS', app: 'MacOS', 143 if (label) aliasLabels[key] = label
143 win: 'Windows', lin: 'Linux', bsd: 'BSD',
144 cmd: 'CLI / TUI', ff: 'Firefox', cr: 'Chromium', web: 'Web',
145 strm: 'Stream', ddl: 'Online / DDL', mag: 'Torrent / p2p',
146 lcl: 'Local file', batch: 'Batch Download',
147 sp: 'Single Page Mode', dp: 'Double Page Mode', ls: 'Long-Strip Mode',
148 paid: 'Paid', sub: 'Subscription', free: 'Has free content',
149 coin: 'Coin / Point', fm: 'Freemium',
150 d: 'Discord', f: '4chan', x: 'Twitter', tg: 'Telegram',
151 mal: 'MyAnimeList', al: 'AniList', k: 'Kitsu', simkl: 'Simkl',
152 sgd: 'Google Drive', sm: 'MEGA', smf: 'MediaFire', host: 'Other Host',
153 fjp: 'Japan', fkr: 'Korea', fcn: 'China',
154 js: 'JavaScript', css: 'CSS', py: 'Python', dock: 'Docker',
155 n: 'Nightly build', alt: 'Alternative', rss: 'RSS Feed', tf: 'Testflight',
156 yes: 'Yes / Available', no: 'No / Unavailable',
157 global: 'Global', cc: 'Subtitles / CC', hs: 'Hardsubs',
158 up: 'More Info', ms: 'Feedback',
159 sync: 'Sync', ie: 'Import / Export'
160} 144}
161 145
162// Custom icons using UnoCSS inline collection 146// Custom icons using UnoCSS inline collection