add refresh icon to fontawesome (#493)

This commit is contained in:
Alberto Iannaccone 2021-09-02 11:49:44 +01:00 committed by GitHub
parent a8ec7c2640
commit 3f8a07654d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 720 additions and 681 deletions

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,9 @@ i {
-moz-osx-font-smoothing: grayscale;
}
.fa-reload:before {
content: "\e900";
}
.fa-asterisk:before {
content: "\f069";
}

View File

@ -7,6 +7,7 @@
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="reload" d="M512.083-9.079c118.817 0 232.769 47.2 316.781 131.213 84.019 84.019 131.219 197.969 131.219 316.785 0 8.487-3.373 16.627-9.376 22.628-5.997 6.001-14.138 9.373-22.624 9.373s-16.627-3.372-22.63-9.373c-5.997-6.001-9.37-14.141-9.37-22.627-0.019-87.81-30.131-172.959-85.318-241.26s-132.115-115.622-217.962-134.086c-85.848-18.458-175.428-6.931-253.811 32.646-78.383 39.584-140.833 104.832-176.941 184.87-36.108 80.045-43.693 170.045-21.49 255.001s72.852 159.737 143.505 211.878c70.653 52.141 157.042 78.492 244.768 74.662s171.487-37.612 237.33-95.712h-158.081c-8.487 0-16.626-3.372-22.627-9.373s-9.373-14.141-9.373-22.627c0-8.487 3.372-16.627 9.373-22.628s14.14-9.372 22.627-9.372h224.001c8.486 0 16.627 3.371 22.624 9.372 6.003 6.001 9.376 14.141 9.376 22.628v224c0 8.487-3.373 16.626-9.376 22.627-5.997 6.001-14.138 9.373-22.624 9.373s-16.627-3.371-22.63-9.373c-5.997-6.001-9.37-14.14-9.37-22.627v-136.96c-55.162 46.332-120.678 78.68-191.002 94.301s-143.375 14.052-212.963-4.571c-69.588-18.623-133.659-53.753-186.78-102.41s-93.725-109.405-118.369-177.096c-24.644-67.69-32.602-140.324-23.199-211.745 9.404-71.419 35.891-139.521 77.216-198.523 41.325-59.008 96.27-107.174 160.174-140.422s134.885-50.598 206.922-50.573v0z" />
<glyph unicode="&#xf000;" glyph-name="glass" d="M970.857 844.571c0-16.571-13.143-33.143-24.571-44.571l-361.143-361.143v-438.857h182.857c20 0 36.571-16.571 36.571-36.571s-16.571-36.571-36.571-36.571h-512c-20 0-36.571 16.571-36.571 36.571s16.571 36.571 36.571 36.571h182.857v438.857l-361.143 361.143c-11.429 11.429-24.571 28-24.571 44.571 0 28 35.429 33.143 56.571 33.143h804.571c21.143 0 56.571-5.143 56.571-33.143z" />
<glyph unicode="&#xf001;" glyph-name="music" horiz-adv-x="878" d="M877.714 822.857v-640c0-80.571-120.571-109.714-182.857-109.714s-182.857 29.143-182.857 109.714 120.571 109.714 182.857 109.714c37.714 0 75.429-6.857 109.714-22.286v306.857l-438.857-135.429v-405.143c0-80.571-120.571-109.714-182.857-109.714s-182.857 29.143-182.857 109.714 120.571 109.714 182.857 109.714c37.714 0 75.429-6.857 109.714-22.286v552.571c0 24 16 45.143 38.857 52.571l475.429 146.286c5.143 1.714 10.286 2.286 16 2.286 30.286 0 54.857-24.571 54.857-54.857z" />
<glyph unicode="&#xf002;" glyph-name="search" horiz-adv-x="951" d="M658.286 475.428c0 141.143-114.857 256-256 256s-256-114.857-256-256 114.857-256 256-256 256 114.857 256 256zM950.857 0c0-40-33.143-73.143-73.143-73.143-19.429 0-38.286 8-51.429 21.714l-196 195.429c-66.857-46.286-146.857-70.857-228-70.857-222.286 0-402.286 180-402.286 402.286s180 402.286 402.286 402.286 402.286-180 402.286-402.286c0-81.143-24.571-161.143-70.857-228l196-196c13.143-13.143 21.143-32 21.143-51.429z" />

Before

Width:  |  Height:  |  Size: 667 KiB

After

Width:  |  Height:  |  Size: 668 KiB

View File

@ -96,3 +96,7 @@ button.theia-button.main {
align-items: center;
white-space: nowrap;
}
.fa-reload {
font-size: 14px;
}

View File

@ -63,7 +63,7 @@ export class UserStatus extends React.Component<
</div>
<div className="actions item flex-line">
<div
className={`refresh-icon ${
className={`fa fa-reload ${
(this.state.refreshing && 'rotating') || ''
}`}
style={{ cursor: 'pointer' }}
@ -100,7 +100,10 @@ export class UserStatus extends React.Component<
private onDidClickRefresh = () => {
this.setState({ refreshing: true });
this.props.model.updateRoot().then(() => {
Promise.all([
this.props.model.updateRoot(),
new Promise((resolve) => setTimeout(() => resolve(true), 1000)),
]).then(() => {
this.props.model.sketchbookTree().refresh();
this.setState({ refreshing: false });
});