diff options
| author | Haishan <[email protected]> | 2020-12-06 20:12:16 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-12-06 21:09:18 +0800 |
| commit | b0b0edab16c99ce9cef0bbb4cd10e05a3cb3ffd7 (patch) | |
| tree | f7b487afda73e507f7130b8057782d406ef71665 /src/components/proxies | |
| parent | d2b01d80fb8dae8e3400bb09038d3afbcbd55495 (diff) | |
build: upgrade deps
Diffstat (limited to 'src/components/proxies')
| -rw-r--r-- | src/components/proxies/Proxies.module.css | 27 | ||||
| -rw-r--r-- | src/components/proxies/Proxies.tsx | 31 |
2 files changed, 11 insertions, 47 deletions
diff --git a/src/components/proxies/Proxies.module.css b/src/components/proxies/Proxies.module.css index 1a73d76..c0aed39 100644 --- a/src/components/proxies/Proxies.module.css +++ b/src/components/proxies/Proxies.module.css @@ -34,30 +34,3 @@ padding: 10px 40px; } } - -.spining { - position: relative; - border-radius: 50%; - background: linear-gradient(60deg, #e66465, #9198e5); -} -.spining:before { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - border: 2px solid transparent; - border-top-color: currentColor; - border-radius: 50%; - animation: spining_keyframes 1s linear infinite; -} - -@keyframes spining_keyframes { - 0% { - transform: rotate(0); - } - 100% { - transform: rotate(360deg); - } -} diff --git a/src/components/proxies/Proxies.tsx b/src/components/proxies/Proxies.tsx index 6c3db7d..d36a568 100644 --- a/src/components/proxies/Proxies.tsx +++ b/src/components/proxies/Proxies.tsx @@ -15,7 +15,7 @@ import { import Button from '../Button'; import ContentHeader from '../ContentHeader'; import BaseModal from '../shared/BaseModal'; -import { Fab, position as fabPosition } from '../shared/Fab'; +import { Fab, IsFetching, position as fabPosition } from '../shared/Fab'; import { connect, useStoreActions } from '../StateProvider'; import Equalizer from '../svg/Equalizer'; import { ClosePrevConns } from './ClosePrevConns'; @@ -121,10 +121,18 @@ function Proxies({ <ProxyProviderList items={proxyProviders} /> <div style={{ height: 60 }} /> <Fab - icon={isTestingLatency ? <ColorZap /> : <Zap width={16} height={16} />} + icon={ + isTestingLatency ? ( + <IsFetching> + <Zap width={16} height={16} /> + </IsFetching> + ) : ( + <Zap width={16} height={16} /> + ) + } onClick={requestDelayAllFn} text={t('Test Latency')} - position={fabPosition} + style={fabPosition} /> <BaseModal isOpen={showModalClosePrevConns} @@ -139,23 +147,6 @@ function Proxies({ ); } -function ColorZap() { - return ( - <div - className={s0.spining} - style={{ - width: 48, - height: 48, - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - }} - > - <Zap width={16} height={16} /> - </div> - ); -} - const mapState = (s) => ({ apiConfig: getClashAPIConfig(s), groupNames: getProxyGroupNames(s), |
