Skip to content

Commit

Permalink
add update animation
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Aug 14, 2024
1 parent f596888 commit d7af082
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderer/src/pages/profiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const Profiles: React.FC = () => {
const { current, items = [] } = profileConfig || {}
const [sortedItems, setSortedItems] = useState(items)
const [importing, setImporting] = useState(false)
const [updating, setUpdating] = useState(false)
const [fileOver, setFileOver] = useState(false)
const [url, setUrl] = useState('')
const sensors = useSensors(useSensor(PointerSensor))
Expand Down Expand Up @@ -101,7 +102,9 @@ const Profiles: React.FC = () => {
<Button
size="sm"
color="primary"
isLoading={updating}
onPress={async () => {
setUpdating(true)
for (const item of items) {
if (item.id === current) continue
if (item.type !== 'remote') continue
Expand All @@ -111,6 +114,7 @@ const Profiles: React.FC = () => {
if (currentItem && currentItem.type === 'remote') {
await addProfileItem(currentItem)
}
setUpdating(false)
}}
>
更新全部订阅
Expand Down

0 comments on commit d7af082

Please sign in to comment.