mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 10:27:03 -04:00
Drop DoNotLeak + Extras
Co-Authored-By: thororen1234 <thororen1234@users.noreply.github.com> Co-Authored-By: thororen <78185467+thororen1234@users.noreply.github.com> Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com> Co-Authored-By: ynot01 <ynot000001@gmail.com> Co-Authored-By: MrDiamondDog <84212701+MrDiamondDog@users.noreply.github.com> Co-Authored-By: Crxaw <48805031+sitescript@users.noreply.github.com>
This commit is contained in:
parent
22bb603da1
commit
14bbde33cb
17 changed files with 68 additions and 223 deletions
|
@ -86,7 +86,11 @@ async function generateDebugInfoMessage() {
|
|||
`v${VERSION} • [${gitHash}](<https://github.com/Equicord/Equicord/commit/${gitHash}>)` +
|
||||
`${SettingsPlugin.additionalInfo} - ${Intl.DateTimeFormat("en-GB", { dateStyle: "medium" }).format(BUILD_TIMESTAMP)}`,
|
||||
Client: `${RELEASE_CHANNEL} ~ ${client}`,
|
||||
Platform: window.navigator.platform
|
||||
Platform: typeof DiscordNative !== "undefined" ?
|
||||
`${DiscordNative.process.platform === "darwin" ?
|
||||
(DiscordNative.process.arch === "arm64" ? "MacSilicon" : "MacIntel") :
|
||||
(DiscordNative.process.platform === "win32" && DiscordNative.process.arch === "x64" ? "Windows" : DiscordNative.process.platform)}` :
|
||||
window.navigator.platform
|
||||
};
|
||||
|
||||
if (IS_DISCORD_DESKTOP) {
|
||||
|
|
|
@ -95,7 +95,7 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
|
||||
replacement: {
|
||||
match: /this\.renderNameZone\(\).+?children:\[/,
|
||||
match: /className:\i\.buttons,.{0,50}children:\[/,
|
||||
replace: "$&$self.GameActivityToggleButton(),"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ export default definePlugin({
|
|||
|
||||
if (!msg.attachments.length && !msg.embeds.length && !msg.stickerItems.length && !hasAttachmentsInShapshots) return null;
|
||||
|
||||
const isHidden = hiddenMessages?.has(msg.id) ?? false;
|
||||
const isHidden = hiddenMessages?.has(msg.id) || false;
|
||||
|
||||
return {
|
||||
label: isHidden ? "Show Media" : "Hide Media",
|
||||
|
@ -93,7 +93,8 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
shouldHide(messageId: string) {
|
||||
return hiddenMessages?.has(messageId) ?? false;
|
||||
return hiddenMessages?.has(messageId) || false;
|
||||
|
||||
},
|
||||
|
||||
async toggleHide(channelId: string, messageId: string) {
|
||||
|
|
|
@ -197,6 +197,11 @@ const settings = definePluginSettings({
|
|||
description: "show the Last.fm logo by the album cover",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
},
|
||||
alwaysHideArt: {
|
||||
description: "Disable downloading album art",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: false,
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -279,7 +284,7 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
getLargeImage(track: TrackData): string | undefined {
|
||||
if (track.imageUrl && !track.imageUrl.includes(placeholderId))
|
||||
if (!settings.store.alwaysHideArt && track.imageUrl && !track.imageUrl.includes(placeholderId))
|
||||
return track.imageUrl;
|
||||
|
||||
if (settings.store.missingArt === "placeholder")
|
||||
|
|
|
@ -57,7 +57,7 @@ export function TranslationAccessory({ message }: { message: Message; }) {
|
|||
<span className={cl("accessory")}>
|
||||
<TranslateIcon width={16} height={16} className={cl("accessory-icon")} />
|
||||
{Parser.parse(translation.text)}
|
||||
{" "}
|
||||
<br />
|
||||
(translated from {translation.sourceLanguage} - <Dismiss onDismiss={() => setTranslation(undefined)} />)
|
||||
</span>
|
||||
);
|
||||
|
|
|
@ -22,12 +22,21 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co
|
|||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { ChannelStore, Menu } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { settings } from "./settings";
|
||||
import { setShouldShowTranslateEnabledTooltip, TranslateChatBarIcon, TranslateIcon } from "./TranslateIcon";
|
||||
import { handleTranslate, TranslationAccessory } from "./TranslationAccessory";
|
||||
import { translate } from "./utils";
|
||||
|
||||
interface IMessageCreate {
|
||||
type: "MESSAGE_CREATE";
|
||||
optimistic: boolean;
|
||||
isPushNotification: boolean;
|
||||
channelId: string;
|
||||
message: Message;
|
||||
}
|
||||
|
||||
const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }) => {
|
||||
if (!message.content) return;
|
||||
|
||||
|
|
|
@ -78,6 +78,11 @@ export const settings = definePluginSettings({
|
|||
description: "Show a tooltip on the ChatBar button whenever a message is automatically translated",
|
||||
default: true
|
||||
},
|
||||
disableOnSameLanguage: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Disable auto translate if the current language doesnt change",
|
||||
default: true
|
||||
}
|
||||
}).withPrivateSettings<{
|
||||
showAutoTranslateAlert: boolean;
|
||||
}>();
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { ChannelStore, SelectedChannelStore } from "@webpack/common";
|
||||
import { ChannelRouter, ChannelStore, SelectedChannelStore } from "@webpack/common";
|
||||
|
||||
const timers = {} as Record<string, {
|
||||
timeout?: NodeJS.Timeout;
|
||||
|
@ -28,7 +28,7 @@ const timers = {} as Record<string, {
|
|||
export default definePlugin({
|
||||
name: "VoiceChatDoubleClick",
|
||||
description: "Join voice chats via double click instead of single click",
|
||||
authors: [Devs.Ven, Devs.D3SOX],
|
||||
authors: [Devs.Ven, Devs.D3SOX, Devs.sadan],
|
||||
patches: [
|
||||
...[
|
||||
".handleVoiceStatusClick", // voice channels
|
||||
|
@ -54,9 +54,25 @@ export default definePlugin({
|
|||
replace: (_, onClick, props) => ""
|
||||
+ `onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${props})&&${onClick}()`,
|
||||
}
|
||||
},
|
||||
// Voice channels in the active now section
|
||||
{
|
||||
find: ',["embedded_background"]',
|
||||
replacement: {
|
||||
// There are two onClick events for this section, one for the server icon, and another for the channel name
|
||||
// The server icon takes you to the voice channel, but doesnt join it. The channel name joins the voice channel
|
||||
match: /(?=children)(?<=selectVoiceChannel\((\i)\.id\).{0,100})/,
|
||||
replace: "onClick:$self.goToChannel.bind(null,$1),"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
goToChannel(props: { id?: string; } | undefined) {
|
||||
const { id } = props ?? {};
|
||||
if (!id) return console.error("No channel id found");
|
||||
ChannelRouter.transitionToChannel(id);
|
||||
},
|
||||
|
||||
shouldRunOnClick(e: MouseEvent, { channelId }) {
|
||||
const channel = ChannelStore.getChannel(channelId);
|
||||
if (!channel || ![2, 13].includes(channel.type)) return true;
|
||||
|
|
|
@ -273,7 +273,7 @@ export default definePlugin({
|
|||
muteMessage: {
|
||||
type: OptionType.STRING,
|
||||
description: "Mute Message (only self for now)",
|
||||
default: "{{USER}} Muted"
|
||||
default: "{{USER}} muted"
|
||||
},
|
||||
unmuteMessage: {
|
||||
type: OptionType.STRING,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue