diff options
author | LordElias <55048695+LordEliasTM@users.noreply.github.com> | 2023-03-18 04:37:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-18 04:37:55 +0100 |
commit | de53bc799134c15b8cf98064b97e3a08e88a7afb (patch) | |
tree | 93118ae110735e87ef939da8b124cbb18dc8b7fe /src/plugins/messageLogger/index.tsx | |
parent | 4c5a56a8a5730f4dca318fc7ee417a80168075a3 (diff) | |
download | Vencord-de53bc799134c15b8cf98064b97e3a08e88a7afb.tar.gz Vencord-de53bc799134c15b8cf98064b97e3a08e88a7afb.tar.bz2 Vencord-de53bc799134c15b8cf98064b97e3a08e88a7afb.zip |
messageLogger: fix edited timestamp styling & add i18n (#607)
Diffstat (limited to 'src/plugins/messageLogger/index.tsx')
-rw-r--r-- | src/plugins/messageLogger/index.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index 9242ce2..ef05cf3 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -24,11 +24,15 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import Logger from "@utils/Logger"; import definePlugin, { OptionType } from "@utils/types"; +import { findByPropsLazy, findLazy } from "@webpack"; import { moment, Parser, Timestamp, UserStore } from "@webpack/common"; import overlayStyle from "./deleteStyleOverlay.css?managed"; import textStyle from "./deleteStyleText.css?managed"; +const i18n = findLazy(m => m.Messages?.["en-US"]); +const styles = findByPropsLazy("edited", "communicationDisabled", "isSystemMessage"); + function addDeleteStyle() { if (Settings.plugins.MessageLogger.deleteStyle === "text") { enableStyle(textStyle); @@ -65,7 +69,7 @@ export default definePlugin({ isEdited={true} isInline={false} > - <span>{" "}(edited)</span> + <span className={styles.edited}>{" "}({i18n.Messages.MESSAGE_EDITED})</span> </Timestamp> </div> </ErrorBoundary> |