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:
panbread 2025-02-26 21:50:23 +04:00 committed by thororen1234
parent 7731a7f0e5
commit 83c3497951
No known key found for this signature in database
17 changed files with 68 additions and 223 deletions

View file

@ -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>
);

View file

@ -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;

View file

@ -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;
}>();