-
Notifications
You must be signed in to change notification settings - Fork 10
UX improvement and close #28 #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @SYM01, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request focuses on UX improvements, specifically addressing validation messages and form handling within the application. It introduces a BrowserFlavor enum to differentiate between browser environments and enhances the AutoSwitchInput.vue component with improved validation rules. The changes span across multiple files, including locale files, adapter definitions, and Vue components.
Highlights
- Validation Message Enhancements: New validation messages have been added to
public/_locales/en/messages.jsonfor malformed URLs and CIDR formats, providing clearer feedback to the user. - BrowserFlavor Enum Introduction: A
BrowserFlavorenum is introduced insrc/adapters/base.tsto distinguish between different browser environments (Web, Chrome), with corresponding updates insrc/adapters/chrome.tsandsrc/adapters/web.ts. - AutoSwitchInput.vue Form Handling: The
AutoSwitchInput.vuecomponent is enhanced with agetConditionInputRulefunction to provide dynamic validation for URL and CIDR inputs based on the selectedAutoSwitchType. - ProfileSelector.vue Enhancements: The
ProfileSelector.vuecomponent now enforces a required constraint on theprofileIDmodel and updates the handling of theselectedProfilecomputed property.
Changelog
Click here to see the changelog
- public/_locales/en/messages.json
- Added new validation messages for malformed URLs (
config_section_auto_switch_type_url_malformed,config_section_auto_switch_type_url_malformed_chrome). - Added a validation message for malformed CIDR formats (
config_section_auto_switch_type_cidr_malformed).
- Added new validation messages for malformed URLs (
- src/adapters/base.ts
- Introduced the
BrowserFlavorenum withUnknown,Web, andChromevalues. - Added a
flavorgetter to theBaseAdapterclass, defaulting toBrowserFlavor.Unknown.
- Introduced the
- src/adapters/chrome.ts
- Updated the
Chromeclass to override theflavorgetter and returnBrowserFlavor.Chrome.
- Updated the
- src/adapters/web.ts
- Updated the
WebBrowserclass to override theflavorgetter and returnBrowserFlavor.Web.
- Updated the
- src/components/configs/AutoSwitchInput.vue
- Added
FieldRuleimport from '@arco-design/web-vue/es/form'. - Introduced the
getConditionInputRulefunction to dynamically generate validation rules based onAutoSwitchType. - Implemented URL validation, including Chrome-specific restrictions on HTTPS URL path matching.
- Implemented CIDR validation using a regular expression.
- Wrapped the table in a form and added form items for validation.
- Added
- src/components/configs/ProfileSelector.vue
- Added a
required: trueconstraint to theprofileIDmodel. - Updated the
selectedProfilecomputed property to only set the profile ID if a value is provided. - Added
disabledproperty to the System Profile option based onprops.currentProfileID.
- Added a
- src/components/configs/ProxyServerInput.vue
- Ensured that
proxyTypeis treated as a string in thev-modelbinding.
- Ensured that
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
The form, a canvas, where rules reside,
Validating inputs, with nowhere to hide.
From URLs malformed to CIDRs astray,
Each field's a challenge, to brighten the day.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces several UX improvements, including enhanced validation messages, a new BrowserFlavor enum, and improved form handling. The changes appear well-structured and address the intended goals. However, there are a few areas that could benefit from further attention to ensure robustness and clarity.
Summary of Findings
- Missing Sentry Release in Build Workflow: The
SENTRY_RELEASEenvironment variable is set for Chrome and Firefox builds, but it's missing for the initial steps in the build workflow. This inconsistency could lead to incomplete or inaccurate error tracking. - Potential Regular Expression Vulnerability: The regular expression used for CIDR validation in
AutoSwitchInput.vuemight be susceptible to ReDoS (Regular Expression Denial of Service) attacks. A more robust and secure validation method should be considered. - Inconsistent use of
Host.flavor: TheHost.flavoris checked inAutoSwitchInput.vueto determine if Chrome's URL path matching restriction applies. However, theWebBrowseradapter also sets the flavor toBrowserFlavor.Web, which might lead to unexpected behavior in web-based environments.
Merge Readiness
The pull request is well-structured and addresses the intended goals. However, there are a few areas that could benefit from further attention to ensure robustness and clarity. I recommend addressing the high and medium severity issues before merging. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging.
* update github action * minor change to System profile * Build(deps): Bump nanoid from 3.3.7 to 3.3.8 (#21) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Avoid blocking 401 authentication request (#22) (#23) * fix 401 issue (#22) * enablle github action on develop branch * Support Firefox (#18) * Adapt firefox * support firefore auto publish * support firefox, and optimized UX * [i18n] Updates for file public/_locales/en/messages.json (#25) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * update English i18n msg --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: SYM01 <33443792+SYM01@users.noreply.github.com> * sentry integration (#29) * [WIP] support exporting * [WIP] support import/export settings (#7) * Support import/export profiles and close #7 (#30) * implemented an utility to export/import settings * optimized description * [i18n] Updates for file public/_locales/en/messages.json (#32) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * fix an import issue (#33) (#35) * optimized sentry release * Optimize Development Flow (#37) * [WIP] support chrome auto deploy * finalize Chrome auto deploy * npm audit fix * npm audit fix * UX improvement and close #28 (#38) * minor bug fixed * improve UX and close #28 * use the same CIDR validator as PAC script * [i18n] Updates for file public/_locales/en/messages.json (#40) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* update github action * minor change to System profile * Build(deps): Bump nanoid from 3.3.7 to 3.3.8 (#21) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Avoid blocking 401 authentication request (#22) (#23) * fix 401 issue (#22) * enablle github action on develop branch * Support Firefox (#18) * Adapt firefox * support firefore auto publish * support firefox, and optimized UX * [i18n] Updates for file public/_locales/en/messages.json (#25) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * update English i18n msg --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: SYM01 <33443792+SYM01@users.noreply.github.com> * sentry integration (#29) * [WIP] support exporting * [WIP] support import/export settings (#7) * Support import/export profiles and close #7 (#30) * implemented an utility to export/import settings * optimized description * [i18n] Updates for file public/_locales/en/messages.json (#32) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * fix an import issue (#33) (#35) * optimized sentry release * Optimize Development Flow (#37) * [WIP] support chrome auto deploy * finalize Chrome auto deploy * npm audit fix * npm audit fix * UX improvement and close #28 (#38) * minor bug fixed * improve UX and close #28 * use the same CIDR validator as PAC script * [i18n] Updates for file public/_locales/en/messages.json (#40) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * Support Authentication in Auto Switch Profiles, fixing #34 (#45) * update deps * fix the auth issue in auto switch profiles * fix typo --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* update github action * minor change to System profile * Build(deps): Bump nanoid from 3.3.7 to 3.3.8 (#21) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Avoid blocking 401 authentication request (#22) (#23) * fix 401 issue (#22) * enablle github action on develop branch * Support Firefox (#18) * Adapt firefox * support firefore auto publish * support firefox, and optimized UX * [i18n] Updates for file public/_locales/en/messages.json (#25) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * update English i18n msg --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: SYM01 <33443792+SYM01@users.noreply.github.com> * sentry integration (#29) * [WIP] support exporting * [WIP] support import/export settings (#7) * Support import/export profiles and close #7 (#30) * implemented an utility to export/import settings * optimized description * [i18n] Updates for file public/_locales/en/messages.json (#32) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * fix an import issue (#33) (#35) * optimized sentry release * Optimize Development Flow (#37) * [WIP] support chrome auto deploy * finalize Chrome auto deploy * npm audit fix * npm audit fix * UX improvement and close #28 (#38) * minor bug fixed * improve UX and close #28 * use the same CIDR validator as PAC script * [i18n] Updates for file public/_locales/en/messages.json (#40) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * Support Authentication in Auto Switch Profiles, fixing #34 (#45) * update deps * fix the auth issue in auto switch profiles * fix typo * Support Profile Detection for the Auto Profiles (#42) (#50) * [WIP] Reflect current profile when using auto profile (#42) * Show detected profile in the popup * simplify test cases --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* update github action * minor change to System profile * Build(deps): Bump nanoid from 3.3.7 to 3.3.8 (#21) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Avoid blocking 401 authentication request (#22) (#23) * fix 401 issue (#22) * enablle github action on develop branch * Support Firefox (#18) * Adapt firefox * support firefore auto publish * support firefox, and optimized UX * [i18n] Updates for file public/_locales/en/messages.json (#25) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * update English i18n msg --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: SYM01 <33443792+SYM01@users.noreply.github.com> * sentry integration (#29) * [WIP] support exporting * [WIP] support import/export settings (#7) * Support import/export profiles and close #7 (#30) * implemented an utility to export/import settings * optimized description * [i18n] Updates for file public/_locales/en/messages.json (#32) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * fix an import issue (#33) (#35) * optimized sentry release * Optimize Development Flow (#37) * [WIP] support chrome auto deploy * finalize Chrome auto deploy * npm audit fix * npm audit fix * UX improvement and close #28 (#38) * minor bug fixed * improve UX and close #28 * use the same CIDR validator as PAC script * [i18n] Updates for file public/_locales/en/messages.json (#40) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * Support Authentication in Auto Switch Profiles, fixing #34 (#45) * update deps * fix the auth issue in auto switch profiles * fix typo * Support Profile Detection for the Auto Profiles (#42) (#50) * [WIP] Reflect current profile when using auto profile (#42) * Show detected profile in the popup * simplify test cases * [i18n] Updates for file public/_locales/en/messages.json (#52) * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* update github action * minor change to System profile * Build(deps): Bump nanoid from 3.3.7 to 3.3.8 (#21) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Avoid blocking 401 authentication request (#22) (#23) * fix 401 issue (#22) * enablle github action on develop branch * Support Firefox (#18) * Adapt firefox * support firefore auto publish * support firefox, and optimized UX * [i18n] Updates for file public/_locales/en/messages.json (#25) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * update English i18n msg --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: SYM01 <33443792+SYM01@users.noreply.github.com> * sentry integration (#29) * [WIP] support exporting * [WIP] support import/export settings (#7) * Support import/export profiles and close #7 (#30) * implemented an utility to export/import settings * optimized description * [i18n] Updates for file public/_locales/en/messages.json (#32) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * fix an import issue (#33) (#35) * optimized sentry release * Optimize Development Flow (#37) * [WIP] support chrome auto deploy * finalize Chrome auto deploy * npm audit fix * npm audit fix * UX improvement and close #28 (#38) * minor bug fixed * improve UX and close #28 * use the same CIDR validator as PAC script * [i18n] Updates for file public/_locales/en/messages.json (#40) * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * Support Authentication in Auto Switch Profiles, fixing #34 (#45) * update deps * fix the auth issue in auto switch profiles * fix typo * Support Profile Detection for the Auto Profiles (#42) (#50) * [WIP] Reflect current profile when using auto profile (#42) * Show detected profile in the popup * simplify test cases * [i18n] Updates for file public/_locales/en/messages.json (#52) * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * Improve browser detection Replace generic proxy API detection with Firefox-specific runtime.getBrowserInfo method for more reliable browser identification. * fix the object clone issue, close #49 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Jim Chan <me@schiznitz.com>
This pull request includes several changes across different files to improve validation messages, introduce a new
BrowserFlavorenum, and enhance form handling in theAutoSwitchInput.vuecomponent. The most important changes are summarized below.Validation Messages Enhancements:
public/_locales/en/messages.json: Added new validation messages for malformed URLs and CIDR formats, and updated existing messages for better clarity. [1] [2]Introduction of
BrowserFlavorEnum:src/adapters/base.ts: Introduced theBrowserFlavorenum and added aflavorgetter to theBaseAdapterclass.src/adapters/chrome.ts: Updated theChromeclass to override theflavorgetter withBrowserFlavor.Chrome. [1] [2]src/adapters/web.ts: Updated theWebBrowserclass to override theflavorgetter withBrowserFlavor.Web. [1] [2]Form Handling in
AutoSwitchInput.vue:src/components/configs/AutoSwitchInput.vue: Enhanced form validation by adding agetConditionInputRulefunction to validate URL and CIDR inputs based on theAutoSwitchType. [1] [2]Other Component Enhancements:
src/components/configs/ProfileSelector.vue: Added a required constraint to theprofileIDmodel and updated the handling of theselectedProfilecomputed property. [1] [2] [3]src/components/configs/ProxyServerInput.vue: Ensured theproxyTypeis treated as a string in thev-modelbinding.