This commit is contained in:
Mirco Wittrien 2022-06-17 19:39:05 +02:00
parent 6d9cd932f8
commit 01b0d9bf7d
3 changed files with 19 additions and 6 deletions

View File

@ -1810,6 +1810,7 @@
"buttonspinner": ["Button", "spinner"],
"buttonspinneritem": ["Button", "spinnerItem"],
"buttonsubmitting": ["Button", "submitting"],
"callcurrentchatsidebaropen": ["Video", "chatSidebarOpen"],
"callcurrentcontainer": ["CallCurrent", "wrapper"],
"callcurrentdetails": ["CallDetails", "container"],
"callcurrentvideo": ["Video", "video"],

View File

@ -2,7 +2,7 @@
* @name OldTitleBar
* @author DevilBro
* @authorId 278543574059057154
* @version 1.7.3
* @version 1.7.4
* @description Allows you to switch to Discord's old Titlebar
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "OldTitleBar",
"author": "DevilBro",
"version": "1.7.3",
"version": "1.7.4",
"description": "Allows you to switch to Discord's old Titlebar"
}
};
@ -113,7 +113,10 @@ module.exports = (_ => {
iconSVG: `<svg width="26" height="26"><path stroke-width="2" stroke="currentColor" fill="none" d="M6 6 l13 13 m0 -13 l-13 13"/></svg>`
})
}));
return BDFDB.ReactUtils.createElement(BDFDB.ReactUtils.Fragment, {children: children});
return BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN._oldtitlebartoolbar,
children: children
});
}
};
@ -160,9 +163,15 @@ module.exports = (_ => {
}
${BDFDB.dotCN._oldtitlebartoolbar} {
flex: 1 1 auto;
display: flex;
flex: 1 0 auto;
justify-content: flex-end;
}
${BDFDB.dotCNS.chatthreadsidebaropen + BDFDB.dotCN._oldtitlebartoolbar},
${BDFDB.dotCNS.callcurrentchatsidebaropen + BDFDB.dotCN._oldtitlebartoolbar} {
display: none;
}
${BDFDB.dotCN._oldtitlebarsettingstoolbar} {
display: flex;
@ -244,11 +253,11 @@ module.exports = (_ => {
processAppSkeleton (e) {
this.processApp(e);
}
processHeaderBar (e) {
let wrapper = BDFDB.ReactUtils.findChild(e.instance, {props: ["toolbar", "children"]});
if (!wrapper) return;
let children = BDFDB.ObjectUtils.get(wrapper, "props.toolbar.props.children");
let children = BDFDB.ArrayUtils.is(wrapper.props.toolbar) ? wrapper.props.toolbar : BDFDB.ObjectUtils.get(wrapper, "props.toolbar.props.children");
if (!children) {
children = [];
wrapper.props.toolbar = [

View File

@ -146,6 +146,9 @@ module.exports = (_ => {
margin-left: 0;
margin-right: 4px;
}
${BDFDB.dotCNS.voiceuser + BDFDB.dotCN.memberownericon}:last-child {
margin-right: 4px;
}
`;
}