stuff
This commit is contained in:
parent
ff05f3ed74
commit
e9cdacdb29
|
@ -3255,10 +3255,11 @@
|
|||
BDFDB.ContextMenuUtils = {};
|
||||
BDFDB.ContextMenuUtils.open = function (plugin, e, children) {
|
||||
LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||
return BDFDB.ReactUtils.createElement("div", Object.assign({}, e, {
|
||||
className: BDFDB.disCN.contextmenu,
|
||||
return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Menu, {
|
||||
navId: "bdfdb-context",
|
||||
onClose: BDFDB.LibraryModules.ContextMenuUtils.closeContextMenu,
|
||||
children: children
|
||||
}));
|
||||
});
|
||||
});
|
||||
};
|
||||
BDFDB.ContextMenuUtils.close = function (nodeOrInstance) {
|
||||
|
@ -6442,8 +6443,6 @@
|
|||
});
|
||||
};
|
||||
let click = _ => {
|
||||
var contexttype = BDFDB.ReactUtils.getValue(document.querySelector(BDFDB.dotCN.contextmenu), "return.stateNode.props.type");
|
||||
if (!contexttype || !contexttype.startsWith("CHANNEL_TEXT_AREA")) this.forceUpdateCounter();
|
||||
BDFDB.TimeUtils.timeout(this.forceUpdateCounter.bind(this), 100);
|
||||
document.removeEventListener("mousemove", mousemove);
|
||||
document.removeEventListener("mouseup", mouseup);
|
||||
|
@ -7411,6 +7410,8 @@
|
|||
}
|
||||
};
|
||||
|
||||
InternalComponents.LibraryComponents.Menu = BDFDB.ModuleUtils.findByName("Menu");
|
||||
|
||||
InternalComponents.LibraryComponents.MenuItems = Object.assign({}, BDFDB.ModuleUtils.findByProperties("MenuItem", "MenuGroup"));
|
||||
|
||||
InternalComponents.LibraryComponents.MenuItems.Colors = ((BDFDB.ModuleUtils.findByProperties("MenuItemColor") || {}).MenuItemColor || {});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@ var PinDMs = (_ => {
|
|||
return class PinDMs {
|
||||
getName () {return "PinDMs";}
|
||||
|
||||
getVersion () {return "1.7.1";}
|
||||
getVersion () {return "1.7.2";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -425,6 +425,7 @@ var PinDMs = (_ => {
|
|||
children: [
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: BDFDB.LanguageUtils.LanguageStrings.CATEGORY_SETTINGS,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "category-settings"),
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, event2.target));
|
||||
this.openCategorySettingsModal(category, "dmCategories");
|
||||
|
@ -432,7 +433,8 @@ var PinDMs = (_ => {
|
|||
}),
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: BDFDB.LanguageUtils.LanguageStrings.DELETE_CATEGORY,
|
||||
danger: true,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "remove-category"),
|
||||
color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER,
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, event2.target));
|
||||
BDFDB.DataUtils.remove(this, "dmCategories", category.id);
|
||||
|
|
|
@ -6,7 +6,7 @@ var ReadAllNotificationsButton = (_ => {
|
|||
return class ReadAllNotificationsButton {
|
||||
getName () {return "ReadAllNotificationsButton";}
|
||||
|
||||
getVersion () {return "1.5.9";}
|
||||
getVersion () {return "1.6.0";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -230,6 +230,7 @@ var ReadAllNotificationsButton = (_ => {
|
|||
children: [
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: this.labels.context_unreadguilds_text,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "mark-unread-read"),
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(event2._targetInst);
|
||||
this.markGuildsAsRead(BDFDB.GuildUtils.getUnread());
|
||||
|
@ -237,6 +238,7 @@ var ReadAllNotificationsButton = (_ => {
|
|||
}),
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: this.labels.context_pingedguilds_text,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "mark-pinged-read"),
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(event2._targetInst);
|
||||
this.markGuildsAsRead(BDFDB.GuildUtils.getPinged());
|
||||
|
@ -244,6 +246,7 @@ var ReadAllNotificationsButton = (_ => {
|
|||
}),
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: this.labels.context_mutedguilds_text,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "mark-muted-read"),
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(event2._targetInst);
|
||||
this.markGuildsAsRead(BDFDB.GuildUtils.getMuted());
|
||||
|
@ -251,6 +254,7 @@ var ReadAllNotificationsButton = (_ => {
|
|||
}),
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: this.labels.context_guilds_text,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "mark-all-read"),
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(event2._targetInst);
|
||||
this.addPinnedRecent(instance.props.channel.id);
|
||||
|
@ -259,6 +263,7 @@ var ReadAllNotificationsButton = (_ => {
|
|||
}),
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: this.labels.context_dms_text,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "mark-dms-read"),
|
||||
action: event2 => {
|
||||
BDFDB.ContextMenuUtils.close(event2._targetInst);
|
||||
BDFDB.DMUtils.markAsRead(BDFDB.DMUtils.getAll());
|
||||
|
|
Loading…
Reference in New Issue