stuff
This commit is contained in:
parent
86cf08fb29
commit
b610d6171b
|
@ -519,17 +519,6 @@ module.exports = (_ => {
|
|||
wrapper.props.name = [wrapper.props.name];
|
||||
if (wrapper.props.avatar) wrapper.props.avatar.props.src = this.getGroupIcon(instance.props.channel.id);
|
||||
}
|
||||
|
||||
processPrivateChannel (e) {
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.channelList) {
|
||||
if (changedChannels[e.instance.props.channel.id] && changedChannels[e.instance.props.channel.id].name) {
|
||||
e.returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getGroupName(e.instance.props.channel.id)});
|
||||
}
|
||||
this.changeChannelColor(e.returnvalue.props.name, e.instance.props.channel.id, {modify: BDFDB.ObjectUtils.extract(Object.assign({}, e.instance.props, e.instance.state), "hovered", "selected", "hasUnreadMessages", "muted")});
|
||||
e.returnvalue.props.name = [e.returnvalue.props.name];
|
||||
e.returnvalue.props.avatar.props.src = this.getGroupIcon(e.instance.props.channel.id);
|
||||
}
|
||||
}
|
||||
|
||||
processQuickSwitchChannelResult (e) {
|
||||
if (e.instance.props.channel && this.settings.places.quickSwitcher) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name ImageUtilities
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 4.7.6
|
||||
* @version 4.7.7
|
||||
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "ImageUtilities",
|
||||
"author": "DevilBro",
|
||||
"version": "4.7.6",
|
||||
"version": "4.7.7",
|
||||
"description": "Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)"
|
||||
}
|
||||
};
|
||||
|
@ -303,6 +303,10 @@ module.exports = (_ => {
|
|||
align-items: center;
|
||||
min-width: 500px;
|
||||
}
|
||||
${BDFDB.dotCNS.imagemodal + BDFDB.notCN._imageutilitiessibling} > ${BDFDB.dotCN.imagewrapper} img {
|
||||
object-fit: contain;
|
||||
width: unset;
|
||||
}
|
||||
${BDFDB.dotCN._imageutilitiessibling} {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -687,9 +691,28 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
onGroupDMContextMenu (e) {
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.groupIcons) this.injectItem(e, [(BDFDB.DMUtils.getIcon(e.instance.props.channel.id) || "").replace(/\.webp|\.gif/, ".png")]);
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.groupIcons) this.injectItem(e, );
|
||||
}
|
||||
|
||||
onChannelContextMenu (e) {
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.groupIcons && e.subType == "useChannelLeaveItem") {
|
||||
let validUrls = this.filterUrls((BDFDB.DMUtils.getIcon(e.instance.props.channel.id) || "").replace(/\.webp|\.gif/, ".png"));
|
||||
if (!validUrls.length) return;
|
||||
|
||||
if (e.returnvalue.length) e.returnvalue.unshift(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuSeparator, {}));
|
||||
e.returnvalue.unshift(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||
label: this.isValid(validUrls[0].file, "video") ? BDFDB.LanguageUtils.LanguageStrings.VIDEO : BDFDB.LanguageUtils.LanguageStrings.IMAGE + " " + BDFDB.LanguageUtils.LanguageStrings.ACTIONS,
|
||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "main-subitem"),
|
||||
children: this.createSubMenus({
|
||||
instance: e.instance,
|
||||
urls: validUrls,
|
||||
prefix: BDFDB.LanguageUtils.LanguageStrings.USER_SETTINGS_AVATAR
|
||||
})
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onNativeContextMenu (e) {
|
||||
if (e.type == "NativeImageContextMenu" && (e.instance.props.href || e.instance.props.src)) this.injectItem(e, [e.instance.props.href || e.instance.props.src]);
|
||||
}
|
||||
|
@ -1052,6 +1075,7 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
if (this.settings.viewerSettings.galleryMode && viewedImage) {
|
||||
console.log(viewedImage);
|
||||
if (!cachedImages || cachedImages.channelId != viewedImage.channelId || cachedImages.amount && this.getImageIndex(cachedImages.all, viewedImage) == -1) {
|
||||
BDFDB.TimeUtils.clear(viewedImageTimeout);
|
||||
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(viewedImage.channelId);
|
||||
|
|
Loading…
Reference in New Issue