Skip to content

Commit cf01dd0

Browse files
devvaannshabose
authored andcommitted
refactor: made profile popup buttons consistent to the rest of the UI
1 parent 9abff67 commit cf01dd0

File tree

3 files changed

+49
-69
lines changed

3 files changed

+49
-69
lines changed

src/extensionsIntegrated/Phoenix/html/login-dialog.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<h1 class="popup-title">{{welcomeTitle}}</h1>
44
</div>
55
<div class="popup-body">
6-
<button id="phoenix-signin-btn" class="btn btn-primary">
6+
<button id="phoenix-signin-btn" class="btn dialog-button primary">
77
<i class="fa fa-sign-in-alt"></i>
88
{{signInBtnText}}
99
</button>
1010
<div class="support-link">
11-
<button id="phoenix-support-btn" class="btn btn-link">
11+
<button id="phoenix-support-btn" class="btn dialog-button">
1212
<i class="fa fa-question-circle"></i>
1313
{{supportBtnText}}
1414
</button>

src/extensionsIntegrated/Phoenix/html/profile-panel.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
</div>
2222
</div>
2323

24-
<button id="phoenix-account-btn" class="btn btn-default menu-button">
24+
<button id="phoenix-account-btn" class="btn dialog-button menu-button">
2525
<i class="fa fa-user"></i>
2626
{{accountBtnText}}
2727
</button>
2828

29-
<button id="phoenix-support-btn" class="btn btn-default menu-button">
29+
<button id="phoenix-support-btn" class="btn dialog-button menu-button">
3030
<i class="fa fa-question-circle"></i>
3131
{{supportBtnText}}
3232
</button>
3333

34-
<button id="phoenix-signout-btn" class="btn btn-default menu-button signout">
34+
<button id="phoenix-signout-btn" class="btn dialog-button menu-button signout">
3535
<i class="fa fa-sign-out-alt"></i>
3636
{{signOutBtnText}}
3737
</button>

src/styles/Extn-UserProfile.less

Lines changed: 44 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
width: 100%;
9797
text-align: left;
9898
padding: 8px 12px;
99+
margin: 3px 0;
99100

100101
i {
101102
margin-right: 8px;
@@ -108,11 +109,28 @@
108109
}
109110
}
110111

111-
.btn {
112-
margin: 5px 0;
112+
.btn.dialog-button {
113+
background-color: @bc-btn-bg;
114+
color: @bc-text;
115+
border: 1px solid @bc-btn-border;
116+
border-radius: @bc-border-radius;
117+
box-shadow: inset 0 1px @bc-highlight-hard;
118+
font-size: (@baseFontSize + 1);
119+
font-weight: @font-weight-semibold;
120+
margin: 3px 0;
113121
transition: background-color 0.2s ease;
114122

115-
&.btn-primary {
123+
&:not(:disabled):not(.disabled):hover {
124+
background-color: lighten(@bc-btn-bg, 5%);
125+
color: @bc-text;
126+
}
127+
128+
&:active:not([disabled]) {
129+
background-color: @bc-btn-bg-down;
130+
box-shadow: inset 0 1px 0 @bc-shadow-small;
131+
}
132+
133+
&.primary {
116134
background-color: @bc-primary-btn-bg;
117135
border: 1px solid @bc-primary-btn-border;
118136
box-shadow: inset 0 1px 0 @bc-highlight;
@@ -124,46 +142,16 @@
124142
margin-right: 5px;
125143
}
126144

127-
&:hover {
145+
&:not(:disabled):not(.disabled):hover {
128146
background-color: lighten(@bc-primary-btn-bg, 10%);
147+
color: @bc-text-alt;
129148
}
130149

131-
&:active {
150+
&:active:not([disabled]) {
132151
background-color: @bc-primary-btn-bg-down;
133152
box-shadow: inset 0 1px 0 @bc-shadow-small;
134153
}
135154
}
136-
137-
&.btn-default {
138-
background-color: @bc-btn-bg;
139-
border: 1px solid @bc-btn-border;
140-
box-shadow: inset 0 1px 0 @bc-highlight;
141-
142-
&:hover {
143-
background-color: lighten(@bc-btn-bg, 10%);
144-
}
145-
146-
&:active {
147-
background-color: @bc-btn-bg-down;
148-
box-shadow: inset 0 1px 0 @bc-shadow-small;
149-
}
150-
}
151-
152-
&.btn-link {
153-
background: none;
154-
border: none;
155-
box-shadow: none;
156-
color: @bc-text-thin-quiet;
157-
158-
i {
159-
margin-right: 5px;
160-
}
161-
162-
&:hover {
163-
color: @bc-text;
164-
text-decoration: none;
165-
}
166-
}
167155
}
168156
}
169157

@@ -197,46 +185,38 @@
197185
}
198186
}
199187

200-
.btn {
201-
&.btn-primary {
188+
.btn.dialog-button {
189+
background-color: @dark-bc-btn-bg;
190+
border: 1px solid @dark-bc-btn-border;
191+
box-shadow: inset 0 1px 0 @dark-bc-highlight;
192+
color: @dark-bc-text;
193+
194+
&:not(:disabled):not(.disabled):hover {
195+
background-color: lighten(@dark-bc-btn-bg, 10%);
196+
color: @dark-bc-text;
197+
}
198+
199+
&:active:not([disabled]) {
200+
background-color: @dark-bc-btn-bg-down;
201+
box-shadow: inset 0 1px 0 @dark-bc-shadow-small;
202+
}
203+
204+
&.primary {
202205
background-color: @dark-bc-primary-btn-bg;
203206
border: 1px solid @dark-bc-primary-btn-border;
204207
box-shadow: inset 0 1px 0 @dark-bc-highlight;
205208
color: @dark-bc-text-alt;
206209

207-
&:hover {
210+
&:not(:disabled):not(.disabled):hover {
208211
background-color: lighten(@dark-bc-primary-btn-bg, 10%);
212+
color: @dark-bc-text-alt;
209213
}
210214

211-
&:active {
215+
&:active:not([disabled]) {
212216
background-color: @dark-bc-primary-btn-bg-down;
213217
box-shadow: inset 0 1px 0 @dark-bc-shadow-small;
214218
}
215219
}
216-
217-
&.btn-default {
218-
background-color: @dark-bc-btn-bg;
219-
border: 1px solid @dark-bc-btn-border;
220-
box-shadow: inset 0 1px 0 @dark-bc-highlight;
221-
color: @dark-bc-text;
222-
223-
&:hover {
224-
background-color: lighten(@dark-bc-btn-bg, 10%);
225-
}
226-
227-
&:active {
228-
background-color: @dark-bc-btn-bg-down;
229-
box-shadow: inset 0 1px 0 @dark-bc-shadow-small;
230-
}
231-
}
232-
233-
&.btn-link {
234-
color: @dark-bc-text-thin-quiet;
235-
236-
&:hover {
237-
color: @dark-bc-text;
238-
}
239-
}
240220
}
241221
}
242222

0 commit comments

Comments
 (0)