Commit 3a5446b4 authored by Jiaan Louw's avatar Jiaan Louw Committed by Kushal Pandya

Refactor profile.scss to use utility class

Resolve the stylelint-gitlab/utility-classes error by
removing the .description class in profile.scss and
replacing its usage in gpg_keys and keys views with
the .text-truncate utility class.
parent d76d3f71
...@@ -17,12 +17,6 @@ ...@@ -17,12 +17,6 @@
display: inline-block; display: inline-block;
} }
.account-btn-link,
.profile-settings-sidebar a,
.settings-sidebar a {
color: $blue-600;
}
.private-tokens-reset div.reset-action:not(:first-child) { .private-tokens-reset div.reset-action:not(:first-child) {
padding-top: 15px; padding-top: 15px;
} }
...@@ -122,24 +116,12 @@ ...@@ -122,24 +116,12 @@
float: left; float: left;
} }
} }
.description {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
} }
.key-created-at { .key-created-at {
line-height: 42px; line-height: 42px;
} }
.profile-settings-content {
a {
color: $blue-600;
}
}
.provider-btn-group { .provider-btn-group {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
...@@ -169,10 +151,6 @@ ...@@ -169,10 +151,6 @@
margin-left: -3px; margin-left: -3px;
line-height: 22px; line-height: 22px;
background-color: $gray-light; background-color: $gray-light;
&.not-active {
color: $blue-500;
}
} }
.oauth-applications { .oauth-applications {
...@@ -292,10 +270,6 @@ table.u2f-registrations { ...@@ -292,10 +270,6 @@ table.u2f-registrations {
} }
.oauth-application-show { .oauth-application-show {
.scope-name {
font-weight: $gl-font-weight-bold;
}
.scopes-list { .scopes-list {
padding-left: 18px; padding-left: 18px;
} }
...@@ -317,52 +291,52 @@ table.u2f-registrations { ...@@ -317,52 +291,52 @@ table.u2f-registrations {
.landing { .landing {
padding: 32px; padding: 32px;
}
.close { .close {
position: absolute; position: absolute;
top: 20px; top: 20px;
right: 20px; right: 20px;
opacity: 1; opacity: 1;
.dismiss-icon { .dismiss-icon {
float: right; float: right;
cursor: pointer; cursor: pointer;
color: $blue-300; color: $blue-300;
} }
&:hover { &:hover {
background-color: transparent; background-color: transparent;
border: 0; border: 0;
.dismiss-icon { .dismiss-icon {
color: $blue-400; color: $blue-400;
}
} }
} }
}
.svg-container { .svg-container {
margin-right: 30px; margin-right: 30px;
display: inline-block; display: inline-block;
svg { svg {
height: 110px; height: 110px;
vertical-align: top; vertical-align: top;
} }
&.devops { &.convdev {
margin: 0 0 0 30px; margin: 0 0 0 30px;
svg { svg {
height: 127px; height: 127px;
}
} }
} }
}
.user-callout-copy { .user-callout-copy {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
max-width: 570px; max-width: 570px;
}
} }
@include media-breakpoint-down(xs) { @include media-breakpoint-down(xs) {
...@@ -372,43 +346,26 @@ table.u2f-registrations { ...@@ -372,43 +346,26 @@ table.u2f-registrations {
display: block; display: block;
} }
.landing { .svg-container,
.svg-container, .user-callout-copy {
.user-callout-copy { margin: 0 auto;
margin: 0 auto; display: block;
display: block;
svg { svg {
height: 75px; height: 75px;
} }
&.devops { &.convdev {
margin: $gl-padding auto 0; margin: $gl-padding auto 0;
svg { svg {
height: 120px; height: 120px;
}
} }
} }
} }
} }
} }
.nav-wip {
border: 1px solid $blue-500;
background: $blue-50;
padding: $gl-padding;
margin-bottom: $gl-padding;
a {
color: $blue-500;
}
p:last-child {
margin-bottom: 0;
}
}
.email-badge { .email-badge {
display: inline; display: inline;
margin-right: $gl-padding / 2; margin-right: $gl-padding / 2;
...@@ -433,10 +390,8 @@ table.u2f-registrations { ...@@ -433,10 +390,8 @@ table.u2f-registrations {
} }
.edit-user { .edit-user {
.clear-user-status { svg {
svg { fill: $gl-text-color-secondary;
fill: $gl-text-color-secondary;
}
} }
.form-group > label { .form-group > label {
...@@ -453,10 +408,6 @@ table.u2f-registrations { ...@@ -453,10 +408,6 @@ table.u2f-registrations {
.no-emoji-placeholder { .no-emoji-placeholder {
position: relative; position: relative;
svg {
fill: $gl-text-color-secondary;
}
} }
} }
......
...@@ -31,3 +31,4 @@ ...@@ -31,3 +31,4 @@
.gl-w-64 { width: px-to-rem($grid-size * 8); } .gl-w-64 { width: px-to-rem($grid-size * 8); }
.gl-h-64 { height: px-to-rem($grid-size * 8); } .gl-h-64 { height: px-to-rem($grid-size * 8); }
.gl-bg-blue-500 { @include gl-bg-blue-500; }
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
%a.provider-btn %a.provider-btn
= s_('Profiles|Active') = s_('Profiles|Active')
- elsif link_allowed - elsif link_allowed
= link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn not-active' do = link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn gl-bg-blue-500' do
= s_('Profiles|Connect') = s_('Profiles|Connect')
= render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities = render_if_exists 'profiles/accounts/group_saml_unlink_buttons', group_saml_identities: group_saml_identities
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- key.emails_with_verified_status.map do |email, verified| - key.emails_with_verified_status.map do |email, verified|
= render partial: 'shared/email_with_badge', locals: { email: email, verified: verified } = render partial: 'shared/email_with_badge', locals: { email: email, verified: verified }
.description %span.text-truncate
%code= key.fingerprint %code= key.fingerprint
- if key.subkeys.present? - if key.subkeys.present?
.subkeys .subkeys
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
.key-list-item-info .key-list-item-info
= link_to path_to_key(key, is_admin), class: "title" do = link_to path_to_key(key, is_admin), class: "title" do
= key.title = key.title
.description %span.text-truncate
= key.fingerprint = key.fingerprint
.last-used-at .last-used-at
last used: last used:
......
...@@ -32,4 +32,4 @@ ...@@ -32,4 +32,4 @@
.prepend-top-default.append-bottom-default .prepend-top-default.append-bottom-default
= f.submit _('Save password'), class: "btn btn-success append-right-10", data: { qa_selector: 'save_password_button' } = f.submit _('Save password'), class: "btn btn-success append-right-10", data: { qa_selector: 'save_password_button' }
- unless @user.password_automatically_set? - unless @user.password_automatically_set?
= link_to _('I forgot my password'), reset_profile_password_path, method: :put, class: "account-btn-link" = link_to _('I forgot my password'), reset_profile_password_path, method: :put
...@@ -9,5 +9,5 @@ ...@@ -9,5 +9,5 @@
%ul.scopes-list.append-bottom-0 %ul.scopes-list.append-bottom-0
- token.scopes.each do |scope| - token.scopes.each do |scope|
%li %li
%span.scope-name= scope %span.bold= scope
= "(#{t(scope, scope: [:doorkeeper, :scopes])})" = "(#{t(scope, scope: [:doorkeeper, :scopes])})"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment