diff options
| author | Haishan <[email protected]> | 2021-02-28 17:06:00 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2021-02-28 18:04:18 +0800 |
| commit | ec4586ef3c92f7d5125cb06286a2e44c59a24bb3 (patch) | |
| tree | a9f217c163ae7218160fce5545d167d74ee9a591 /src/components/rules | |
| parent | 27a66043403c7e619029bcf50dbc29893e173d07 (diff) | |
feat: add FAB action button to update all proxy providers
Diffstat (limited to 'src/components/rules')
| -rw-r--r-- | src/components/rules/RotateIcon.module.css | 16 | ||||
| -rw-r--r-- | src/components/rules/RotateIcon.tsx | 16 | ||||
| -rw-r--r-- | src/components/rules/RuleProviderItem.tsx | 2 | ||||
| -rw-r--r-- | src/components/rules/RulesPageFab.tsx | 2 |
4 files changed, 2 insertions, 34 deletions
diff --git a/src/components/rules/RotateIcon.module.css b/src/components/rules/RotateIcon.module.css deleted file mode 100644 index 60748de..0000000 --- a/src/components/rules/RotateIcon.module.css +++ /dev/null @@ -1,16 +0,0 @@ -.rotate { - display: inline-flex; -} -.isRotating { - animation: rotating 3s infinite linear; - animation-fill-mode: forwards; -} - -@keyframes rotating { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/components/rules/RotateIcon.tsx b/src/components/rules/RotateIcon.tsx deleted file mode 100644 index e2d4ad8..0000000 --- a/src/components/rules/RotateIcon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import cx from 'clsx'; -import * as React from 'react'; -import { RotateCw } from 'react-feather'; - -import s from './RotateIcon.module.css'; - -export function RotateIcon({ isRotating }: { isRotating: boolean }) { - const cls = cx(s.rotate, { - [s.isRotating]: isRotating, - }); - return ( - <span className={cls}> - <RotateCw width={16} /> - </span> - ); -} diff --git a/src/components/rules/RuleProviderItem.tsx b/src/components/rules/RuleProviderItem.tsx index 9d439c7..c92cd05 100644 --- a/src/components/rules/RuleProviderItem.tsx +++ b/src/components/rules/RuleProviderItem.tsx @@ -1,9 +1,9 @@ import { formatDistance } from 'date-fns'; import * as React from 'react'; import Button from 'src/components/Button'; -import { RotateIcon } from 'src/components/rules/RotateIcon'; import { useUpdateRuleProviderItem } from 'src/components/rules/rules.hooks'; import { SectionNameType } from 'src/components/shared/Basic'; +import { RotateIcon } from 'src/components/shared/RotateIcon'; import s from './RuleProviderItem.module.css'; diff --git a/src/components/rules/RulesPageFab.tsx b/src/components/rules/RulesPageFab.tsx index 3bf99ad..ce52a9a 100644 --- a/src/components/rules/RulesPageFab.tsx +++ b/src/components/rules/RulesPageFab.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { useTranslation } from 'react-i18next'; -import { RotateIcon } from 'src/components/rules/RotateIcon'; import { useUpdateAllRuleProviderItems } from 'src/components/rules/rules.hooks'; import { Fab, position as fabPosition } from 'src/components/shared/Fab'; +import { RotateIcon } from 'src/components/shared/RotateIcon'; import { ClashAPIConfig } from 'src/types'; type RulesPageFabProps = { |
