diff --git a/src/components/jar_details/JarDetailsOverlay.module.css b/src/components/jar_details/JarDetailsOverlay.module.css index 772c8a07..cc521477 100644 --- a/src/components/jar_details/JarDetailsOverlay.module.css +++ b/src/components/jar_details/JarDetailsOverlay.module.css @@ -104,6 +104,11 @@ border-radius: 0.35rem; } +.freezeUnfreezeButtonsContainer button:disabled { + color: var(--bs-gray-800) !important; + border-color: var(--bs-gray-900) !important; +} + .freezeBtn { color: var(--bs-blue) !important; border-color: var(--bs-blue) !important; @@ -111,6 +116,7 @@ .freezeBtn:hover { background-color: rgba(13, 110, 253, 0.07) !important; } + .unfreezeBtn { color: var(--bs-red) !important; border-color: var(--bs-red) !important; @@ -123,6 +129,11 @@ background-color: var(--bs-gray-800) !important; } +:root[data-theme='dark'] .freezeUnfreezeButtonsContainer button:disabled { + color: var(--bs-gray-400) !important; + border-color: var(--bs-gray-500) !important; +} + :root[data-theme='dark'] .freezeUnfreezeButtonsContainer button:hover { background-color: var(--bs-gray-900) !important; border-color: var(--bs-gray-900) !important; diff --git a/src/components/jar_details/JarDetailsOverlay.tsx b/src/components/jar_details/JarDetailsOverlay.tsx index f1970d72..c97b0256 100644 --- a/src/components/jar_details/JarDetailsOverlay.tsx +++ b/src/components/jar_details/JarDetailsOverlay.tsx @@ -99,9 +99,12 @@ const JarDetailsOverlay = (props: JarDetailsOverlayProps) => { const settings = useSettings() const reloadCurrentWalletInfo = useReloadCurrentWalletInfo() const serviceInfo = useServiceInfo() + + const isCoinjoinInProgress = useMemo(() => serviceInfo?.coinjoinInProgress === true, [serviceInfo]) + const isMakerRunning = useMemo(() => serviceInfo?.makerRunning === true, [serviceInfo]) const isTakerOrMakerRunning = useMemo( - () => serviceInfo && (serviceInfo.makerRunning || serviceInfo.coinjoinInProgress), - [serviceInfo], + () => isCoinjoinInProgress || isMakerRunning, + [isCoinjoinInProgress, isMakerRunning], ) const [alert, setAlert] = useState() @@ -370,15 +373,32 @@ const JarDetailsOverlay = (props: JarDetailsOverlayProps) => { + {!isActionsEnabled && ( +
+ + {isCoinjoinInProgress && ( + + )} + {isMakerRunning && ( + + )} + {!isMakerRunning && !isCoinjoinInProgress && ( + + )} +
+ )} {selectedUtxos.length > 0 && (
- {isActionsEnabled && ( -
- {freezeButton} - {unfreezeButton} -
- )} +
+ {freezeButton} + {unfreezeButton} +
{selectedUtxosBalance > 0 && (
diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index d1744938..eecb3802 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -719,7 +719,10 @@ "utxo_detail_label_confirmations": "Confirmations", "utxo_detail_label_is_frozen": "Is frozen", "utxo_detail_label_locktime": "Locktime", - "utxo_detail_label_status": "Address status" + "utxo_detail_label_status": "Address status", + "text_actions_disabled": "Some operations are disabled.", + "text_actions_disabled_maker_running": "Earn is active. Some operations are disabled.", + "text_actions_disabled_taker_running": "A collaborative transaction is currently in progress. Some operations are disabled." } }, "show_utxos": {