stuff
This commit is contained in:
parent
1ed5fda5e3
commit
7c48ec6843
|
@ -3444,8 +3444,7 @@ var BDFDB = {
|
|||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
style: {marginBottom: 10}
|
||||
})
|
||||
}));
|
||||
}
|
||||
if (BDFDB.ArrayUtils.is(config.buttons)) for (let button of config.buttons) {
|
||||
|
@ -3513,6 +3512,7 @@ var BDFDB = {
|
|||
]
|
||||
}),
|
||||
headerchildren.length ? BDFDB.ReactUtils.createElement(LibraryComponents.Flex, {
|
||||
grow: 0,
|
||||
children: headerchildren
|
||||
}) : null,
|
||||
BDFDB.ReactUtils.createElement(LibraryComponents.ModalComponents.ModalContent, {
|
||||
|
@ -6710,8 +6710,7 @@ var BDFDB = {
|
|||
direction: LibraryComponents.Flex.Direction.VERTICAL,
|
||||
align: LibraryComponents.Flex.Align.STRETCH,
|
||||
style: Object.assign({}, childprops.style, {
|
||||
display: this.props.open ? null : "none",
|
||||
marginTop: 10
|
||||
display: this.props.open ? null : "none"
|
||||
})
|
||||
}));
|
||||
}
|
||||
|
@ -7576,13 +7575,17 @@ var BDFDB = {
|
|||
padding-bottom: 10px;
|
||||
overflow: visible;
|
||||
}
|
||||
${BDFDB.dotCN.modaltabcontent} {
|
||||
margin-top: 10px;
|
||||
}
|
||||
${BDFDB.dotCNS.modalwrapper + BDFDB.dotCN.modalheader + BDFDB.dotCN.modalheaderhassibling} {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
${BDFDB.dotCNS.modalwrapper + BDFDB.dotCN.tabbarcontainer} {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border: none !important;
|
||||
border: none;
|
||||
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
${BDFDB.dotCNS.themedark + BDFDB.dotCNS.modalwrapper + BDFDB.dotCN.tabbarcontainer} {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -451,46 +451,6 @@ class PersonalPins {
|
|||
})
|
||||
})];
|
||||
}
|
||||
|
||||
addNotes (notespopout) {
|
||||
BDFDB.DOMUtils.remove(notespopout.querySelectorAll(BDFDB.dotCNC.messagegroupwrapper + BDFDB.dotCN.messagespopoutchannelseparator));
|
||||
let channel = BDFDB.ChannelUtils.getSelected();
|
||||
if (channel) {
|
||||
let guild_id = channel.guild_id ? channel.guild_id : "@me";
|
||||
let pins = BDFDB.DataUtils.load(this, "pins");
|
||||
if (!BDFDB.ObjectUtils.isEmpty(pins)) {
|
||||
let container = notespopout.querySelector(BDFDB.dotCN.messagespopout);
|
||||
let placeholder = notespopout.querySelector(BDFDB.dotCN.messagespopoutemptyplaceholder);
|
||||
if (!container || !placeholder) return;
|
||||
placeholder.querySelector(BDFDB.dotCN.messagespopoutimage).style.setProperty("background-image", `url(${BDFDB.DiscordUtils.getTheme() == BDFDB.disCN.themelight ? "/assets/03c7541028afafafd1a9f6a81cb7f149.svg" : "/assets/6793e022dc1b065b21f12d6df02f91bd.svg"})`);
|
||||
let notes = {};
|
||||
switch (notespopout.querySelector(BDFDB.dotCN.tabbarheaderitem + BDFDB.dotCN.settingsitemselected).getAttribute("tab")) {
|
||||
case "channel":
|
||||
notes = pins[guild_id] && pins[guild_id][channel.id] ? pins[guild_id][channel.id] : {};
|
||||
break;
|
||||
case "server":
|
||||
if (pins[guild_id]) for (let channel in pins[guild_id]) notes = Object.assign(notes, pins[guild_id][channel]);
|
||||
break;
|
||||
case "allservers":
|
||||
for (let server in pins) if (pins[server]) for (let channel in pins[server]) notes = Object.assign(notes, pins[server][channel]);
|
||||
break;
|
||||
}
|
||||
let noteArray = [];
|
||||
for (let id in notes) {noteArray.push(notes[id]);}
|
||||
BDFDB.ArrayUtils.keySort(noteArray, notespopout.querySelector(BDFDB.dotCN.recentmentionsmentionfiltervalue).getAttribute("option"));
|
||||
for (let noteData of noteArray) this.appendNote(notespopout, container, noteData, placeholder);
|
||||
let searchstring = notespopout.querySelector(BDFDB.dotCN.searchbarinput).value.replace(/[<|>]/g, "");
|
||||
if (searchstring) for (let note of notespopout.querySelectorAll(BDFDB.dotCN.messagegroupwrapper)) {
|
||||
note.innerHTML = BDFDB.highlightText(note.innerHTML, searchstring);
|
||||
if (!note.querySelector(BDFDB.dotCN.highlight)) {
|
||||
note.previousSibling.remove();
|
||||
note.remove();
|
||||
}
|
||||
}
|
||||
BDFDB.DOMUtils.toggle(placeholder, container.firstElementChild == placeholder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addMessageToNotes (message, target, channel) {
|
||||
if (!message || !target) return;
|
||||
|
|
Loading…
Reference in New Issue