Skip to content
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

Feat/proxy setting #2162

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

yosheng
Copy link

@yosheng yosheng commented Apr 4, 2024

I need Caprine could proxy by setting without system proxy setting, so I add proxy setting in Advance Setting menu
image

When I click proxy setting it will open a windows and show default setting.
image

After click Enable and enter proxy server and relaunch caprine. Enjoy it 😎

@yosheng yosheng closed this Apr 4, 2024
@yosheng yosheng reopened this Apr 4, 2024
@Alex313031
Copy link
Contributor

@yosheng I will add this to my fork that still supports Windows 7/8/8.1!

@yosheng
Copy link
Author

yosheng commented Apr 4, 2024

@yosheng I will add this to my fork that still supports Windows 7/8/8.1!

I will be glad, this PR coluld help to your project too. 🥰

@Alex313031
Copy link
Contributor

Alex313031 commented Apr 4, 2024

@yosheng Two things I noticed, first, you have a redundant trailing </div> at the end under </script>

Second, this should be made into a regular .html file and put in //static, then loaded with a line like:
win.loadFile(path.join(__dirname, '..', 'static/proxy.html'));

See my commit where I fixed all this (as well as migrated my own preload script to typescript, and renamed yours to proxy-preload.ts), as well as added a few styling changes to the window that I think look good > Alex313031@3742bbf

@yosheng
Copy link
Author

yosheng commented Apr 4, 2024

@Alex313031 I appreciate about your propose! I'am a electron newbee, those suggestions will help me to know how could make code clean. 🤩
I will do some change, then reopen this PR.

@yosheng yosheng closed this Apr 4, 2024
@yosheng
Copy link
Author

yosheng commented Apr 4, 2024

I added some blue color like this.
image

@yosheng yosheng reopened this Apr 4, 2024
@Alex313031
Copy link
Contributor

Alex313031 commented Apr 5, 2024

@yosheng Looks good, I will include your styling in my fork.

Also, you indented your .html better, I will do that too lol.

Also, in case you were wondering, the Roboto font is to match up with the rest of Electron. Electron uses Roboto by default, and most of the Caprine UI is in that font.

Also, proxyWin.setMenuBarVisibility(false); is not needed since you already have autoHideMenuBar: true,.

@yosheng
Copy link
Author

yosheng commented Apr 8, 2024

@Alex313031 Thanks for your advice! 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants