Compare commits

...
3 Commits
Author SHA1 Message Date
go0p 6013a7ae4e Bump extension version to 0.0.2 2025-03-05 16:28:24 +08:00
go0p 8742711b68 Improve ProxySwitch menu item visual feedback with selected state indicators 2025-03-05 16:16:46 +08:00
go0p f463076def fix version 2025-03-04 16:14:13 +08:00
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Yakit Chrome Endpoint", "name": "Yakit Chrome Endpoint",
"version": "1.0", "version": "0.0.2",
"description": "A Endpoint for Yakit MITM or more", "description": "A Endpoint for Yakit MITM or more",
"options_ui": { "options_ui": {
"page": "proxy/options.html", "page": "proxy/options.html",
+8 -4
View File
@@ -237,21 +237,25 @@ export const ProxySwitch: React.FC<ProxySwitchProps> = () => {
const menuItems: MenuProps['items'] = [ const menuItems: MenuProps['items'] = [
...FIXED_MODES.map(mode => ({ ...FIXED_MODES.map(mode => ({
key: mode.key, key: mode.key,
icon: <span className="menu-icon" style={{ color: mode.color }}>{mode.icon}</span>, icon: <span className="menu-icon" style={{
label: mode.name, color: currentMode === mode.key ? 'var(--yakit-primary)' : mode.color
}}>{mode.icon}</span>,
label: `${mode.name}${currentMode === mode.key ? ' ✅' : ''}`,
className: `${currentMode === mode.key ? 'menu-item-selected' : ''} ${isLoading ? 'menu-item-loading' : ''}`, className: `${currentMode === mode.key ? 'menu-item-selected' : ''} ${isLoading ? 'menu-item-loading' : ''}`,
title: mode.name.replace(/[\[\]]/g, '') title: mode.name.replace(/[\[\]]/g, '')
})), })),
{ type: 'divider' }, { type: 'divider' },
...customProxies.map(proxy => ({ ...customProxies.map(proxy => ({
key: proxy.key, key: proxy.key,
icon: <span className="menu-icon" style={{ color: proxy.color }}> icon: <span className="menu-icon" style={{
color: currentMode === proxy.key ? 'var(--yakit-primary)' : proxy.color
}}>
{proxy.config.proxyType === 'pac_script' ? '📜' : <GlobalOutlined />} {proxy.config.proxyType === 'pac_script' ? '📜' : <GlobalOutlined />}
</span>, </span>,
label: <span style={{ label: <span style={{
color: currentMode === proxy.key ? 'var(--yakit-primary)' : 'inherit', color: currentMode === proxy.key ? 'var(--yakit-primary)' : 'inherit',
opacity: isLoading ? 0.7 : 1 opacity: isLoading ? 0.7 : 1
}}>{proxy.name}</span>, }}>{proxy.name}{currentMode === proxy.key ? ' ✅' : ''}</span>,
className: `${currentMode === proxy.key ? 'menu-item-selected' : ''} ${isLoading ? 'menu-item-loading' : ''}`, className: `${currentMode === proxy.key ? 'menu-item-selected' : ''} ${isLoading ? 'menu-item-loading' : ''}`,
title: proxy.config.scheme title: proxy.config.scheme
? `${proxy.config.scheme.toUpperCase()} ${proxy.config.host}:${proxy.config.port}` ? `${proxy.config.scheme.toUpperCase()} ${proxy.config.host}:${proxy.config.port}`