This commit is contained in:
Mirco Wittrien 2021-02-02 13:02:27 +01:00
parent 3f70bd67c5
commit 7ef4590177
2 changed files with 8 additions and 8 deletions

View File

@ -4148,12 +4148,12 @@ module.exports = (_ => {
}
};
BDFDB.DiscordUtils.getVersion = function () {
if (BDFDB.DiscordUtils.getBuilt.version) return BDFDB.DiscordUtils.getBuilt.version;
if (BDFDB.DiscordUtils.getVersion.version) return BDFDB.DiscordUtils.getVersion.version;
else {
let version = null;
try {version = LibraryRequires.electron.remote.app.getVersion();}
catch (err) {version = 400;}
BDFDB.DiscordUtils.getBuilt.version = version;
try {version = LibraryModules.WindowUtils.version.join(".");}
catch (err) {version = "999.999.999";}
BDFDB.DiscordUtils.getVersion.version = version;
return version;
}
};

View File

@ -176,7 +176,7 @@ module.exports = (_ => {
id: "OldTitleBarNotifyBar",
buttons: [{
contents: "Relaunch",
onClick: BDFDB.LibraryModules.WindowUtils.relaunch
onClick: _ => {BDFDB.LibraryModules.WindowUtils.relaunch();}
}]
});
}
@ -268,7 +268,7 @@ module.exports = (_ => {
};
children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable,
onClick: BDFDB.LibraryModules.WindowUtils.minimize,
onClick: _ => {BDFDB.LibraryModules.WindowUtils.minimize();},
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
className: BDFDB.disCN.channelheadericon,
iconSVG: `<svg width="26" height="26"><path stroke-width="2" stroke="currentColor" fill="none" d="M6 18 l13 0"/></svg>`
@ -276,7 +276,7 @@ module.exports = (_ => {
}));
children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable,
onClick: BDFDB.LibraryModules.WindowUtils.maximize,
onClick: _ => {BDFDB.LibraryModules.WindowUtils.maximize();},
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
className: BDFDB.disCN.channelheadericon,
iconSVG: this.isMaximized() ? `<svg width="26" height="26"><path stroke-width="2" stroke="currentColor" fill="none" d="M6 9 l10 0 l0 10 l-10 0 l0 -10 m3 -3 l10 0 l0 10"/></svg>` : `<svg width="26" height="26"><path stroke-width="2" stroke="currentColor" fill="none" d="M6 6 l13 0 l0 13 l-13 0 l0 -13"/></svg>`
@ -284,7 +284,7 @@ module.exports = (_ => {
}));
children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable,
onClick: BDFDB.LibraryModules.WindowUtils.close,
onClick: _ => {BDFDB.LibraryModules.WindowUtils.close();},
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
className: BDFDB.disCN.channelheadericon,
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>`