From 587068cd726f6429b0e1cecc3addfbe0b6d83101 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 24 Nov 2020 10:53:53 +0100 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 5 +++-- Library/_res/BDFDB.data.json | 2 ++ Library/_res/BDFDB.raw.css | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index f4adbcc97f..4ac2fa57ca 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -4671,7 +4671,7 @@ module.exports = (_ => { InternalComponents.LibraryComponents.Card = reactInitialized && class BDFDB_Card extends LibraryModules.React.Component { render() { return BDFDB.ReactUtils.createElement("div", BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, { - className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.hovercardwrapper, this.props.backdrop && BDFDB.disCN.hovercard, this.props.className), + className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.hovercardwrapper, this.props.horizontal && BDFDB.disCN.hovercardhorizontal, this.props.backdrop && BDFDB.disCN.hovercard, this.props.className), onMouseEnter: e => {if (typeof this.props.onMouseEnter == "function") this.props.onMouseEnter(e, this);}, onMouseLeave: e => {if (typeof this.props.onMouseLeave == "function") this.props.onMouseLeave(e, this);}, onClick: e => {if (typeof this.props.onClick == "function") this.props.onClick(e, this);}, @@ -4688,7 +4688,7 @@ module.exports = (_ => { children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TextScroller, {children: this.props.children}) }) : this.props.children ].flat(10).filter(n => n) - }), "backdrop", "noRemove")); + }), "backdrop", "horizontal", "noRemove")); } }; InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Card, {backdrop: true, noRemove: false}); @@ -6483,6 +6483,7 @@ module.exports = (_ => { className: BDFDB.DOMUtils.formatClassName([this.props.cardClassName, data.className].filter(n => n).join(" ").indexOf(BDFDB.disCN.card) == -1 && BDFDB.disCN.cardprimaryoutline, BDFDB.disCN.settingstablecard, this.props.cardClassName, data.className), cardId: data.key, backdrop: false, + horizontal: true, style: Object.assign({}, this.props.cardStyle, data.style), children: [ BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex, { diff --git a/Library/_res/BDFDB.data.json b/Library/_res/BDFDB.data.json index 5f41bc3b6b..8316ddeb65 100644 --- a/Library/_res/BDFDB.data.json +++ b/Library/_res/BDFDB.data.json @@ -479,6 +479,7 @@ "bdRepoHeaderControls": "controls-18FQsW", "bdRepoListHeader": "repoHeader-2KfNvH", "bdRepoListWrapper": "repoList-9JnAPs", + "cardHorizontal": "horizontal-0ffRsT", "cardInner": "inner-OP_8zd", "cardWrapper": "card-rT4Wbb", "charCounter": "counter-uAzbKp", @@ -1853,6 +1854,7 @@ "hotkeywrapper": ["BDFDB", "hotkeyWrapper"], "hovercard": ["HoverCard", "card"], "hovercardbutton": ["NotFound", "hoverCardButton"], + "hovercardhorizontal": ["BDFDB", "cardHorizontal"], "hovercardinner": ["BDFDB", "cardInner"], "hovercardwrapper": ["BDFDB", "cardWrapper"], "icon": ["EmbedActions", "icon"], diff --git a/Library/_res/BDFDB.raw.css b/Library/_res/BDFDB.raw.css index 6e8d7a30ce..832f36a6a9 100644 --- a/Library/_res/BDFDB.raw.css +++ b/Library/_res/BDFDB.raw.css @@ -347,6 +347,15 @@ img:not([src]), img[src=""], img[src="null"] { [REPLACE_CLASS_hovercardwrapper] { position: relative; + display: flex; + flex-direction: column; + justify-content: center; +} +[REPLACE_CLASS_hovercardwrapper][REPLACE_CLASS_hovercardhorizontal] { + position: relative; + display: flex; + flex-direction: column; + justify-content: center; } [REPLACE_CLASS_settingspanel] [REPLACE_CLASS_hovercardwrapper] { width: calc(100% - 20px);