Skip to content

Commit 2d8eeb3

Browse files
committed
feat: status bar icons initial scaffolding
1 parent cc09caf commit 2d8eeb3

File tree

6 files changed

+49
-1
lines changed

6 files changed

+49
-1
lines changed

src/editor/EditorStatusBar.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,5 +630,7 @@ define(function (require, exports, module) {
630630
LanguageManager.on("languageAdded languageModified", _populateLanguageDropdown);
631631
_onActiveEditorChange(null, EditorManager.getActiveEditor(), null);
632632
StatusBar.show();
633+
$("#status-menu").attr("title", Strings.STATUSBAR_SHOW_PANELS);
634+
$(".git-status-icon").attr("title", Strings.STATUSBAR_SHOW_GIT);
633635
});
634636
});

src/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@
698698
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer
699699
-->
700700
<!-- Import the phoenix browser virtual file system -->
701+
<script src="thirdparty/highlight.js/highlight.min.js"></script>
701702
<script src="phoenix/shell.js" type="module" defer></script>
702703
<script src="phoenix/virtual-server-loader.js" type="module" defer></script>
703704
<!-- node loader should come only after fs libs are loaded as we init fs libs with node fs urls-->
@@ -707,6 +708,7 @@
707708

708709
<!-- CSS/LESS -->
709710

711+
<link rel="stylesheet" type="text/css" href="thirdparty/highlight.js/styles/github.min.css">
710712
<link rel="stylesheet" type="text/css" href="thirdparty/fontawesome/css/all.min.css">
711713
<link rel="stylesheet" type="text/css" href="thirdparty/devicon/devicon.min.css">
712714
<link rel="stylesheet" type="text/css" href="thirdparty/file-icons/ffont.css">
@@ -854,6 +856,17 @@
854856
<!-- View Panes are programatically created here -->
855857
</div>
856858
<div id="status-bar" class="statusbar no-focus">
859+
<div id="status-phoenix">
860+
<div id="status-menu" class="forced-hidden">
861+
<i class="fa-solid fa-chevron-up"></i>
862+
</div>
863+
<div class="status-tab forced-hidden">
864+
<i class="fa-solid fa-terminal"></i>
865+
</div>
866+
<div class="status-tab forced-hidden git-status-icon">
867+
<i class="fa-solid fa-code-branch"></i>
868+
</div>
869+
</div>
857870
<div id="status-indicators" class="indicators">
858871
<div id="status-indent">
859872
<div id="indent-type"></div>

src/nls/root/strings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ define({
425425
"STATUSBAR_TASKS_PAUSE": "Pause",
426426
"STATUSBAR_TASKS_STOP": "Stop",
427427
"STATUSBAR_TASKS_RESTART": "Restart",
428+
"STATUSBAR_SHOW_PANELS": "Show Panels",
429+
"STATUSBAR_SHOW_GIT": "Git Panel",
428430

429431
// CodeInspection: errors/warnings
430432
"ERRORS_NO_FILE": "No File Open",

src/phoenix/shell.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ async function openURLInPhoenixWindow(url, {
9999

100100
Phoenix.libs = {
101101
LRUCache,
102+
hljs: window.hljs,
102103
iconv: fs.utils.iconv,
103104
picomatch: fs.utils.picomatch
104105
};

src/styles/brackets.less

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ a, img {
304304
#status-info {
305305
color: @bc-text;
306306
white-space: nowrap;
307+
cursor: pointer;
307308

308309
.dark & {
309310
color: @dark-bc-text;
@@ -326,7 +327,7 @@ a, img {
326327
display: none !important;
327328
}
328329

329-
#status-indicators{
330+
#status-indicators, #status-phoenix{
330331
background: @bc-bg-status-bar;
331332
color: @bc-text;
332333
position: absolute;
@@ -396,6 +397,33 @@ a, img {
396397

397398
}
398399

400+
#status-phoenix {
401+
right: unset;
402+
left: 0;
403+
> div {
404+
border-left: unset;
405+
border-right: 1px solid @bc-panel-border;
406+
407+
.dark & {
408+
border-left: unset;
409+
border-right: 1px solid @dark-bc-panel-separator;
410+
}
411+
float: left;
412+
padding: unset;
413+
width: 35px;
414+
text-align: center;
415+
}
416+
}
417+
418+
419+
#status-menu:hover, .status-tab:hover{
420+
background-color: @bc-status-btn-hover;
421+
.dark & {
422+
background-color: @dark-bc-status-btn-hover;
423+
}
424+
cursor: pointer;
425+
}
426+
399427
#status-indent > * {
400428
display: inline-block;
401429
}

src/styles/brackets_core_ui_variables.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
@bc-panel-bg-text-highlight: #fff;
106106
@bc-panel-border: rgba(0, 0, 0, 0.09);
107107
@bc-panel-separator: #c3c6c5;
108+
@bc-status-btn-hover: #f0f0f0;
108109

109110
// Default Button
110111
@bc-btn-bg: #e5e9e9;
@@ -214,6 +215,7 @@
214215
@dark-bc-panel-bg-text-highlight: #000;
215216
@dark-bc-panel-border: #000;
216217
@dark-bc-panel-separator: #343434;
218+
@dark-bc-status-btn-hover: rgba(255, 255, 255, 0.05);
217219

218220
// Default Button
219221
@dark-bc-btn-bg: #3f3f3f;

0 commit comments

Comments
 (0)