Skip to content

Commit

Permalink
Support Auto Switch profile, closing #10 (#15)
Browse files Browse the repository at this point in the history
* modified README.md

* remove transifex from Github action. Use Github integration instead

* update deps

* replace jest with vitest

* optimized UX

* [I18n] Translate messages.json in zh_CN (#12)
  • Loading branch information
SYM01 authored Oct 20, 2024
1 parent d415bcc commit f648824
Show file tree
Hide file tree
Showing 43 changed files with 3,006 additions and 1,188 deletions.
12 changes: 0 additions & 12 deletions .tx/config

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It's still in the early development stage, and more features are still on the w

- [x] Basic profile switch support
- [x] Support proxy authentication
- [ ] Support auto switch rules
- [x] Support auto switch rules
- [x] Support more languages
- [ ] Support customized preference
- [ ] Support Safari
Expand All @@ -29,7 +29,7 @@ It's still in the early development stage, and more features are still on the w
## Development

1. Fork the repository and make changes.
2. Write unit tests. If applicable, write unit tests for your changes to ensure they don't break existing functionality. Our project uses [ts-jest](https://jestjs.io/docs/getting-started#via-ts-jest) for unit testing.
2. Write unit tests. If applicable, write unit tests for your changes to ensure they don't break existing functionality. Our project uses [vitest](https://vitest.dev/) for unit testing.
3. Make sure everything works perfectly before you make any pull request.


Expand Down
103 changes: 102 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"dev": "vite",
"test": "vitest",
"coverage": "vitest run --coverage",
"i18n:sync": "tx pull -a",
"build:test": "vue-tsc && vite build",
"build": "vue-tsc && vite build",
"dist": "rm -f dist.zip && cd ./dist/ && zip -r ../dist.zip ./",
"preview": "vite preview"
Expand All @@ -18,16 +16,19 @@
},
"dependencies": {
"@highlightjs/vue-plugin": "^2.1.0",
"@vueuse/core": "^11.1.0",
"escodegen": "^2.1.0",
"esprima": "^4.0.1",
"ipaddr.js": "^2.2.0",
"vue": "^3.4.35",
"vue-router": "^4.3.2"
},
"devDependencies": {
"@arco-design/web-vue": "^2.55.2",
"@arco-design/web-vue": "^2.56.2",
"@arco-plugins/vite-vue": "^1.4.5",
"@types/chrome": "^0.0.266",
"@types/escodegen": "^0.0.10",
"@types/esprima": "^4.0.6",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^2.1.3",
"sass-embedded": "^1.79.5",
Expand Down
65 changes: 62 additions & 3 deletions public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
"nav_config": {
"message": "Config"
},
"nav_custome_profiles": {
"nav_custom_profiles": {
"message": "Custom Profiles"
},
"nav_system_profiles": {
"message": "Presets"
},



"theme_light_mode": {
Expand Down Expand Up @@ -49,6 +53,9 @@
"config_proxy_type_pac": {
"message": "PAC Script"
},
"config_proxy_type_auto": {
"message": "Auto Switch"
},
"config_proxy_type_default": {
"message": "Same as Default"
},
Expand All @@ -70,6 +77,9 @@
"config_section_proxy_auth_tips": {
"message": "Set username and password if your proxy requires authentication"
},
"config_section_proxy_auth_unsupported": {
"message": "The current proxy type does not support authentication"
},
"config_section_proxy_auth_title": {
"message": "Proxy Authentication"
},
Expand All @@ -90,6 +100,49 @@
"message": "Learn more about bypass list"
},

"config_section_auto_switch_rules": {
"message": "Auto Switch Rules"
},
"config_section_auto_switch_type": {
"message": "Condition Type"
},
"config_section_auto_switch_type_domain": {
"message": "Domain"
},
"config_section_auto_switch_type_url": {
"message": "URL"
},
"config_section_auto_switch_type_cidr": {
"message": "IP/CIDR"
},
"config_section_auto_switch_type_disabled": {
"message": "Temporarily Skip"
},
"config_section_auto_switch_condition": {
"message": "Condition"
},
"config_section_auto_switch_profile": {
"message": "Route to"
},
"config_section_auto_switch_actions": {
"message": "Actions"
},
"config_section_auto_switch_add_rule": {
"message": "Add Rule"
},
"config_section_auto_switch_delete_rule": {
"message": "Delete Current Rule"
},
"config_section_auto_switch_duplicate_rule": {
"message": "Duplicate Current Rule"
},
"config_section_auto_switch_default_profile": {
"message": "Default Profile"
},
"config_section_auto_switch_pac_preview": {
"message": "Preview PAC Script"
},

"config_action_edit": {
"message": "Edit"
},
Expand All @@ -112,11 +165,17 @@
"config_feedback_saved": {
"message": "The profile had been saved"
},
"config_feedback_copied": {
"message": "Copied"
},
"config_feedback_deleted": {
"message": "The profile had been deleted"
},
"config_feedback_error_occured": {
"message": "Error occured: $1"
"config_feedback_unknown_profile": {
"message": "Unknown profile"
},
"config_feedback_error_occurred": {
"message": "Error occurred: $1"
},


Expand Down
Loading

0 comments on commit f648824

Please sign in to comment.