Skip to content

Feat/proxy setting - #2162

Open
yosheng wants to merge 6 commits into
sindresorhus:mainfrom
yosheng:feat/proxy-setting
Open

Feat/proxy setting#2162
yosheng wants to merge 6 commits into
sindresorhus:mainfrom
yosheng:feat/proxy-setting

Conversation

@yosheng

@yosheng yosheng commented Apr 4, 2024

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

@yosheng

yosheng commented Apr 4, 2024

Copy link
Copy Markdown
Author

@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

Alex313031 commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

@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

yosheng commented Apr 4, 2024

Copy link
Copy Markdown
Author

@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

yosheng commented Apr 4, 2024

Copy link
Copy Markdown
Author

I added some blue color like this.
image

@yosheng yosheng reopened this Apr 4, 2024
@Alex313031

Alex313031 commented Apr 5, 2024

Copy link
Copy Markdown
Contributor

@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

yosheng commented Apr 8, 2024

Copy link
Copy Markdown
Author

@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