diff options
author | Vendicated <vendicated@riseup.net> | 2023-01-11 01:50:00 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-01-11 01:50:00 +0100 |
commit | 19c9a132733dfb67de6d62d6da1348944cbe1146 (patch) | |
tree | 36263364d3b243d5d3a3fa35a38319bb14b85257 | |
parent | c525672777942179bec8762da6394fa2449536d4 (diff) | |
download | Vencord-19c9a132733dfb67de6d62d6da1348944cbe1146.tar.gz Vencord-19c9a132733dfb67de6d62d6da1348944cbe1146.tar.bz2 Vencord-19c9a132733dfb67de6d62d6da1348944cbe1146.zip |
Fix InvisibleChat button getting hidden by themes
-rw-r--r-- | src/plugins/invisibleChat/components/DecryptionModal.tsx (renamed from src/plugins/invisiblechat/components/DecryptionModal.tsx) | 0 | ||||
-rw-r--r-- | src/plugins/invisibleChat/components/EncryptionModal.tsx (renamed from src/plugins/invisiblechat/components/EncryptionModal.tsx) | 0 | ||||
-rw-r--r-- | src/plugins/invisibleChat/index.tsx (renamed from src/plugins/invisiblechat/index.tsx) | 61 |
3 files changed, 35 insertions, 26 deletions
diff --git a/src/plugins/invisiblechat/components/DecryptionModal.tsx b/src/plugins/invisibleChat/components/DecryptionModal.tsx index 7d70444..7d70444 100644 --- a/src/plugins/invisiblechat/components/DecryptionModal.tsx +++ b/src/plugins/invisibleChat/components/DecryptionModal.tsx diff --git a/src/plugins/invisiblechat/components/EncryptionModal.tsx b/src/plugins/invisibleChat/components/EncryptionModal.tsx index f650f28..f650f28 100644 --- a/src/plugins/invisiblechat/components/EncryptionModal.tsx +++ b/src/plugins/invisibleChat/components/EncryptionModal.tsx diff --git a/src/plugins/invisiblechat/index.tsx b/src/plugins/invisibleChat/index.tsx index 89d2d61..e2f7769 100644 --- a/src/plugins/invisiblechat/index.tsx +++ b/src/plugins/invisibleChat/index.tsx @@ -70,32 +70,41 @@ function ChatBarIcon() { <Tooltip text="Encrypt Message"> {({ onMouseEnter, onMouseLeave }) => ( // size="" = Button.Sizes.NONE - <Button - aria-haspopup="dialog" - aria-label="Encrypt Message" - size="" - look={ButtonLooks.BLANK} - onMouseEnter={onMouseEnter} - onMouseLeave={onMouseLeave} - innerClassName={ButtonWrapperClasses.button} - onClick={() => buildEncModal()} - style={{ marginRight: "2px" }} - > - <div className={ButtonWrapperClasses.buttonWrapper}> - <svg - aria-hidden - role="img" - width="24" - height="24" - viewBox={"0 0 64 64"} - style={{ scale: "1.1" }} - > - <path fill="currentColor" d="M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z" /> - </svg> - </div> - </Button> - )} - </Tooltip> + /* + many themes set "> button" to display: none, as the gift button is + the only directly descending button (all the other elements are divs.) + Thus, wrap in a div here to avoid getting hidden by that. + flex is for some reason necessary as otherwise the button goes flying off + */ + <div style={{ display: "flex" }}> + <Button + aria-haspopup="dialog" + aria-label="Encrypt Message" + size="" + look={ButtonLooks.BLANK} + onMouseEnter={onMouseEnter} + onMouseLeave={onMouseLeave} + innerClassName={ButtonWrapperClasses.button} + onClick={() => buildEncModal()} + style={{ marginRight: "2px" }} + > + <div className={ButtonWrapperClasses.buttonWrapper}> + <svg + aria-hidden + role="img" + width="24" + height="24" + viewBox={"0 0 64 64"} + style={{ scale: "1.1" }} + > + <path fill="currentColor" d="M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z" /> + </svg> + </div> + </Button> + </div> + ) + } + </Tooltip > ); } |