🐛 spinning sync icon

fixes #23975
This commit is contained in:
Joao Moreno
2017-04-21 12:40:05 +02:00
parent 34cdf9f9be
commit 6097966099
3 changed files with 18 additions and 3 deletions

View File

@@ -126,6 +126,7 @@ class SyncStatusBar {
}
if (this.state.isSyncRunning) {
icon = '$(sync~spin)';
text = '';
command = '';
tooltip = localize('syncing changes', "Synchronizing changes...");

View File

@@ -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>`;
});
}

View File

@@ -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;
}