Skip to content

Commit 0438625

Browse files
committed
feat: add more option button in tab bar
1 parent 5749246 commit 0438625

File tree

3 files changed

+78
-23
lines changed

3 files changed

+78
-23
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<div id="tab-bar-container" class="tab-bar-container">
22
<div id="phoenix-tab-bar" class="phoenix-tab-bar">
3-
3+
4+
</div>
5+
<div id="tab-bar-more-options" class="tab-bar-more-options">
6+
<i class="fa-solid fa-ellipsis-vertical"></i>
47
</div>
58
</div>
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<div id="tab-bar-container" class="tab-bar-container">
22
<div id="phoenix-tab-bar-2" class="phoenix-tab-bar">
3-
3+
4+
</div>
5+
<div id="tab-bar-more-options" class="tab-bar-more-options">
6+
<i class="fa-solid fa-ellipsis-vertical"></i>
47
</div>
58
</div>

src/styles/Extn-TabBar.less

Lines changed: 70 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,64 @@
11
.tab-bar-container {
2-
position: relative;
2+
display: flex;
3+
align-items: center;
34
background-color: #1E1E1E;
45
border-bottom: 1px solid #333;
6+
position: relative;
7+
overflow: hidden;
58
}
69

10+
711
.phoenix-tab-bar {
8-
height: 28px;
9-
background-color: #1E1E1E;
12+
flex: 1;
13+
height: 2rem;
1014
display: flex;
1115
overflow-x: auto;
1216
overflow-y: hidden;
1317
white-space: nowrap;
1418
transition: height 0.3s ease;
1519
scroll-behavior: smooth;
20+
background-color: #1E1E1E;
1621
}
1722

23+
1824
.phoenix-tab-bar::-webkit-scrollbar {
19-
height: 4px;
25+
height: 0.25rem;
26+
}
27+
28+
29+
.tab-bar-more-options {
30+
display: flex;
31+
align-items: center;
32+
height: 2rem;
33+
padding: 0 0.5rem;
34+
cursor: pointer;
35+
position: relative;
36+
z-index: 2;
37+
margin-left: auto;
2038
}
2139

22-
.phoenix-tab-bar .hover {
40+
41+
.tab-bar-more-options:hover {
2342
background-color: #333;
2443
}
2544

45+
46+
.tab-bar-more-options::before {
47+
content: "";
48+
position: absolute;
49+
top: 0;
50+
left: -1rem;
51+
width: 1rem;
52+
height: 100%;
53+
pointer-events: none;
54+
background: linear-gradient(to right, rgba(30, 30, 30, 0), #1E1E1E);
55+
}
56+
57+
2658
.tab {
2759
display: inline-flex;
2860
align-items: center;
29-
padding: 0 8px;
30-
padding-top: 1px;
61+
padding: 0 0.5rem;
3162
height: 100%;
3263
background-color: #2D2D2D;
3364
border-right: 1px solid #333;
@@ -39,89 +70,104 @@
3970
transition: transform 60ms ease, opacity 60ms ease;
4071
}
4172

42-
.tab, .tab-close, .tab-icon, .tab-name {
73+
74+
.tab,
75+
.tab-close,
76+
.tab-icon,
77+
.tab-name {
4378
transition: all 120ms ease-out;
4479
}
4580

81+
4682
.tab-icon {
4783
display: flex;
4884
align-items: center;
4985
margin-bottom: -2px;
5086
}
5187

88+
5289
.tab-name {
5390
display: inline-flex;
5491
align-items: center;
55-
font-size: 12px;
92+
font-size: 0.75rem;
5693
letter-spacing: 0.4px;
5794
word-spacing: 0.75px;
5895
}
5996

97+
6098
.tab .tab-dirname {
61-
font-size: 10px;
99+
font-size: 0.65rem;
62100
opacity: 0.7;
63101
font-weight: normal;
64102
}
65103

104+
66105
.tab.active {
67106
background-color: #3D3D3D;
68107
}
69108

109+
70110
.tab:hover {
71111
background-color: #4d4949;
72112
cursor: pointer;
73113
}
74114

115+
75116
.tab.active::after {
76117
content: "";
77118
position: absolute;
78119
bottom: 0;
79120
left: 0;
80121
right: 0;
81-
height: 2.2px;
122+
height: 0.15rem;
82123
background-color: #75BEFF;
83124
}
84125

126+
85127
.tab.dirty::before {
86128
content: "";
87129
color: #8D8D8E;
88-
font-size: 26px;
89-
margin-right: 4px;
130+
font-size: 1.6rem;
131+
margin-right: 0.25rem;
90132
position: absolute;
91-
left: 5px;
92-
top: 4px;
133+
left: 0.3rem;
134+
top: 0.25rem;
93135
}
94136

95137
.tab.dirty .tab-icon {
96-
margin-left: 10px;
138+
margin-left: 1rem;
97139
}
98140

141+
99142
.tab-close {
100-
font-size: 12px;
143+
font-size: 0.75rem;
101144
font-weight: 300;
102-
padding: 1px 4px 0.4px 4px;
103-
margin-left: 4px;
104-
margin-top: -1px;
145+
padding: 0.2rem 0.5rem;
146+
margin-left: 0.5rem;
147+
margin-top: -0.1rem;
105148
color: #CCC;
106149
transition: all 0.2s ease;
107-
border-radius: 3px;
150+
border-radius: 0.25rem;
108151
visibility: hidden;
109152
opacity: 0;
110153
pointer-events: none;
111154
}
112155

156+
113157
.tab:hover .tab-close,
114158
.tab.active .tab-close {
115159
visibility: visible;
116160
opacity: 1;
117161
pointer-events: auto;
118162
}
119163

164+
120165
.tab-close:hover {
121166
cursor: pointer;
122167
background-color: rgba(255, 255, 255, 0.1);
123168
}
124169

170+
125171
.tab.dragging {
126172
opacity: 0.7;
127173
transform: scale(0.95);
@@ -134,6 +180,7 @@
134180
background-color: #383838;
135181
}
136182

183+
137184
.tab-drag-indicator {
138185
position: fixed;
139186
width: 2px;
@@ -150,9 +197,11 @@
150197
0% {
151198
opacity: 0.7;
152199
}
200+
153201
50% {
154202
opacity: 1;
155203
}
204+
156205
100% {
157206
opacity: 0.7;
158207
}

0 commit comments

Comments
 (0)