Skip to content

Commit 6097966

Browse files
committed
🐛 spinning sync icon
fixes microsoft#23975
1 parent 34cdf9f commit 6097966

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

extensions/git/src/statusbar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class SyncStatusBar {
126126
}
127127

128128
if (this.state.isSyncRunning) {
129+
icon = '$(sync~spin)';
129130
text = '';
130131
command = '';
131132
tooltip = localize('syncing changes', "Synchronizing changes...");

src/vs/base/browser/ui/octiconLabel/octiconLabel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
*--------------------------------------------------------------------------------------------*/
55
'use strict';
66

7-
87
import 'vs/css!./octicons/octicons';
8+
import 'vs/css!./octicons/octicons-animations';
99
import { escape } from 'vs/base/common/strings';
1010

1111
export function expand(text: string): string {
12-
return text.replace(/\$\(([^)]+)\)/g, (match, g1) => {
13-
return `<span class="octicon octicon-${g1}"></span>`;
12+
return text.replace(/\$\(((.+?)(~(.*?))?)\)/g, (match, g1, name, g3, animation) => {
13+
return `<span class="octicon octicon-${name} ${animation ? `octicon-animation-${animation}` : ''}"></span>`;
1414
});
1515
}
1616

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
@keyframes octicon-spin {
7+
100% {
8+
transform:rotate(360deg);
9+
}
10+
}
11+
12+
.octicon-animation-spin {
13+
animation: octicon-spin 2s linear infinite;
14+
}

0 commit comments

Comments
 (0)