Skip to content

Commit

Permalink
feat(Translator): add context menu item icon (needs testing, too)
Browse files Browse the repository at this point in the history
  • Loading branch information
Socketlike committed Aug 25, 2024
1 parent 429d835 commit ccac696
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 0 deletions.
Empty file modified plugins/Translator/popoverPreview.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions plugins/Translator/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const start = async (): Promise<void> => {
injector.utils.addMenuItem(ContextMenuTypes.Message, ({ message }: { message: APIMessage }) => (
<ContextMenu.MenuItem
id='translate-message'
icon={() => (originalCache.has(message.id) ? <TranslateOffIcon /> : <TranslateIcon />)}
label={originalCache.has(message.id) ? 'Untranslate' : 'Translate'}
action={() =>
originalCache.has(message.id)
Expand Down
Empty file modified plugins/Translator/src/translator.ts
100755 → 100644
Empty file.

0 comments on commit ccac696

Please sign in to comment.