Skip to content

Commit 2079980

Browse files
the3ashgreptile-apps[bot]raycastbotpernielsentikaer
authored
Update Ext/surge outbound switcher (#18989)
* Add surge-outbound-switcher extension - v1 fix - v1 - v1 - first commit * update icons & screenshot * Update extensions/surge-outbound-switcher/CHANGELOG.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update extensions/surge-outbound-switcher/CHANGELOG.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update extensions/surge-outbound-switcher/package.json Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update extensions/surge-outbound-switcher/src/set-to-rule.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update extensions/surge-outbound-switcher/src/utils.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Fix some issues in PR 18065 * Optimize speed and functionalityt * Added hint for first error * - Refactor code structure for better performance\n- Add error messages\n- Update screenshots * fix screenshots path * add changelog * Optimize cache time for first search * update README * Update CHANGELOG.md and optimise images * Add store screenshots * fix changelog * Update CHANGELOG.md and optimise images * chore: tidy up CHANGELOG * style: Add colored emojis to distinguish successful switch toasts * chore: Update extension icons * Update CHANGELOG.md * Update CHANGELOG.md and optimise images --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: raycastbot <[email protected]> Co-authored-by: the3ash <[email protected]> Co-authored-by: Per Nielsen Tikær <[email protected]>
1 parent 12f9d96 commit 2079980

12 files changed

+13
-29
lines changed

extensions/surge-outbound-switcher/CHANGELOG.md

+5-24
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
# Surge Outbound Mode Switcher Changelog
22

3-
## [Update] - 2025-04-17
3+
## [Update Extension Icons and Toast Indicators] - 2025-05-07
44

5-
- Add store screenshots
6-
7-
## [Update] - 2025-04-07
8-
9-
- Optimize cache time for first search
10-
11-
## [Update] - 2025-04-07
12-
13-
- Refactor code structure for better performance
14-
- Add error messages
15-
- Update screenshots
5+
- Update extension icons to prevent confusion with Surge app
6+
- Add colored emojis to distinguish successful switch toasts
167

17-
## [Update] - 2025-04-07
8+
## [Store Screenshots] - 2025-04-17
189

19-
- Fix TypeScript error: Cannot find name 'showFailureToast'
20-
- Fix screenshot path and configuration
21-
- Fix global mode name
22-
23-
## [Update] - 2025-04-07
24-
25-
- Fix
26-
27-
## [Update] - 2025-04-07
28-
29-
- Updated extension icons and screenshot
10+
- Add store screenshots
3011

3112
## [Initial Version] - 2025-04-07
3213

Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Binary file not shown.
Loading
Loading

extensions/surge-outbound-switcher/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@
1919
{
2020
"name": "set-outbound-mode",
2121
"title": "Set Outbound Mode",
22-
"subtitle": "Surge",
22+
"subtitle": "Surge Outbound Switcher",
2323
"description": "Set Surge's outbound mode",
2424
"mode": "view",
2525
"icon": "extension-icon.png"
2626
},
2727
{
2828
"name": "set-to-direct",
2929
"title": "Set to Direct",
30-
"subtitle": "Surge",
30+
"subtitle": "Surge Outbound Switcher",
3131
"description": "Set Surge's outbound mode to Direct",
3232
"mode": "no-view",
3333
"icon": "extension-icon-d.png"
3434
},
3535
{
3636
"name": "set-to-global",
3737
"title": "Set to Global",
38-
"subtitle": "Surge",
38+
"subtitle": "Surge Outbound Switcher",
3939
"description": "Set Surge's outbound mode to Global",
4040
"mode": "no-view",
4141
"icon": "extension-icon-g.png"
4242
},
4343
{
4444
"name": "set-to-rule-based",
4545
"title": "Set to Rule-based",
46-
"subtitle": "Surge",
46+
"subtitle": "Surge Outbound Switcher",
4747
"description": "Set Surge's outbound mode to Rule-based",
4848
"mode": "no-view",
4949
"icon": "extension-icon-r.png"

extensions/surge-outbound-switcher/src/utils.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,19 @@ const outboundModes = {
228228
english: "Direct Outbound",
229229
chinese: "直接连接",
230230
name: "Direct",
231+
emoji: "⚪️",
231232
},
232233
Global: {
233234
english: "Global Proxy",
234235
chinese: "全局代理",
235236
name: "Global",
237+
emoji: "🟢",
236238
},
237239
Rule: {
238240
english: "Rule-Based Proxy",
239241
chinese: "规则判定",
240242
name: "Rule-Based",
243+
emoji: "🔵",
241244
},
242245
};
243246

@@ -731,7 +734,7 @@ export async function setSurgeOutboundMode(mode: "Direct" | "Global" | "Rule"):
731734
lastHitTimestamp: Date.now(),
732735
};
733736

734-
await showHUD(`🌐 Set to ${modeConfig.name} Mode`);
737+
await showHUD(`${modeConfig.emoji} Set to ${modeConfig.name} Mode`);
735738
} catch (error) {
736739
// Handle errors and show failure notification
737740
console.error(`🔴 Error setting to ${outboundModes[mode].name} mode:`, error);

0 commit comments

Comments
 (0)