From c0521c8150f98833fd60ab72ae4a3a48e045225e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=9B=BD=E7=92=87?= Date: Tue, 6 Aug 2024 14:36:47 +0800 Subject: [PATCH] fix: metadata switch ui --- .../src/metadata/metadata-status-manage-dialog/index.css | 5 +++++ frontend/src/metadata/metadata-status-manage-dialog/index.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/metadata/metadata-status-manage-dialog/index.css b/frontend/src/metadata/metadata-status-manage-dialog/index.css index 3c63adb5d31..c75135e7ac8 100644 --- a/frontend/src/metadata/metadata-status-manage-dialog/index.css +++ b/frontend/src/metadata/metadata-status-manage-dialog/index.css @@ -6,6 +6,11 @@ padding-left: 0; } +.metadata-status-management-dialog .change-metadata-status-management:not(.disabled) .custom-switch:hover, +.metadata-status-management-dialog .change-metadata-status-management:not(.disabled) .custom-switch:hover * { + cursor: pointer; +} + .metadata-status-management-dialog .tip { font-size: 12px; } diff --git a/frontend/src/metadata/metadata-status-manage-dialog/index.js b/frontend/src/metadata/metadata-status-manage-dialog/index.js index ad00138d294..637161fdc99 100644 --- a/frontend/src/metadata/metadata-status-manage-dialog/index.js +++ b/frontend/src/metadata/metadata-status-manage-dialog/index.js @@ -1,5 +1,6 @@ import React, { useCallback, useState } from 'react'; import PropTypes from 'prop-types'; +import classnames from 'classnames'; import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap'; import { gettext } from '../../utils/constants'; import Switch from '../../components/common/switch'; @@ -45,7 +46,7 @@ const MetadataStatusManagementDialog = ({ value: oldValue, repoID, toggle, submi disabled={submitting} size="large" textPosition="right" - className="change-metadata-status-management w-100" + className={classnames('change-metadata-status-management w-100', { 'disabled': submitting })} onChange={onValueChange} placeholder={gettext('Enable extended properties')} />