Skip to content

Commit ebe0863

Browse files
authored
Merge pull request #65 from intersystems/rotate-refresh-button
Rotate refresh button
2 parents 6cda874 + 56a6444 commit ebe0863

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

git-webui/release/share/git-webui/webui/css/git-webui.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@
1616
/*
1717
* Modifications Copyright (C) 2021 InterSystems Corporation
1818
*/
19+
@keyframes rotate {
20+
from {
21+
transform: rotate(0deg);
22+
}
23+
to {
24+
transform: rotate(360deg);
25+
}
26+
}
27+
.refresh-start {
28+
animation-name: rotate;
29+
animation-duration: 2s;
30+
animation-iteration-count: infinite;
31+
animation-timing-function: linear;
32+
animation-play-state: running;
33+
}
1934
html,
2035
body {
2136
height: 100%;
@@ -83,7 +98,7 @@ body {
8398
border-radius: 0.2rem;
8499
}
85100
.btn-sidebar-icon {
86-
padding: 0% 0% 2% 5%;
101+
padding: 2% 5%;
87102
}
88103
.btn-ok {
89104
float: right;

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ webui.SideBarView = function(mainView) {
370370
'</section>' +
371371
'<section id="sidebar-local-branches">' +
372372
'<h4 class="mt-3">Local Branches' +
373-
'<button type="button" class="btn btn-default btn-sidebar-icon btn-add" >' +
373+
'<button type="button" class="btn btn-default btn-sidebar-icon btn-add shadow-none" >' +
374374
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#eee" class="bi bi-plus-circle-fill" viewBox="0 0 16 16">'+
375375
'<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>'+
376376
'</svg>'+
377377
'</button>' + '</h4>' +
378378
'</section>' +
379379
'<section id="sidebar-remote-branches">' +
380380
'<h4 class="mt-3">Remote Branches' +
381-
'<button type="button" class="btn btn-default btn-sidebar-icon btn-prune-remote-branches" >'+
381+
'<button type="button" class="btn btn-default btn-sidebar-icon btn-prune-remote-branches shadow-none" >'+
382382
'<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="#eee" class="bi bi-arrow-repeat" viewBox="0 0 16 16">'+
383383
'<path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/>'+
384384
'<path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/>'+
@@ -1846,8 +1846,9 @@ $(function()
18461846
updateSideBar();
18471847
});
18481848

1849-
$(document).on('click', '.btn-sidebar-icon', function(e){
1849+
$(document).on('click', '.btn-prune-remote-branches', function(e){
18501850
e.preventDefault();
1851+
$(".btn-prune-remote-branches").addClass("refresh-start");
18511852
webui.git("fetch --prune", function() {
18521853
updateSideBar();
18531854
});

git-webui/src/share/git-webui/webui/css/git-webui.less

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,23 @@
5555
user-select: none;
5656
}
5757

58+
@keyframes rotate {
59+
60+
from {transform: rotate(0deg)}
61+
to {transform: rotate(360deg)}
62+
63+
}
64+
65+
.refresh-start {
66+
67+
animation-name: rotate;
68+
animation-duration: 2s;
69+
animation-iteration-count: infinite;
70+
animation-timing-function: linear;
71+
animation-play-state: running;
72+
73+
}
74+
5875
.display-flex() {
5976
display: flex;
6077
display: -webkit-flex;
@@ -148,7 +165,7 @@ body {
148165
}
149166

150167
.btn-sidebar-icon {
151-
padding: 0% 0% 2% 5%;
168+
padding: 2% 5%;
152169
}
153170

154171
.btn-ok {

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ webui.SideBarView = function(mainView) {
370370
'</section>' +
371371
'<section id="sidebar-local-branches">' +
372372
'<h4 class="mt-3">Local Branches' +
373-
'<button type="button" class="btn btn-default btn-sidebar-icon btn-add" >' +
373+
'<button type="button" class="btn btn-default btn-sidebar-icon btn-add shadow-none" >' +
374374
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#eee" class="bi bi-plus-circle-fill" viewBox="0 0 16 16">'+
375375
'<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>'+
376376
'</svg>'+
377377
'</button>' + '</h4>' +
378378
'</section>' +
379379
'<section id="sidebar-remote-branches">' +
380380
'<h4 class="mt-3">Remote Branches' +
381-
'<button type="button" class="btn btn-default btn-sidebar-icon btn-prune-remote-branches" >'+
381+
'<button type="button" class="btn btn-default btn-sidebar-icon btn-prune-remote-branches shadow-none" >'+
382382
'<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="#eee" class="bi bi-arrow-repeat" viewBox="0 0 16 16">'+
383383
'<path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/>'+
384384
'<path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/>'+
@@ -1846,8 +1846,10 @@ $(function()
18461846
updateSideBar();
18471847
});
18481848

1849-
$(document).on('click', '.btn-sidebar-icon', function(e){
1849+
$(document).on('click', '.btn-prune-remote-branches', function(e){
18501850
e.preventDefault();
1851+
$(".btn-prune-remote-branches").addClass("refresh-start");
1852+
18511853
webui.git("fetch --prune", function() {
18521854
updateSideBar();
18531855
});

0 commit comments

Comments
 (0)