stuff
This commit is contained in:
parent
05fbbcb3a1
commit
737b0820fe
|
@ -2,7 +2,7 @@
|
||||||
* @name CompleteTimestamps
|
* @name CompleteTimestamps
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.6.6
|
* @version 1.6.7
|
||||||
* @description Replaces Timestamps with your own custom Timestamps
|
* @description Replaces Timestamps with your own custom Timestamps
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -14,12 +14,7 @@
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
const changeLog = {
|
const changeLog = {
|
||||||
"improved": {
|
|
||||||
"RelativeTimestamps": "Now works with the Plugin 'RelativeTimestamps"
|
|
||||||
},
|
|
||||||
"added": {
|
|
||||||
"User Member Info": "Hovering over the User Member Info (Member Since) will show a full Timestamp"
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
|
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
|
||||||
|
@ -106,15 +101,12 @@ module.exports = (_ => {
|
||||||
if (this.settings.places.markup && e.methodArguments[0].formatted == BDFDB.LibraryModules.MessageParser.defaultRules.timestamp.parse([null, e.methodArguments[0].timestamp, "f"]).formatted) {
|
if (this.settings.places.markup && e.methodArguments[0].formatted == BDFDB.LibraryModules.MessageParser.defaultRules.timestamp.parse([null, e.methodArguments[0].timestamp, "f"]).formatted) {
|
||||||
if (tooltipIsSame) e.returnValue.props.delay = 99999999999999999999;
|
if (tooltipIsSame) e.returnValue.props.delay = 99999999999999999999;
|
||||||
let timestamp = this.formatTimestamp(this.settings.dates.timestampDate, date);
|
let timestamp = this.formatTimestamp(this.settings.dates.timestampDate, date);
|
||||||
let renderChildren = e.returnValue.props.children;
|
if (e.returnValue.props.node) e.returnValue.props.node.formatted = timestamp;
|
||||||
e.returnValue.props.children = (...args) => {
|
}
|
||||||
let renderedChildren = renderChildren(...args);
|
if (this.settings.tooltips.markup) {
|
||||||
if (BDFDB.ArrayUtils.is(renderedChildren.props.children)) renderedChildren.props.children[1] = timestamp;
|
e.returnValue.props.text = this.formatTimestamp(this.settings.dates.tooltipDate, date);
|
||||||
else renderedChildren.props.children = timestamp;
|
if (e.returnValue.props.node) e.returnValue.props.node.full = e.returnValue.props.text;
|
||||||
return renderedChildren;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
if (this.settings.tooltips.markup) e.returnValue.props.text = this.formatTimestamp(this.settings.dates.tooltipDate, date);
|
|
||||||
}});
|
}});
|
||||||
|
|
||||||
this.forceUpdateAll();
|
this.forceUpdateAll();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name NotificationSounds
|
* @name NotificationSounds
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 3.7.9
|
* @version 3.8.0
|
||||||
* @description Allows you to replace the native Sounds with custom Sounds
|
* @description Allows you to replace the native Sounds with custom Sounds
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -179,17 +179,20 @@ module.exports = (_ => {
|
||||||
src: src,
|
src: src,
|
||||||
mute: id.startsWith("call_") ? null : false,
|
mute: id.startsWith("call_") ? null : false,
|
||||||
streamMute: false,
|
streamMute: false,
|
||||||
|
invisibleMute: false,
|
||||||
force: id == "message1" ? false : null,
|
force: id == "message1" ? false : null,
|
||||||
focus: id == "message1" ? true : false
|
focus: id == "message1" ? true : false
|
||||||
};
|
};
|
||||||
if (id == "message1") {
|
if (id == "message1") {
|
||||||
types[id].mute = true;
|
types[id].mute = true;
|
||||||
types[id].streamMute = false;
|
types[id].streamMute = false;
|
||||||
|
types[id].invisibleMute = false;
|
||||||
for (let subType in message1Types) types[subType] = {
|
for (let subType in message1Types) types[subType] = {
|
||||||
name: message1Types[subType].name,
|
name: message1Types[subType].name,
|
||||||
src: BDFDB.LibraryModules.SoundParser(message1Types[subType].src),
|
src: BDFDB.LibraryModules.SoundParser(message1Types[subType].src),
|
||||||
mute: true,
|
mute: true,
|
||||||
streamMute: false,
|
streamMute: false,
|
||||||
|
invisibleMute: false,
|
||||||
force: message1Types[subType].force,
|
force: message1Types[subType].force,
|
||||||
focus: message1Types[subType].focus
|
focus: message1Types[subType].focus
|
||||||
}
|
}
|
||||||
|
@ -439,7 +442,7 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsLabel, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsLabel, {
|
||||||
label: types[type].name
|
label: types[type].name
|
||||||
}),
|
}),
|
||||||
["force", "focus", "mute", "streamMute"].some(n => types[type][n] !== null) && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
["force", "focus", "mute", "streamMute", "invisibleMute"].some(n => types[type][n] !== null) && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
||||||
onClick: event => BDFDB.ContextMenuUtils.open(this, event, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {
|
onClick: event => BDFDB.ContextMenuUtils.open(this, event, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {
|
||||||
children: [
|
children: [
|
||||||
{key: "force", label: "Force Play", hint: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
|
{key: "force", label: "Force Play", hint: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
|
||||||
|
@ -459,7 +462,8 @@ module.exports = (_ => {
|
||||||
})
|
})
|
||||||
})},
|
})},
|
||||||
{key: "mute", label: ["Mute in", BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.StatusComponents.Status, {style: {marginLeft: 6}, size: 12, status: BDFDB.LibraryComponents.StatusComponents.Types.DND})]},
|
{key: "mute", label: ["Mute in", BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.StatusComponents.Status, {style: {marginLeft: 6}, size: 12, status: BDFDB.LibraryComponents.StatusComponents.Types.DND})]},
|
||||||
{key: "streamMute", label: ["Mute while", BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.StatusComponents.Status, {style: {marginLeft: 6}, size: 12, status: BDFDB.LibraryComponents.StatusComponents.Types.STREAMING})]},
|
{key: "invisibleMute", label: ["Mute in", BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.StatusComponents.Status, {style: {marginLeft: 6}, size: 12, status: BDFDB.LibraryComponents.StatusComponents.Types.INVISIBLE})]},
|
||||||
|
{key: "streamMute", label: ["Mute while", BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.StatusComponents.Status, {style: {marginLeft: 6}, size: 12, status: BDFDB.LibraryComponents.StatusComponents.Types.STREAMING})]}
|
||||||
].map(n => types[type][n.key] !== null && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuCheckboxItem, {
|
].map(n => types[type][n.key] !== null && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuCheckboxItem, {
|
||||||
label: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
label: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
||||||
align: BDFDB.LibraryComponents.Flex.Align.CENTER,
|
align: BDFDB.LibraryComponents.Flex.Align.CENTER,
|
||||||
|
@ -677,6 +681,7 @@ module.exports = (_ => {
|
||||||
volume: 100,
|
volume: 100,
|
||||||
mute: types[type].mute,
|
mute: types[type].mute,
|
||||||
streamMute: types[type].streamMute,
|
streamMute: types[type].streamMute,
|
||||||
|
invisibleMute: types[type].invisibleMute,
|
||||||
focus: types[type].focus
|
focus: types[type].focus
|
||||||
};
|
};
|
||||||
choices[type] = choice;
|
choices[type] = choice;
|
||||||
|
@ -707,7 +712,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
dontPlayAudio (type) {
|
dontPlayAudio (type) {
|
||||||
let status = BDFDB.UserUtils.getStatus();
|
let status = BDFDB.UserUtils.getStatus();
|
||||||
return choices[type] && (choices[type].mute && status == "dnd" || choices[type].streamMute && status == "streaming");
|
return choices[type] && (choices[type].mute && status == "dnd" || choices[type].streamMute && status == "streaming" || choices[type].invisibleMute && (status == "offline" || status == "invisible"));
|
||||||
}
|
}
|
||||||
|
|
||||||
fireEvent (type) {
|
fireEvent (type) {
|
||||||
|
|
Loading…
Reference in New Issue