Skip to content

Commit

Permalink
🐛 spinning sync icon
Browse files Browse the repository at this point in the history
fixes #23975
  • Loading branch information
joaomoreno committed Apr 21, 2017
1 parent 34cdf9f commit 6097966
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions extensions/git/src/statusbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class SyncStatusBar {
}

if (this.state.isSyncRunning) {
icon = '$(sync~spin)';
text = '';
command = '';
tooltip = localize('syncing changes', "Synchronizing changes...");
Expand Down
6 changes: 3 additions & 3 deletions src/vs/base/browser/ui/octiconLabel/octiconLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*--------------------------------------------------------------------------------------------*/
'use strict';


import 'vs/css!./octicons/octicons';
import 'vs/css!./octicons/octicons-animations';
import { escape } from 'vs/base/common/strings';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

@keyframes octicon-spin {
100% {
transform:rotate(360deg);
}
}

.octicon-animation-spin {
animation: octicon-spin 2s linear infinite;
}

0 comments on commit 6097966

Please sign in to comment.