mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
fix: the link button with disabled style but can click (#1390)
This commit is contained in:
parent
19dce838d1
commit
e3c36beaf4
@ -9,7 +9,7 @@
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
"antd": "5.0.3",
|
||||
"antd": "5.0.5",
|
||||
"codemirror": "^5.61.1",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"core-js": "^3.25.0",
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import React from "react";
|
||||
import * as Setting from "./Setting";
|
||||
import {Dropdown, Menu} from "antd";
|
||||
import {Dropdown} from "antd";
|
||||
import "./App.less";
|
||||
|
||||
function flagIcon(country, alt) {
|
||||
@ -53,15 +53,12 @@ class SelectLanguageBox extends React.Component {
|
||||
|
||||
render() {
|
||||
const languageItems = this.getOrganizationLanguages(this.state.languages);
|
||||
const menu = (
|
||||
<Menu items={languageItems} onClick={(e) => {
|
||||
Setting.setLanguage(e.key);
|
||||
}}>
|
||||
</Menu>
|
||||
);
|
||||
const onClick = (e) => {
|
||||
Setting.setLanguage(e.key);
|
||||
};
|
||||
|
||||
return (
|
||||
<Dropdown overlay={menu} >
|
||||
<Dropdown menu={{items: languageItems, onClick}} >
|
||||
<div className="language-box" style={{display: languageItems.length === 0 ? "none" : null, ...this.props.style}} />
|
||||
</Dropdown>
|
||||
);
|
||||
|
@ -164,7 +164,7 @@ class OAuthWidget extends React.Component {
|
||||
</span>
|
||||
{
|
||||
linkedValue === "" ? (
|
||||
<a key={provider.displayName} href={Provider.getAuthUrl(application, provider, "link")}>
|
||||
<a key={provider.displayName} href={user.id !== account.id ? null : Provider.getAuthUrl(application, provider, "link")}>
|
||||
<Button style={{marginLeft: "20px", width: "80px"}} type="primary" disabled={user.id !== account.id}>{i18next.t("user:Link")}</Button>
|
||||
</a>
|
||||
) : (
|
||||
|
@ -2096,6 +2096,13 @@
|
||||
schema-utils "^3.0.0"
|
||||
source-map "^0.7.3"
|
||||
|
||||
"@rc-component/mini-decimal@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@rc-component/mini-decimal/-/mini-decimal-1.0.1.tgz#e5dbc20a6a5b0e234d279bc71ce730ab865d3910"
|
||||
integrity sha512-9N8nRk0oKj1qJzANKl+n9eNSMUGsZtjwNuDCiZ/KA+dt1fE3zq5x2XxclRcAbOIXnZcJ53ozP2Pa60gyELXagA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.18.0"
|
||||
|
||||
"@rc-component/portal@^1.0.0-6", "@rc-component/portal@^1.0.0-8", "@rc-component/portal@^1.0.0-9", "@rc-component/portal@^1.0.2":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@rc-component/portal/-/portal-1.0.3.tgz#3aa2c229a7a20ac2412d864e8977e6377973416e"
|
||||
@ -3134,10 +3141,10 @@ ansi-styles@^6.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3"
|
||||
integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==
|
||||
|
||||
antd@5.0.3:
|
||||
version "5.0.3"
|
||||
resolved "https://registry.yarnpkg.com/antd/-/antd-5.0.3.tgz#2cdaffe1afdb5c2f0f3325b2d06d508ec6ddf85a"
|
||||
integrity sha512-Gqkba0earlR5H6gfT4nsyV3W9rL1Up1+clEXsa1+9Jem/geC2phBImpjWgVjqOjH3L5Oi8SHe0NeYBagDxwP5g==
|
||||
antd@5.0.5:
|
||||
version "5.0.5"
|
||||
resolved "https://registry.yarnpkg.com/antd/-/antd-5.0.5.tgz#16f0ade8b2d2ea9f7bd47a8e0af81884dc504a7d"
|
||||
integrity sha512-8jWUjZ65urNHZPg9/Ywa9V0PlNfqjhewKgSPF4nraN9X5v434lDJkRBQGN7meNixQ6aM2B/JhXPm9UaJ/tAQmA==
|
||||
dependencies:
|
||||
"@ant-design/colors" "^6.0.0"
|
||||
"@ant-design/cssinjs" "^1.0.0"
|
||||
@ -3159,7 +3166,7 @@ antd@5.0.3:
|
||||
rc-field-form "~1.27.0"
|
||||
rc-image "~5.12.0"
|
||||
rc-input "~0.1.4"
|
||||
rc-input-number "~7.3.9"
|
||||
rc-input-number "~7.4.0"
|
||||
rc-mentions "~1.13.1"
|
||||
rc-menu "~9.8.0"
|
||||
rc-motion "^2.6.1"
|
||||
@ -3175,15 +3182,15 @@ antd@5.0.3:
|
||||
rc-steps "~6.0.0-alpha.2"
|
||||
rc-switch "~4.0.0"
|
||||
rc-table "~7.26.0"
|
||||
rc-tabs "~12.4.1"
|
||||
rc-tabs "~12.4.2"
|
||||
rc-textarea "~0.4.5"
|
||||
rc-tooltip "~5.2.0"
|
||||
rc-tree "~5.7.0"
|
||||
rc-tree-select "~5.5.4"
|
||||
rc-trigger "^5.2.10"
|
||||
rc-upload "~4.3.0"
|
||||
rc-util "^5.22.5"
|
||||
scroll-into-view-if-needed "^2.2.25"
|
||||
rc-util "^5.25.2"
|
||||
scroll-into-view-if-needed "^3.0.3"
|
||||
shallowequal "^1.1.0"
|
||||
|
||||
anymatch@^3.0.3, anymatch@~3.1.2:
|
||||
@ -4011,10 +4018,10 @@ compression@^1.7.4:
|
||||
safe-buffer "5.1.2"
|
||||
vary "~1.1.2"
|
||||
|
||||
compute-scroll-into-view@^1.0.17:
|
||||
version "1.0.17"
|
||||
resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.17.tgz#6a88f18acd9d42e9cf4baa6bec7e0522607ab7ab"
|
||||
integrity sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg==
|
||||
compute-scroll-into-view@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-2.0.2.tgz#ac5cc71ca833884866e581a82d8558a6ed7ee877"
|
||||
integrity sha512-W+4Iti92hktsTtNPNeRM1vE0JdqCBk5qIabRafpr5pGrQhQ+xzCv0NGnFzTCKmW4yGLm9Aovbw8YNxloe2z9tQ==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
@ -8934,12 +8941,13 @@ rc-image@~5.12.0:
|
||||
rc-dialog "~9.0.0"
|
||||
rc-util "^5.0.6"
|
||||
|
||||
rc-input-number@~7.3.9:
|
||||
version "7.3.11"
|
||||
resolved "https://registry.yarnpkg.com/rc-input-number/-/rc-input-number-7.3.11.tgz#c7089705a220e1a59ba974fabf89693e00dd2442"
|
||||
integrity sha512-aMWPEjFeles6PQnMqP5eWpxzsvHm9rh1jQOWXExUEIxhX62Fyl/ptifLHOn17+waDG1T/YUb6flfJbvwRhHrbA==
|
||||
rc-input-number@~7.4.0:
|
||||
version "7.4.0"
|
||||
resolved "https://registry.yarnpkg.com/rc-input-number/-/rc-input-number-7.4.0.tgz#b8b4ffa8bbc04198e79ce8b9611756d046d128ec"
|
||||
integrity sha512-r/Oub/sPYbzqLNUOHnnc9sbCu78a81KX+RCbRwmpvB4W6nptUySbdWS5KHV4Hak5CAE1LAd+wWm5JjvZizG1FA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.10.1"
|
||||
"@rc-component/mini-decimal" "^1.0.1"
|
||||
classnames "^2.2.5"
|
||||
rc-util "^5.23.0"
|
||||
|
||||
@ -9148,10 +9156,10 @@ rc-table@~7.26.0:
|
||||
rc-util "^5.22.5"
|
||||
shallowequal "^1.1.0"
|
||||
|
||||
rc-tabs@~12.4.1:
|
||||
version "12.4.1"
|
||||
resolved "https://registry.yarnpkg.com/rc-tabs/-/rc-tabs-12.4.1.tgz#a45aa7560ae4e2a91426e74a2e76566f5c8ec9cc"
|
||||
integrity sha512-yViBZypldDnPffk3IPTarplF1RAv8VQDDnOt9sHDU7pjCnqE72csCU+7kjbLPtPpYniIMQJYyWxh/lsBUcagSA==
|
||||
rc-tabs@~12.4.2:
|
||||
version "12.4.2"
|
||||
resolved "https://registry.yarnpkg.com/rc-tabs/-/rc-tabs-12.4.2.tgz#487a1b3f8d8cf0bfc121224013dab00d4a8e0532"
|
||||
integrity sha512-FFlGwuTjQUznWzJtyhmHc6KAp5lRQFxKUv9Aj1UtsOYe2e7WGmuzcrd+/LQchuPe0VjhaZPdGkmFGcqGqNO6ow==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.11.2"
|
||||
classnames "2.x"
|
||||
@ -9269,6 +9277,15 @@ rc-util@^5.21.2, rc-util@^5.23.0:
|
||||
react-is "^16.12.0"
|
||||
shallowequal "^1.1.0"
|
||||
|
||||
rc-util@^5.25.2:
|
||||
version "5.25.2"
|
||||
resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.25.2.tgz#09fd3ce88da7d2149427d51e40a84e3527f5a263"
|
||||
integrity sha512-OyCO675K/rh4zG3e+LYaHw54WQFEYGV9ibkGawQxqCvf0G0PzUrLQjgZ6SfoHORdbEKN7eQMFn3hHQyA/P8Y5Q==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.18.3"
|
||||
react-is "^16.12.0"
|
||||
shallowequal "^1.1.0"
|
||||
|
||||
rc-virtual-list@^3.2.0, rc-virtual-list@^3.4.8:
|
||||
version "3.4.8"
|
||||
resolved "https://registry.yarnpkg.com/rc-virtual-list/-/rc-virtual-list-3.4.8.tgz#c24c10c6940546b7e2a5e9809402c6716adfd26c"
|
||||
@ -9901,12 +9918,12 @@ schema-utils@^4.0.0:
|
||||
ajv-formats "^2.1.1"
|
||||
ajv-keywords "^5.0.0"
|
||||
|
||||
scroll-into-view-if-needed@^2.2.25:
|
||||
version "2.2.29"
|
||||
resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.29.tgz#551791a84b7e2287706511f8c68161e4990ab885"
|
||||
integrity sha512-hxpAR6AN+Gh53AdAimHM6C8oTN1ppwVZITihix+WqalywBeFcQ6LdQP5ABNl26nX8GTEL7VT+b8lKpdqq65wXg==
|
||||
scroll-into-view-if-needed@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.0.3.tgz#57256bef78f3c3c288070d2aaa63cf547aa11e70"
|
||||
integrity sha512-QoCH0lVw0tbA7Rl6sToH7e1tO3n95Oi6JgBgC8hEpNNZUC91MfasJ/4E1ZdbzGueNDZ+Y7ObfRaelKUgTyPbJA==
|
||||
dependencies:
|
||||
compute-scroll-into-view "^1.0.17"
|
||||
compute-scroll-into-view "^2.0.2"
|
||||
|
||||
select-hose@^2.0.0:
|
||||
version "2.0.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user