This commit is contained in:
Mirco Wittrien 2022-06-08 17:08:40 +02:00
parent 6db598a72c
commit 8b645fea29
6 changed files with 19 additions and 10 deletions

View File

@ -3374,7 +3374,7 @@ module.exports = (_ => {
return channel && Internal.LibraryModules.GuildEventStore.getGuildScheduledEvent(channel.id) && true;
};
BDFDB.ChannelUtils.markAsRead = function (channelIds) {
let unreadChannels = [channelIds].flat(10).filter(id => id && typeof id == "string" && ((BDFDB.ChannelUtils.isTextChannel(id) || BDFDB.ChannelUtils.isThread(id)) && (Internal.LibraryModules.UnreadChannelUtils.hasUnread(id) || Internal.LibraryModules.UnreadChannelUtils.getMentionCount(id) > 0))).map(id => ({
let unreadChannels = [channelIds].flat(10).filter(id => id && typeof id == "string" && (BDFDB.LibraryModules.ChannelStore.getChannel(id) || {}).type != BDFDB.DiscordConstants.ChannelTypes.GUILD_CATEGORY && (Internal.LibraryModules.UnreadChannelUtils.hasUnread(id) || Internal.LibraryModules.UnreadChannelUtils.getMentionCount(id) > 0)).map(id => ({
channelId: id,
readStateType: Internal.LibraryModules.UnreadStateTypes.CHANNEL,
messageId: Internal.LibraryModules.UnreadChannelUtils.lastMessageId(id)

View File

@ -1905,6 +1905,7 @@
"chatinner": ["ChatWindow", "content"],
"chatspacer": ["AppBase", "content"],
"chatthreadsidebar": ["ChatThreadSidebar", "container"],
"chatthreadsidebaropen": ["ChatWindow", "threadSidebarOpen"],
"checkbox": ["Checkbox", "checkbox"],
"checkboxbox": ["Checkbox", "box"],
"checkboxchecked": ["Checkbox", "checked"],
@ -2711,7 +2712,7 @@
"namecontainersubtext": ["NameContainer", "subText"],
"nametag": ["NameTag", "nameTag"],
"nitrostore": ["NitroStore", "applicationStore"],
"nochannel": ["ChatWindow", ["noChannel", "noChat"]],
"nochannel": ["ChatWindow", "noChat"],
"notice": ["Notice", "notice"],
"noticebrand": ["Notice", "colorBrand"],
"noticebutton": ["Notice", "button"],

View File

@ -267,8 +267,8 @@ module.exports = (_ => {
}
processChannelEditorContainer (e) {
if (!e.instance.props.disabled && e.instance.props.channel && (BDFDB.ChannelUtils.isTextChannel(e.instance.props.channel) || BDFDB.ChannelUtils.isThread(e.instance.props.channel) || e.instance.props.channel.isGroupDM()) && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && this.settings.places.chatTextarea) {
if (changedChannels[e.instance.props.channel.id] && changedChannels[e.instance.props.channel.id].name) e.instance.props.placeholder = BDFDB.LanguageUtils.LanguageStringsFormat("TEXTAREA_PLACEHOLDER", `#${changedChannels[e.instance.props.channel.id].name}`);
if (!e.instance.props.disabled && e.instance.props.channel && changedChannels[e.instance.props.channel.id] && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && this.settings.places.chatTextarea) {
if (changedChannels[e.instance.props.channel.id].name) e.instance.props.placeholder = BDFDB.LanguageUtils.LanguageStringsFormat("TEXTAREA_PLACEHOLDER", `#${changedChannels[e.instance.props.channel.id].name}`);
}
}
@ -685,8 +685,8 @@ module.exports = (_ => {
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(BDFDB.LibraryModules.LastChannelStore.getChannelId());
let title = document.head.querySelector("title");
if (title && channel && (document.location.href || "").indexOf(channel.id) > -1 && changedChannels[channel.id] && changedChannels[channel.id].name) {
if (BDFDB.ChannelUtils.isTextChannel(channel)) BDFDB.DOMUtils.setText(title, "#" + this.getChannelData(channel.id).name);
else if (channel && channel.isGroupDM()) BDFDB.DOMUtils.setText(title, this.getGroupName(channel.id));
if (channel.isGroupDM()) BDFDB.DOMUtils.setText(title, this.getGroupName(channel.id));
else BDFDB.DOMUtils.setText(title, (BDFDB.ChannelUtils.isTextChannel(channel) ? "#" : "") + this.getChannelData(channel.id).name);
}
}
}

View File

@ -2,7 +2,7 @@
* @name PluginRepo
* @author DevilBro
* @authorId 278543574059057154
* @version 2.2.9
* @version 2.3.2
* @description Allows you to download all Plugins from BD's Website within Discord
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "PluginRepo",
"author": "DevilBro",
"version": "2.2.9",
"version": "2.3.2",
"description": "Allows you to download all Plugins from BD's Website within Discord"
}
};
@ -127,7 +127,7 @@ module.exports = (_ => {
filterPlugins() {
let plugins = grabbedPlugins.map(plugin => {
const installedPlugin = _this.getInstalledPlugin(plugin);
const state = installedPlugin ? (plugin.version && BDFDB.NumberUtils.compareVersions(plugin.version, _this.getString(installedPlugin.version)) ? pluginStates.OUTDATED : pluginStates.INSTALLED) : pluginStates.DOWNLOADABLE;
const state = installedPlugin ? (plugin.version && _this.compareVersions(plugin.version, _this.getString(installedPlugin.version)) ? pluginStates.OUTDATED : pluginStates.INSTALLED) : pluginStates.DOWNLOADABLE;
return Object.assign(plugin, {
search: [plugin.name, plugin.version, plugin.authorname, plugin.description, plugin.tags].flat(10).filter(n => typeof n == "string").join(" ").toUpperCase(),
description: plugin.description || "No Description found",
@ -845,7 +845,7 @@ module.exports = (_ => {
if (version) {
plugin.version = version;
const installedPlugin = this.getInstalledPlugin(plugin);
if (installedPlugin && BDFDB.NumberUtils.compareVersions(version, this.getString(installedPlugin.version))) outdatedEntries++;
if (installedPlugin && this.compareVersions(version, this.getString(installedPlugin.version))) outdatedEntries++;
}
}
if (!cachedPlugins.includes(plugin.id)) newEntries++;
@ -909,6 +909,10 @@ module.exports = (_ => {
}
return string;
}
compareVersions (v1, v2) {
return !(v1 == v2 || !BDFDB.NumberUtils.compareVersions(v1, v2));
}
getInstalledPlugin (plugin) {
if (!plugin || typeof plugin.authorname != "string") return;

View File

@ -220,6 +220,9 @@ body #app-mount .layer-86YKbF ~ .layer-86YKbF .sidebar-nqHbhN {
.sidebar-nqHbhN .side-2ur1Qk .item-3XjbnG[aria-controls="COMMUNITY-tab" i]::before {
-webkit-mask: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/svgs/settingsicons/community.svg) center/contain no-repeat;
}
.sidebar-nqHbhN .side-2ur1Qk .item-3XjbnG[aria-controls="text_in_voice-tab" i]::before {
-webkit-mask: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/svgs/settingsicons/voicetext.svg) center/contain no-repeat;
}
.sidebar-nqHbhN .side-2ur1Qk .item-3XjbnG[aria-controls="ANALYTICS-tab" i]::before {
-webkit-mask: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/svgs/settingsicons/analytics.svg) center/contain no-repeat;
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="black" d="M 2.4000067,0 C 1.075203,0 0,1.074003 0,2.4000067 V 16.800047 c 0,1.324803 1.075203,2.400006 2.4000067,2.400006 h 3.60001 v 4.800014 l 4.7999463,-4.800014 h 10.80003 C 22.925997,19.200053 24,18.12485 24,16.800047 V 2.4000067 C 24,1.074003 22.925997,0 21.599993,0 Z"/></svg>

After

Width:  |  Height:  |  Size: 378 B