diff options
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/accounts/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/chat_names/_chat_name.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/chat_names/index.html.haml | 3 | ||||
-rw-r--r-- | app/views/profiles/emails/index.html.haml | 14 | ||||
-rw-r--r-- | app/views/profiles/gpg_keys/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/profiles/keys/index.html.haml | 7 | ||||
-rw-r--r-- | app/views/profiles/personal_access_tokens/index.html.haml | 61 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 13 | ||||
-rw-r--r-- | app/views/profiles/show.html.haml | 12 |
10 files changed, 29 insertions, 91 deletions
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 809dc3320ff..97056db6b74 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -55,7 +55,7 @@ %p = s_('Profiles|Changing your username can have unintended side effects.') = succeed '.' do - = link_to s_('Profiles|Learn more'), help_page_path('user/profile/index', anchor: 'change-your-username'), target: '_blank' + = link_to s_('Profiles|Learn more'), help_page_path('user/profile/index', anchor: 'change-your-username'), target: '_blank', rel: 'noopener noreferrer' .col-lg-8 - data = { initial_username: current_user.username, root_url: root_url, action_url: update_username_profile_path(format: :json) } #update-username{ data: data } diff --git a/app/views/profiles/chat_names/_chat_name.html.haml b/app/views/profiles/chat_names/_chat_name.html.haml index 24c25bc1ab2..3206fca6bcd 100644 --- a/app/views/profiles/chat_names/_chat_name.html.haml +++ b/app/views/profiles/chat_names/_chat_name.html.haml @@ -10,7 +10,7 @@ %td %strong - if can?(current_user, :admin_project, project) - = link_to integration.title, edit_project_service_path(project, integration) + = link_to integration.title, edit_project_integration_path(project, integration) - else = integration.title %td diff --git a/app/views/profiles/chat_names/index.html.haml b/app/views/profiles/chat_names/index.html.haml index 782850afcda..54c34228800 100644 --- a/app/views/profiles/chat_names/index.html.haml +++ b/app/views/profiles/chat_names/index.html.haml @@ -9,7 +9,8 @@ = _('You can see your chat accounts.') .col-lg-8 - %h5.gl-mt-0 Active chat names (#{@chat_names.size}) + %h5.gl-mt-0 + = sprintf(_('Active chat names (%{count})'), { count: @chat_names.size }) - if @chat_names.present? .table-responsive diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index 0cfe65994da..fef55f5d384 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -37,23 +37,23 @@ %li = render partial: 'shared/email_with_badge', locals: { email: @primary_email, verified: current_user.confirmed? } %span.float-right - %span.badge.badge-muted.badge-pill.gl-badge.badge-success= s_('Profiles|Primary email') + = gl_badge_tag s_('Profiles|Primary email'), variant: :success - if @primary_email === current_user.commit_email_or_default - %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Commit email') + = gl_badge_tag s_('Profiles|Commit email'), variant: :info - if @primary_email === current_user.public_email - %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email') + = gl_badge_tag s_('Profiles|Public email'), variant: :info - if @primary_email === current_user.notification_email_or_default - %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Default notification email') + = gl_badge_tag s_('Profiles|Default notification email'), variant: :info - @emails.reject(&:user_primary_email?).each do |email| %li{ data: { qa_selector: 'email_row_content' } } = render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? } %span.float-right - if email.email === current_user.commit_email_or_default - %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Commit email') + = gl_badge_tag s_('Profiles|Commit email'), variant: :info - if email.email === current_user.public_email - %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email') + = gl_badge_tag s_('Profiles|Public email'), variant: :info - if email.email === current_user.notification_email_or_default - %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Notification email') + = gl_badge_tag s_('Profiles|Notification email'), variant: :info - unless email.confirmed? - confirm_title = "#{email.confirmation_sent_at ? _('Resend confirmation email') : _('Send confirmation email')}" = link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'gl-button btn btn-sm btn-warning gl-ml-3' diff --git a/app/views/profiles/gpg_keys/index.html.haml b/app/views/profiles/gpg_keys/index.html.haml index bf9c77cb3ec..91af6953ee1 100644 --- a/app/views/profiles/gpg_keys/index.html.haml +++ b/app/views/profiles/gpg_keys/index.html.haml @@ -12,7 +12,7 @@ = _('Add a GPG key') %p.profile-settings-content - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/repository/gpg_signed_commits/index.md') } - = _('Before you can add a GPG key you need to %{help_link_start}Generate it.%{help_link_end}'.html_safe) % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe } + = _('Add a GPG key for secure access to GitLab. %{help_link_start}Learn more.%{help_link_end}').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe } = render 'form' %hr %h5 diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index 2b3109225a8..bebbe49a485 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -5,8 +5,8 @@ .form-group = f.label :key, s_('Profiles|Key'), class: 'label-bold' - %p= _("Paste your public SSH key, which is usually contained in the file '~/.ssh/id_ed25519.pub' or '~/.ssh/id_rsa.pub' and begins with 'ssh-ed25519' or 'ssh-rsa'. Do not paste your private SSH key, as that can compromise your identity.") - = f.text_area :key, class: "form-control gl-form-input js-add-ssh-key-validation-input qa-key-public-key-field", rows: 8, required: true, placeholder: s_('Profiles|Typically starts with "ssh-ed25519 …" or "ssh-rsa …"') + = f.text_area :key, class: "form-control gl-form-input js-add-ssh-key-validation-input qa-key-public-key-field", rows: 8, required: true, data: { supported_algorithms: Gitlab::SSHPublicKey.supported_algorithms } + %p.form-text.text-muted= s_('Profiles|Begins with %{ssh_key_algorithms}.') % { ssh_key_algorithms: ssh_key_allowed_algorithms } .form-row .col.form-group = f.label :title, _('Title'), class: 'label-bold' diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml index 584bd44e386..7d4c3b6115f 100644 --- a/app/views/profiles/keys/index.html.haml +++ b/app/views/profiles/keys/index.html.haml @@ -11,11 +11,8 @@ %h5.gl-mt-0 = _('Add an SSH key') %p.profile-settings-content - - generate_link_url = help_page_path("ssh/index", anchor: 'generate-an-ssh-key-pair') - - existing_link_url = help_page_path("ssh/index", anchor: 'see-if-you-have-an-existing-ssh-key-pair') - - generate_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: generate_link_url } - - existing_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: existing_link_url } - = _('To add an SSH key you need to %{generate_link_start}generate one%{link_end} or use an %{existing_link_start}existing key%{link_end}.').html_safe % { generate_link_start: generate_link_start, existing_link_start: existing_link_start, link_end: '</a>'.html_safe } + - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('ssh/index.md') } + = _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more.%{help_link_end}').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe } = render 'form' %hr %h5 diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml index a8275576327..887d07f7a20 100644 --- a/app/views/profiles/personal_access_tokens/index.html.haml +++ b/app/views/profiles/personal_access_tokens/index.html.haml @@ -32,64 +32,5 @@ type_plural: type_plural, active_tokens: @active_personal_access_tokens, revoke_route_helper: ->(token) { revoke_profile_personal_access_token_path(token) } -- if Feature.enabled?(:hide_access_tokens, default_enabled: :yaml) - #js-tokens-app{ data: { tokens_data: tokens_app_data } } -- else - - unless Gitlab::CurrentSettings.disable_feed_token - .col-lg-12 - %hr - .row.gl-mt-3.js-search-settings-section - .col-lg-4.profile-settings-sidebar - %h4.gl-mt-0 - = s_('AccessTokens|Feed token') - %p - = s_('AccessTokens|Your feed token authenticates you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar. It is visible in those feed URLs.') - %p - = s_('AccessTokens|It cannot be used to access any other data.') - .col-lg-8.feed-token-reset - = label_tag :feed_token, s_('AccessTokens|Feed token'), class: 'label-bold' - = text_field_tag :feed_token, current_user.feed_token, class: 'form-control gl-form-input js-select-on-focus', readonly: true - %p.form-text.text-muted - - reset_link = link_to s_('AccessTokens|reset this token'), [:reset, :feed_token, :profile], method: :put, data: { confirm: s_('AccessTokens|Are you sure? Any RSS or calendar URLs currently in use will stop working.'), testid: :reset_feed_token_link } - - reset_message = s_('AccessTokens|Keep this token secret. Anyone who has it can read activity and issue RSS feeds or your calendar feed as if they were you. If that happens, %{link_reset_it}.') % { link_reset_it: reset_link } - = reset_message.html_safe - - if incoming_email_token_enabled? - .col-lg-12 - %hr - .row.gl-mt-3.js-search-settings-section - .col-lg-4.profile-settings-sidebar - %h4.gl-mt-0 - = s_('AccessTokens|Incoming email token') - %p - = s_('AccessTokens|Your incoming email token authenticates you when you create a new issue by email, and is included in your personal project-specific email addresses.') - %p - = s_('AccessTokens|It cannot be used to access any other data.') - .col-lg-8.incoming-email-token-reset - = label_tag :incoming_email_token, s_('AccessTokens|Incoming email token'), class: 'label-bold' - = text_field_tag :incoming_email_token, current_user.incoming_email_token, class: 'form-control gl-form-input js-select-on-focus', readonly: true - %p.form-text.text-muted - - reset_link = link_to s_('AccessTokens|reset this token'), [:reset, :incoming_email_token, :profile], method: :put, data: { confirm: s_('AccessTokens|Are you sure? Any issue email addresses currently in use will stop working.'), testid: :reset_email_token_link } - - reset_message = s_('AccessTokens|Keep this token secret. Anyone who has it can create issues as if they were you. If that happens, %{link_reset_it}.') % { link_reset_it: reset_link } - = reset_message.html_safe - - - if static_objects_external_storage_enabled? - .col-lg-12 - %hr - .row.gl-mt-3.js-search-settings-section - .col-lg-4 - %h4.gl-mt-0 - = s_('AccessTokens|Static object token') - %p - = s_('AccessTokens|Your static object token authenticates you when repository static objects (such as archives or blobs) are served from an external storage.') - %p - = s_('AccessTokens|It cannot be used to access any other data.') - .col-lg-8 - = label_tag :static_object_token, s_('AccessTokens|Static object token'), class: "label-bold" - = text_field_tag :static_object_token, current_user.static_object_token, class: 'form-control gl-form-input', readonly: true, onclick: 'this.select()' - %p.form-text.text-muted - - reset_link = url_for [:reset, :static_object_token, :profile] - - reset_link_start = '<a data-confirm="%{confirm}" rel="nofollow" data-method="put" href="%{url}">'.html_safe % { confirm: s_('AccessTokens|Are you sure?'), url: reset_link } - - reset_link_end = '</a>'.html_safe - - reset_message = s_('AccessTokens|Keep this token secret. Anyone who has it can access repository static objects as if they were you. If that ever happens, %{reset_link_start}reset this token%{reset_link_end}.') % { reset_link_start: reset_link_start, reset_link_end: reset_link_end } - = reset_message.html_safe +#js-tokens-app{ data: { tokens_data: tokens_app_data } } diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index e52a345bd86..48be2001c9c 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -2,7 +2,7 @@ - @content_class = "limit-container-width" unless fluid_layout - user_theme_id = Gitlab::Themes.for_user(@user).id - user_fields = { theme: user_theme_id, gitpod_enabled: @user.gitpod_enabled, sourcegraph_enabled: @user.sourcegraph_enabled }.to_json -- @themes = Gitlab::Themes::THEMES.to_json +- @themes = Gitlab::Themes::available_themes.to_json - data_attributes = { themes: @themes, integration_views: integration_views.to_json, user_fields: user_fields, body_classes: Gitlab::Themes.body_classes, profile_preferences_path: profile_preferences_path } - Gitlab::Themes.each do |theme| @@ -33,7 +33,7 @@ %p = s_('Preferences|This setting allows you to customize the appearance of the syntax.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'syntax-highlighting-theme'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'syntax-highlighting-theme'), target: '_blank', rel: 'noopener noreferrer' .col-lg-8.syntax-theme - Gitlab::ColorSchemes.each do |scheme| = label_tag do @@ -51,7 +51,7 @@ %p = s_('Preferences|This setting allows you to customize the behavior of the system layout and default views.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'behavior'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'behavior'), target: '_blank', rel: 'noopener noreferrer' .col-lg-8 .form-group = f.label :layout, class: 'label-bold' do @@ -94,8 +94,7 @@ = s_('Preferences|Surround text selection when typing quotes or brackets') .form-text.text-muted - supported_characters = %w(" ' ` \( [ { < * _).map {|char| "<code>#{char}</code>" }.join(', ') - - msg = "Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: #{supported_characters}." - = s_(msg).html_safe + = sprintf(s_( "Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: %{supported_characters}."), { supported_characters: supported_characters }).html_safe .form-group = f.label :tab_width, s_('Preferences|Tab width'), class: 'label-bold' @@ -116,7 +115,7 @@ %p = _('Customize language and region related settings.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'localization'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'localization'), target: '_blank', rel: 'noopener noreferrer' .col-lg-8 .form-group = f.label :preferred_language, class: 'label-bold' do @@ -137,7 +136,7 @@ %p = s_('Preferences|Configure how dates and times display for you.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'time-preferences'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'time-preferences'), target: '_blank', rel: 'noopener noreferrer' .col-lg-8 .form-group.form-check = f.check_box :time_display_relative, class: 'form-check-input' diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index f3993ad8c33..531e72b7cc2 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -97,19 +97,19 @@ = render 'profiles/name', form: f, user: @user = f.text_field :id, class: 'gl-form-input', readonly: true, label: s_('Profiles|User ID'), wrapper: { class: 'col-md-3' } - = f.text_field :pronouns, class: 'input-md gl-form-input', help: s_("Profiles|Enter your pronouns to let people know how to refer to you") - = f.text_field :pronunciation, class: 'input-md gl-form-input', help: s_("Profiles|Enter how your name is pronounced to help people address you correctly") + = f.text_field :pronouns, label: s_('Profiles|Pronouns'), class: 'input-md gl-form-input', help: s_("Profiles|Enter your pronouns to let people know how to refer to you") + = f.text_field :pronunciation, label: s_('Profiles|Pronunciation'), class: 'input-md gl-form-input', help: s_("Profiles|Enter how your name is pronounced to help people address you correctly") = render_if_exists 'profiles/extra_settings', form: f = render_if_exists 'profiles/email_settings', form: f = f.text_field :skype, class: 'input-md gl-form-input', placeholder: s_("Profiles|username") = f.text_field :linkedin, class: 'input-md gl-form-input', help: s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename") = f.text_field :twitter, class: 'input-md gl-form-input', placeholder: s_("Profiles|@username") - = f.text_field :website_url, class: 'input-lg gl-form-input', placeholder: s_("Profiles|https://website.com") + = f.text_field :website_url, label: s_('Profiles|Website url'), class: 'input-lg gl-form-input', placeholder: s_("Profiles|https://website.com") - if @user.read_only_attribute?(:location) = f.text_field :location, class: 'gl-form-input', readonly: true, help: s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) } - else = f.text_field :location, label: s_('Profiles|Location'), class: 'input-lg gl-form-input', placeholder: s_("Profiles|City, country") - = f.text_field :job_title, class: 'input-md gl-form-input' + = f.text_field :job_title, label: s_('Profiles|Job title'), class: 'input-md gl-form-input' = f.text_field :organization, label: s_('Profiles|Organization'), class: 'input-md gl-form-input', help: s_("Profiles|Who you represent or work for") = f.text_area :bio, class: 'gl-form-input', label: s_('Profiles|Bio'), rows: 4, maxlength: 250, help: s_("Profiles|Tell us about yourself in fewer than 250 characters") %hr @@ -142,10 +142,10 @@ %img.modal-profile-crop-image{ alt: s_("Profiles|Avatar cropper") } .crop-controls .btn-group - %button.btn.gl-button.btn-confirm{ data: { method: 'zoom', option: '-0.1' } } + %button.btn.gl-button.btn-default{ data: { method: 'zoom', option: '-0.1' } } %span = sprite_icon('search-minus') - %button.btn.gl-button.btn-confirm{ data: { method: 'zoom', option: '0.1' } } + %button.btn.gl-button.btn-default{ data: { method: 'zoom', option: '0.1' } } %span = sprite_icon('search-plus') .modal-footer |