discord-bot-client
discord-bot-client copied to clipboard
Titlebar
I noticed that on Windows the titlebar looks default and not like the one in the official discord client. I am trying to make it look just like the one in the official client, but the problem is that discord becomes corrupted and I am not sure how to fix that. I think it might have to do something with the fact that I changed the webPreferences of the BrowserWindow(especially the contextIsolation) for integrating the custom-electron-titlebar library. I tried loading it in a preload script with contextIsolation: true
using contextBridge, but it always failed to load the script. Also after searching through the official discord client HTML, I found the svg path of the logo that is on the top left corner and tried to implement that, but it appeared under the titlebar. I tried using z-index property, but it didn't help.
do you have any ideas on how to fix it?
Never really made an electron application but from what I understand there may be a more native approach. https://ourcodeworld.com/articles/read/938/how-to-create-a-custom-titlebar-inspired-on-visual-studio-code-title-bar-in-electron-framework
@TristonStuart I already fixed the discord corruption and the preload script. Everything works except that the login screen is not patched for some unspecific reason as there is no error message or anything. Even though there is a "patch login screen" message in the console log, which most certainly comes from the patches Flam3rboy made in index.html . However, the login screen is default and I'm not sure how to fix that.
Never mind, the styles work on Windows as well.
Is there a version for Mac?
@kezvon Mac version doesn't require a titlebar.
Did you fixed the login screen bug @ToxicKwas1221 and at least the dev tools + view (reload) is required in the titlebar.
@Flam3rboy Yes, I did fix the login screen bug. I initially planned the titlebar to look just like the discord's one without anything on it, but if you want dev tools and view with reload button to be there, I could find a way to implement that.
@Flam3rboy it's done.
Rip A pull never to be merged i think
Flam3rboy said this PR has no reload and devtools button
@ArashMM I added those in my last commit. The reload and devtools buttons are under the View button. Although they are provided by the library I used, so I don't assume it's customizable to the point, where I could make them separate.
Is this still being worked on?
@Shayshon It's done. Even overdone.