Skip to content

Commit 641b715

Browse files
UI fix post upgrade (#20)
* UI changes to fix either broken things or make it look more it war before * Update git-webui.js Co-authored-by: Sarmishta Velury <[email protected]> Co-authored-by: isc-tleavitt <[email protected]> Co-authored-by: isc-tleavitt <[email protected]>
1 parent abd7122 commit 641b715

File tree

4 files changed

+48
-22
lines changed

4 files changed

+48
-22
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ body {
277277
display: table;
278278
margin: 0;
279279
width: 100%;
280+
border-radius: 0px;
280281
}
281282
.file-list-view .file-list-container .list-group .list-group-item:first-child {
282283
border-top: 0;
@@ -299,6 +300,9 @@ body {
299300
border: 0;
300301
margin: 0;
301302
}
303+
.panel-heading {
304+
border-bottom: 1px solid #dddddd;
305+
}
302306
.diff-view-container .panel-heading {
303307
margin: 0;
304308
padding: 5px 16px;

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

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ webui.showWarning = function(message) {
4343
var messageBox = $("#message-box");
4444
messageBox.empty();
4545
$( '<div class="alert alert-warning alert-dismissible" role="alert">' +
46-
'<button type="button" class="close" data-dismiss="alert">' +
47-
'<span aria-hidden="true">&times;</span>' +
48-
'<span class="sr-only">Close</span>' +
46+
'<button type="button" class="btn btn-default close" data-bs-dismiss="alert">' +
47+
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">'+
48+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z" fill="#000"/>'+
49+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z" fill="#000"/>'+
50+
'</svg>'+
4951
'</button>' +
5052
message +
5153
'</div>').appendTo(messageBox);
@@ -146,15 +148,17 @@ webui.TabBox = function(buttons) {
146148
elt.callback();
147149
}
148150

149-
self.element = $('<ul class="nav nav-pills nav-justified" role="tablist">')[0];
151+
self.element = $('<ul class="nav nav-pills navbar bg-light" role="tablist">')[0];
150152

151153
for (var i = 0; i < buttons.length; ++i) {
152154
var item = buttons[i];
153-
var li = $('<li><a href="#" onclick="return false;">' + item[0] + '</a></li>');
155+
var li = $('<li class="col-sm-1"><a href="#" onclick="return false;">' + item[0] + '</a></li>');
154156
li.appendTo(self.element);
155157
li.click(self.itemClicked);
156158
li[0].callback = item[1];
157159
}
160+
var li = $('<li class="col-sm-'+(12-buttons.length)+'">&nbsp</li>');
161+
li.appendTo(self.element);
158162
};
159163

160164
/*
@@ -195,8 +199,13 @@ webui.SideBarView = function(mainView) {
195199
'<div class="modal-dialog modal-sm">' +
196200
'<div class="modal-content">' +
197201
'<div class="modal-header">' +
198-
'<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>' +
199202
'<h4 class="modal-title">' + title + '</h4>' +
203+
'<button type="button" class="btn -btn-default close" data-bs-dismiss="modal">'+
204+
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">'+
205+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z" fill="#000"/>'+
206+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z" fill="#000"/>'+
207+
'</svg>'+
208+
'</button>' +
200209
'</div>' +
201210
'<div class="modal-body"><div class="list-group"></div></div>' +
202211
'</div>' +
@@ -290,7 +299,7 @@ webui.SideBarView = function(mainView) {
290299
var li = $('<li class="sidebar-more">More ...</li>').appendTo(ul);
291300
var popup = self.addPopup(section, title, id + "-popup", refs);
292301
li.click(function() {
293-
$(popup).modal();
302+
$(popup).modal('show');
294303
});
295304
}
296305
} else {
@@ -301,7 +310,7 @@ webui.SideBarView = function(mainView) {
301310

302311
self.mainView = mainView;
303312
self.element = $( '<div id="sidebar">' +
304-
'<a href="#" data-toggle="modal" data-target="#help-modal"><img id="sidebar-logo" src="img/git-logo.png"></a>' +
313+
'<a href="#" data-bs-toggle="modal" data-bs-target="#help-modal"><img id="sidebar-logo" src="img/git-logo.png"></a>' +
305314
'<div id="sidebar-content">' +
306315
'<section id="sidebar-workspace">' +
307316
'<h4>Workspace</h4>' +
@@ -981,8 +990,8 @@ webui.DiffView = function(sideBySide, hunkSelectionAllowed, parent) {
981990
if (! (parent instanceof webui.CommitExplorerView)) {
982991
html +=
983992
'<div class="panel-heading btn-toolbar" role="toolbar">' +
984-
'<button type="button" class="btn btn-sm btn-default diff-ignore-whitespace" data-toggle="button">Ignore Whitespace</button>' +
985-
'<button type="button" class="btn btn-sm btn-default diff-context-all" data-toggle="button">Complete file</button>' +
993+
'<button type="button" class="btn btn-sm btn-default diff-ignore-whitespace" data-bs-toggle="button">Ignore Whitespace</button>' +
994+
'<button type="button" class="btn btn-sm btn-default diff-context-all" data-bs-toggle="button">Complete file</button>' +
986995
'<div class="btn-group btn-group-sm">' +
987996
'<span></span>&nbsp;' +
988997
'<button type="button" class="btn btn-default diff-context-remove">-</button>' +
@@ -1672,7 +1681,7 @@ webui.CommitMessageView = function(workspaceView) {
16721681
'<div class="panel-heading">' +
16731682
'<h5>Message</h5>' +
16741683
'<div class="btn-group btn-group-sm">' +
1675-
'<button type="button" class="btn btn-default commit-message-amend" data-toggle="button">Amend</button>' +
1684+
'<button type="button" class="btn btn-default commit-message-amend" data-bs-toggle="button">Amend</button>' +
16761685
'<button type="button" class="btn btn-default commit-message-commit">Commit</button>' +
16771686
'</div>' +
16781687
'</div>' +

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,12 @@ body {
338338
}
339339

340340
.file-list-view {
341+
border-radius: 0px;
341342
.no-select();
342343
.flex(1);
343344

344345
.file-list-container {
346+
border-radius: 0px;
345347
.display-flex();
346348
.flex(1);
347349
overflow: auto;
@@ -359,6 +361,7 @@ body {
359361
display: table;
360362
margin: 0;
361363
width: 100%;
364+
border-radius: 0px;
362365

363366
.list-group-item:first-child {
364367
border-top: 0;
@@ -384,6 +387,7 @@ body {
384387
.panel-heading {
385388
margin: 0;
386389
padding: @padding-small-vertical @padding-large-horizontal;
390+
border-bottom: 1px solid #dddddd;
387391
.display-flex();
388392

389393
.btn-group {

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

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ webui.showWarning = function(message) {
4747
var messageBox = $("#message-box");
4848
messageBox.empty();
4949
$( '<div class="alert alert-warning alert-dismissible" role="alert">' +
50-
'<button type="button" class="close" data-dismiss="alert">' +
51-
'<span aria-hidden="true">&times;</span>' +
52-
'<span class="sr-only">Close</span>' +
50+
'<button type="button" class="btn btn-default close" data-bs-dismiss="alert">' +
51+
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">'+
52+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z" fill="#000"/>'+
53+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z" fill="#000"/>'+
54+
'</svg>'+
5355
'</button>' +
5456
message +
5557
'</div>').appendTo(messageBox);
@@ -150,15 +152,17 @@ webui.TabBox = function(buttons) {
150152
elt.callback();
151153
}
152154

153-
self.element = $('<ul class="nav nav-pills nav-justified" role="tablist">')[0];
155+
self.element = $('<ul class="nav nav-pills navbar bg-light" role="tablist">')[0];
154156

155157
for (var i = 0; i < buttons.length; ++i) {
156158
var item = buttons[i];
157-
var li = $('<li><a href="#" onclick="return false;">' + item[0] + '</a></li>');
159+
var li = $('<li class="col-sm-1"><a href="#" onclick="return false;">' + item[0] + '</a></li>');
158160
li.appendTo(self.element);
159161
li.click(self.itemClicked);
160162
li[0].callback = item[1];
161163
}
164+
var li = $('<li class="col-sm-'+(12-buttons.length)+'">&nbsp</li>');
165+
li.appendTo(self.element);
162166
};
163167

164168
/*
@@ -199,8 +203,13 @@ webui.SideBarView = function(mainView) {
199203
'<div class="modal-dialog modal-sm">' +
200204
'<div class="modal-content">' +
201205
'<div class="modal-header">' +
202-
'<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>' +
203206
'<h4 class="modal-title">' + title + '</h4>' +
207+
'<button type="button" class="btn -btn-default close" data-bs-dismiss="modal">'+
208+
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">'+
209+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.854 2.146a.5.5 0 0 1 0 .708l-11 11a.5.5 0 0 1-.708-.708l11-11a.5.5 0 0 1 .708 0Z" fill="#000"/>'+
210+
'<path fill-rule="evenodd" clip-rule="evenodd" d="M2.146 2.146a.5.5 0 0 0 0 .708l11 11a.5.5 0 0 0 .708-.708l-11-11a.5.5 0 0 0-.708 0Z" fill="#000"/>'+
211+
'</svg>'+
212+
'</button>' +
204213
'</div>' +
205214
'<div class="modal-body"><div class="list-group"></div></div>' +
206215
'</div>' +
@@ -294,7 +303,7 @@ webui.SideBarView = function(mainView) {
294303
var li = $('<li class="sidebar-more">More ...</li>').appendTo(ul);
295304
var popup = self.addPopup(section, title, id + "-popup", refs);
296305
li.click(function() {
297-
$(popup).modal();
306+
$(popup).modal('show');
298307
});
299308
}
300309
} else {
@@ -305,7 +314,7 @@ webui.SideBarView = function(mainView) {
305314

306315
self.mainView = mainView;
307316
self.element = $( '<div id="sidebar">' +
308-
'<a href="#" data-toggle="modal" data-target="#help-modal"><img id="sidebar-logo" src="img/git-logo.png"></a>' +
317+
'<a href="#" data-bs-toggle="modal" data-bs-target="#help-modal"><img id="sidebar-logo" src="img/git-logo.png"></a>' +
309318
'<div id="sidebar-content">' +
310319
'<section id="sidebar-workspace">' +
311320
'<h4>Workspace</h4>' +
@@ -985,8 +994,8 @@ webui.DiffView = function(sideBySide, hunkSelectionAllowed, parent) {
985994
if (! (parent instanceof webui.CommitExplorerView)) {
986995
html +=
987996
'<div class="panel-heading btn-toolbar" role="toolbar">' +
988-
'<button type="button" class="btn btn-sm btn-default diff-ignore-whitespace" data-toggle="button">Ignore Whitespace</button>' +
989-
'<button type="button" class="btn btn-sm btn-default diff-context-all" data-toggle="button">Complete file</button>' +
997+
'<button type="button" class="btn btn-sm btn-default diff-ignore-whitespace" data-bs-toggle="button">Ignore Whitespace</button>' +
998+
'<button type="button" class="btn btn-sm btn-default diff-context-all" data-bs-toggle="button">Complete file</button>' +
990999
'<div class="btn-group btn-group-sm">' +
9911000
'<span></span>&nbsp;' +
9921001
'<button type="button" class="btn btn-default diff-context-remove">-</button>' +
@@ -1676,7 +1685,7 @@ webui.CommitMessageView = function(workspaceView) {
16761685
'<div class="panel-heading">' +
16771686
'<h5>Message</h5>' +
16781687
'<div class="btn-group btn-group-sm">' +
1679-
'<button type="button" class="btn btn-default commit-message-amend" data-toggle="button">Amend</button>' +
1688+
'<button type="button" class="btn btn-default commit-message-amend" data-bs-toggle="button">Amend</button>' +
16801689
'<button type="button" class="btn btn-default commit-message-commit">Commit</button>' +
16811690
'</div>' +
16821691
'</div>' +

0 commit comments

Comments
 (0)