This commit is contained in:
Mirco Wittrien 2019-11-06 12:52:14 +01:00
parent 3c360e9b6d
commit 2f4859e622
3 changed files with 140 additions and 86 deletions

View File

@ -3980,6 +3980,8 @@ var BDFDB = {
inputNumberWrapperDefault: "numberInputWrapperDefault-gRxcuK numberInputWrapper-j4svZS",
inputNumberWrapperMini: "numberInputWrapperMini-wtUU31 numberInputWrapper-j4svZS",
overflowEllipsis: "ellipsis-qlo9sA",
quickSelectWrapper: "quickSelectWrapper-UCfTKz",
quickSelectPopoutWrapper: "quickSelectPopout-u2dtIf",
modalHeaderHasSibling: "hasSiblings-fRyjyl",
modalTabContent: "tab-content",
modalTabContentOpen: "open",
@ -4038,7 +4040,6 @@ var BDFDB = {
};
DiscordClassModules.NotFound = {
_: "",
avatarStopAnimation: "stop-animation",
badgeWrapper: "wrapper-232cHJ",
channelPanelTitle: "title-eS5yk3",
emoji: "emoji",
@ -4077,6 +4078,7 @@ var BDFDB = {
selectSingleLight: "css-6nrxdk-singleValue",
selectValue: "css-1hwfws3",
splashBackground: "splashBackground-1FRCko",
stopAnimations: "stop-animations",
subtext: "subtext-3CDbHg",
themeDark: "theme-dark",
themeLight: "theme-light",
@ -5204,9 +5206,11 @@ var BDFDB = {
quickselectpopout: ["QuickSelect", "quickSelectPopout"],
quickselectpopoutoption: ["QuickSelect", "quickSelectPopoutOption"],
quickselectpopoutscroll: ["QuickSelect", "quickSelectPopoutScroll"],
quickselectpopoutwrapper: ["BDFDB", "quickSelectPopoutWrapper"],
quickselectscroller: ["QuickSelect", "quickSelectScroller"],
quickselectselected: ["QuickSelect", "selected"],
quickselectvalue: ["QuickSelect", "quickSelectValue"],
quickselectwrapper: ["BDFDB", "quickSelectWrapper"],
quickswitcher: ["QuickSwitchWrap", "quickswitcher"],
quickswitchresult: ["QuickSwitch", "result"],
quickswitchresultfocused: ["QuickSwitch", "resultFocused"],
@ -5363,6 +5367,7 @@ var BDFDB = {
splashbackground: ["NotFound", "splashBackground"],
standardsidebarview: ["SettingsWindow", "standardSidebarView"],
status: ["Avatar", "status"],
stopanimations: ["NotFound", "stopAnimations"],
subtext: ["NotFound", "subtext"],
switch: ["Switch", "switch"],
switchdisabled: ["Switch", "switchDisabled"],
@ -5656,6 +5661,8 @@ var BDFDB = {
NativeSubComponents.ContextMenuToggleItem = BDFDB.ModuleUtils.findByName("ToggleMenuItem");
NativeSubComponents.FavButton = BDFDB.ModuleUtils.findByName("GIFFavButton");
NativeSubComponents.PopoutContainer = BDFDB.ModuleUtils.findByName("Popout");
NativeSubComponents.QuickSelect = BDFDB.ModuleUtils.findByName("QuickSelectWrapper");
NativeSubComponents.QuickSelectInner = BDFDB.ModuleUtils.findByName("QuickSelect");
NativeSubComponents.Select = BDFDB.ModuleUtils.findByName("SelectTempWrapper");
NativeSubComponents.Switch = BDFDB.ModuleUtils.findByName("Switch");
NativeSubComponents.TabBar = BDFDB.ModuleUtils.findByName("TabBar");
@ -6241,7 +6248,24 @@ var BDFDB = {
}
} : LibraryComponents.PopoutContainer;
LibraryComponents.QuickSelect = BDFDB.ModuleUtils.findByName("QuickSelectWrapper");
LibraryComponents.QuickSelect = reactInitialized ? class BDFDB_QuickSelect extends LibraryModules.React.Component {
handleChange(value) {
this.props.value = value;
BDFDB.ReactUtils.forceUpdate(this);
if (typeof this.props.onChange == "function") this.props.onChange(value, this);
}
render() {
let props = Object.assign({}, this.props, {
className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.quickselectwrapper),
popoutClassName: BDFDB.DOMUtils.formatClassName(this.props.popoutClassName, BDFDB.disCN.quickselectpopoutwrapper),
onChange: this.handleChange.bind(this)
});
if (!BDFDB.ObjectUtils.is(props.value)) props.value = {};
if (!BDFDB.ArrayUtils.is(props.options)) props.options = [{}];
if (typeof props.renderOption != "function") props.renderOption = value => {return value.label;};
return BDFDB.ReactUtils.createElement(NativeSubComponents.QuickSelect, props);
}
} : LibraryComponents.QuickSelect;
LibraryComponents.SearchBar = BDFDB.ModuleUtils.findByName("SearchBar");
@ -7123,6 +7147,36 @@ var BDFDB = {
font-size: 15px;
}
${BDFDB.dotCN.quickselectpopout + BDFDB.dotCN.quickselectpopoutwrapper} {
border-radius: 4px;
padding: 6px 8px;
cursor: default;
background-color: var(--background-floating);
box-sizing: border-box;
box-shadow: var(--elevation-high);
}
${BDFDB.dotCN.quickselectpopout + BDFDB.dotCNS.quickselectpopoutwrapper + BDFDB.dotCN.quickselectpopoutoption} {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
align-items: center;
position: relative;
font-weight: 500;
box-sizing: border-box;
margin-top: 2px;
margin-bottom: 2px;
padding: 0 8px;
font-size: 14px;
line-height: 18px;
min-height: 32px;
border-radius: 2px;
color: var(--interactive-normal);
}
${BDFDB.dotCN.quickselectpopout + BDFDB.dotCNS.quickselectpopoutwrapper + BDFDB.dotCN.quickselectpopoutoption}:hover {
color: var(--interactive-hover);
background-color: var(--background-modifier-hover);
}
${BDFDB.dotCN.charcounter} {
color: var(--channels-default);
}

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
class OldTitleBar {
getName () {return "OldTitleBar";}
getVersion () {return "1.6.0";}
getVersion () {return "1.6.1";}
getAuthor () {return "DevilBro";}
@ -60,8 +60,8 @@ class OldTitleBar {
-webkit-app-region: drag !important;
}
${BDFDB.dotCN.channelheaderheaderbar} *,
${BDFDB.dotCN.contextmenu} * {
${BDFDB.dotCNS.stopanimations + BDFDB.dotCN.channelheaderheaderbar} {
${BDFDB.dotCN.channelheaderheaderbar} * {
-webkit-app-region: no-drag !important;
}`;