Skip to content

Commit a422ec1

Browse files
fix: correct casing for site adapter display names
This adds a display name mapping to the SiteAdapters component to show proper capitalization (e.g., 'GitHub' instead of 'github') while preserving internal config keys. Co-authored-by: Copilot <[email protected]>
1 parent bdd01c4 commit a422ec1

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/popup/sections/SiteAdapters.jsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
import PropTypes from 'prop-types'
22

3+
const siteDisplayNames = {
4+
bilibili: 'Bilibili',
5+
github: 'GitHub',
6+
gitlab: 'GitLab',
7+
quora: 'Quora',
8+
reddit: 'Reddit',
9+
youtube: 'YouTube',
10+
zhihu: 'Zhihu',
11+
stackoverflow: 'Stack Overflow',
12+
juejin: 'Juejin',
13+
'mp.weixin.qq': 'WeChat MP',
14+
followin: 'Followin',
15+
arxiv: 'arXiv',
16+
}
17+
318
SiteAdapters.propTypes = {
419
config: PropTypes.object.isRequired,
520
updateConfig: PropTypes.func.isRequired,
@@ -20,7 +35,7 @@ export function SiteAdapters({ config, updateConfig }) {
2035
updateConfig({ activeSiteAdapters })
2136
}}
2237
/>
23-
{key}
38+
{siteDisplayNames[key] || key}
2439
</label>
2540
))}
2641
</>

0 commit comments

Comments
 (0)