Update OldTitleBar.plugin.js

This commit is contained in:
Mirco Wittrien 2023-11-03 10:00:10 +01:00
parent b0ed88b67d
commit be8514dcda
1 changed files with 10 additions and 8 deletions

View File

@ -2,7 +2,7 @@
* @name OldTitleBar * @name OldTitleBar
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 1.8.0 * @version 1.8.1
* @description Allows you to switch to Discord's old Titlebar * @description Allows you to switch to Discord's old Titlebar
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -133,7 +133,7 @@ module.exports = (_ => {
], ],
after: [ after: [
"AuthWrapper", "AuthWrapper",
"StandardSidebarView" "SettingsView"
] ]
}; };
@ -180,9 +180,12 @@ module.exports = (_ => {
top: 0; top: 0;
right: 0; right: 0;
padding: 10px; padding: 10px;
z-index: 2; z-index: 103;
-webkit-app-region: drag !important; -webkit-app-region: drag !important;
} }
.platform-win ${BDFDB.dotCN._oldtitlebarsettingstoolbar} {
top: 22px;
}
${BDFDB.dotCNS._oldtitlebarenabled + BDFDB.dotCNS.authboxcharacterbackground + BDFDB.dotCN._oldtitlebarsettingstoolbar}, ${BDFDB.dotCNS._oldtitlebarenabled + BDFDB.dotCNS.authboxcharacterbackground + BDFDB.dotCN._oldtitlebarsettingstoolbar},
${BDFDB.dotCNS._oldtitlebarenabled + BDFDB.dotCNS.authboxsplashbackground + BDFDB.dotCN._oldtitlebarsettingstoolbar} { ${BDFDB.dotCNS._oldtitlebarenabled + BDFDB.dotCNS.authboxsplashbackground + BDFDB.dotCN._oldtitlebarsettingstoolbar} {
@ -266,11 +269,10 @@ module.exports = (_ => {
this.injectSettingsToolbar(e.returnvalue.props.children, true); this.injectSettingsToolbar(e.returnvalue.props.children, true);
} }
processStandardSidebarView (e) { processSettingsView (e) {
let sidebarView = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.settingswindowstandardsidebarview]]}); if (!BDFDB.ArrayUtils.is(e.returnvalue.props.children)) e.returnvalue.props.children = [e.returnvalue.props.children];
if (!sidebarView) return; console.log(e.returnvalue);
if (!BDFDB.ArrayUtils.is(sidebarView.props.children)) sidebarView.props.children = [sidebarView.props.children]; this.injectSettingsToolbar(e.returnvalue.props.children);
this.injectSettingsToolbar(sidebarView.props.children);
} }
injectSettingsToolbar (children, fixed) { injectSettingsToolbar (children, fixed) {