From 35c9e26aef189f5572225d98bbc041f2636864be Mon Sep 17 00:00:00 2001 From: AlphaX-Qortal Date: Thu, 27 Feb 2025 10:15:28 +0100 Subject: [PATCH] Add tooltips --- src/App.tsx | 227 ++++++++++++++++++++++------ src/components/Chat/ChatOptions.tsx | 73 ++++++++- src/components/QMailStatus.tsx | 32 +++- 3 files changed, 272 insertions(+), 60 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3453234..176d140 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1547,18 +1547,38 @@ function App() { {!isMobile && ( <> - { - logoutFunc(); - setIsOpenDrawerProfile(false); + LOG OUT} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, }} - style={{ - cursor: "pointer", - width: '20px', - height: 'auto' - }} - /> + > + { + logoutFunc(); + setIsOpenDrawerProfile(false); + }} + style={{ + cursor: "pointer", + width: '20px', + height: 'auto' + }} + /> + )} @@ -1568,38 +1588,98 @@ function App() { setIsSettingsOpen(true); }} > - SETTINGS} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, }} - /> + > + + {authenticatedMode === "qort" && ( - { - setAuthenticatedMode("ltc"); + LITECOIN WALLET} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, }} - src={ltcLogo} - style={{ - cursor: "pointer", - width: "20px", - height: "auto", - }} - /> + > + { + setAuthenticatedMode("ltc"); + }} + src={ltcLogo} + style={{ + cursor: "pointer", + width: "20px", + height: "auto", + }} + /> + )} {authenticatedMode === "ltc" && ( - { - setAuthenticatedMode("qort"); + QORTAL WALLET} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, }} - src={qortLogo} - style={{ - cursor: "pointer", - width: "20px", - height: "auto", - }} - /> + > + { + setAuthenticatedMode("qort"); + }} + src={qortLogo} + style={{ + cursor: "pointer", + width: "20px", + height: "auto", + }} + /> + )} @@ -1636,9 +1716,9 @@ function App() { downloadResource, getIndividualUserInfo, isUserBlocked, - addToBlockList, - removeBlockFromList, - getAllBlockedUsers + addToBlockList, + removeBlockFromList, + getAllBlockedUsers }} > @@ -1661,30 +1741,82 @@ function App() { }) } }}> - + MINTING STATUS} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > + + - {(desktopViewMode === "apps" || desktopViewMode === "home") && ( { if(desktopViewMode === "apps"){ showTutorial('qapps', true) - } else { showTutorial('getting-started', true) - } }} > - + TUTORIAL} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > + + )} + BACKUP WALLET} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > { setExtstate("download-wallet"); @@ -1696,6 +1828,7 @@ function App() { width: '20px' }} /> + diff --git a/src/components/Chat/ChatOptions.tsx b/src/components/Chat/ChatOptions.tsx index 3640bd1..4e7a7d3 100644 --- a/src/components/Chat/ChatOptions.tsx +++ b/src/components/Chat/ChatOptions.tsx @@ -6,6 +6,7 @@ import { MenuItem, Select, Typography, + Tooltip } from "@mui/material"; import React, { useEffect, useMemo, useRef, useState } from "react"; import SearchIcon from "@mui/icons-material/Search"; @@ -575,7 +576,27 @@ export const ChatOptions = ({ messages : untransformedMessages, goToMessage, mem { setMode("search") }}> - + SEARCH} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > + + { setMode("default") @@ -583,9 +604,27 @@ export const ChatOptions = ({ messages : untransformedMessages, goToMessage, mem setSelectedMember(0) openQManager() }}> - + Q-MANAGER} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > + + { @@ -593,9 +632,29 @@ export const ChatOptions = ({ messages : untransformedMessages, goToMessage, mem setSearchValue('') setSelectedMember(0) }}> - 0 && (!lastMentionTimestamp || lastMentionTimestamp < mentionList[0]?.timestamp) ? 'var(--unread)' : 'white' - }} /> + MENTIONED} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > + 0 && (!lastMentionTimestamp || lastMentionTimestamp < mentionList[0]?.timestamp) ? 'var(--unread)' : 'white' + }} /> + diff --git a/src/components/QMailStatus.tsx b/src/components/QMailStatus.tsx index 2787336..cb1642a 100644 --- a/src/components/QMailStatus.tsx +++ b/src/components/QMailStatus.tsx @@ -3,7 +3,7 @@ import QMailLogo from '../assets/QMailLogo.png' import { useRecoilState } from 'recoil' import { mailsAtom, qMailLastEnteredTimestampAtom } from '../atoms/global' import { isLessThanOneWeekOld } from './Group/QMailMessages' -import { ButtonBase } from '@mui/material' +import { ButtonBase, Tooltip } from '@mui/material' import { executeEvent } from '../utils/events' export const QMailStatus = () => { const [lastEnteredTimestamp, setLastEnteredTimestamp] = useRecoilState(qMailLastEnteredTimestampAtom) @@ -23,7 +23,8 @@ export const QMailStatus = () => { setLastEnteredTimestamp(Date.now()) }} style={{ position: 'relative' - }}>{hasNewMail && ( + }}> + {hasNewMail && (
{ borderRadius: '50%', outline: '1px solid white' }} /> - )} + )} + Q-MAIL} + placement="left" + arrow + sx={{ fontSize: "24" }} + slotProps={{ + tooltip: { + sx: { + color: "#ffffff", + backgroundColor: "#444444", + }, + }, + arrow: { + sx: { + color: "#444444", + }, + }, + }} + > + + + ) }