Skip to content

Commit 6e8ac66

Browse files
committed
Refactoring after PR
1 parent eff4a45 commit 6e8ac66

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

htmlContent/git-panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
<div class="btn-group">
5252
<button title="{{TOOLTIP_OPEN_BASH}}" class="btn small git-bash"><i class="octicon octicon-terminal"></i></button>
5353
<button title="{{GIT_SETTINGS}}" class="btn small git-settings"><i class="octicon octicon-settings"></i></button>
54+
<button title="{{TOOLTIP_BUG}}" class="btn small git-bug"><i class="octicon octicon-bug"></i></button>
5455
</div>
55-
<button title="{{TOOLTIP_BUG}}" class="btn small git-bug"><i class="octicon octicon-bug"></i></button>
5656
</div>
5757
<a href="#" class="close">&times;</a>
5858

less/brackets-git.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
.octicon:not(:only-child) {
175175
margin-right: 5px;
176176
}
177-
.git-bash, .git-bug {
177+
.git-bash {
178178
margin-left: 15px;
179179
}
180180
.dropdown-toggle {

src/Panel.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,8 +1276,14 @@ define(function (require, exports) {
12761276
var panelHtml = Mustache.render(gitPanelTemplate, Strings);
12771277
var $panelHtml = $(panelHtml);
12781278
$panelHtml.find(".git-available").hide();
1279-
$panelHtml.find(".git-bash").toggle(Preferences.get("showBashButton"));
1280-
$panelHtml.find(".git-bug").toggle(Preferences.get("showReportBugButton"));
1279+
1280+
if (!Preferences.get("showBashButton")) {
1281+
$panelHtml.find(".git-bash").remove();
1282+
}
1283+
1284+
if (!Preferences.get("showReportBugButton")) {
1285+
$panelHtml.find(".git-bug").remove();
1286+
}
12811287

12821288
gitPanel = PanelManager.createBottomPanel("brackets-git.panel", $panelHtml, 100);
12831289

0 commit comments

Comments
 (0)