This commit is contained in:
Mirco Wittrien 2020-05-19 16:36:11 +02:00
parent 828dbca440
commit c4a4352b74
2 changed files with 14 additions and 5 deletions

View File

@ -7435,17 +7435,28 @@
}; };
InternalComponents.LibraryComponents.MenuItems = Object.assign({}, BDFDB.ModuleUtils.findByProperties("MenuItem", "MenuGroup")); InternalComponents.LibraryComponents.MenuItems = Object.assign({}, BDFDB.ModuleUtils.findByProperties("MenuItem", "MenuGroup"));
InternalComponents.LibraryComponents.MenuItems.MenuHint = InternalBDFDB.loadPatchedComp("MenuItems.MenuHint") || reactInitialized && class BDFDB_MenuHint extends LibraryModules.React.Component { InternalComponents.LibraryComponents.MenuItems.MenuHint = InternalBDFDB.loadPatchedComp("MenuItems.MenuHint") || reactInitialized && class BDFDB_MenuHint extends LibraryModules.React.Component {
render() { render() {
return !this.props.hint ? null : BDFDB.ReactUtils.createElement("div", { return !this.props.hint ? null : BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.menuhint, className: BDFDB.disCN.menuhint,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextScroller, { children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TextScroller, {
children: this.props.hint children: this.props.hint
}) })
}); });
} }
}; };
InternalComponents.LibraryComponents.MenuItems.MenuIcon = InternalBDFDB.loadPatchedComp("MenuItems.MenuIcon") || reactInitialized && class BDFDB_MenuIcon extends LibraryModules.React.Component {
render() {
!this.props.icon ? null : return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SvgIcon, {
className: BDFDB.disCN.menuicon,
nativeClass: true,
iconSVG: this.props.icon
});
}
};
// REMOVE // REMOVE
InternalComponents.LibraryComponents.ContextMenuItems = {}; InternalComponents.LibraryComponents.ContextMenuItems = {};
InternalComponents.LibraryComponents.ContextMenuItems.Group = InternalComponents.LibraryComponents.MenuItems.MenuGroup; InternalComponents.LibraryComponents.ContextMenuItems.Group = InternalComponents.LibraryComponents.MenuItems.MenuGroup;

View File

@ -232,10 +232,8 @@ var GoogleTranslateOption = (_ => {
disabled: isTranslating, disabled: isTranslating,
id: BDFDB.ContextMenuUtils.createItemId(this.name, translated ? "untranslate-message" : "translate-message"), id: BDFDB.ContextMenuUtils.createItemId(this.name, translated ? "untranslate-message" : "translate-message"),
icon: _ => { icon: _ => {
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuIcon, {
className: BDFDB.disCN.menuicon, icon: translated ? translateIconUntranslate : translateIcon
nativeClass: true,
iconSVG: translated ? translateIconUntranslate : translateIcon
}); });
}, },
action: _ => { action: _ => {