From 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Feb 2023 13:49:51 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-9-stable-ee --- app/views/profiles/keys/_key.html.haml | 19 ++++++++++++++----- app/views/profiles/saved_replies/index.html.haml | 10 ++++++++++ app/views/profiles/show.html.haml | 11 ++++++++++- app/views/profiles/two_factor_auths/show.html.haml | 7 ++++++- 4 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 app/views/profiles/saved_replies/index.html.haml (limited to 'app/views/profiles') diff --git a/app/views/profiles/keys/_key.html.haml b/app/views/profiles/keys/_key.html.haml index 219e7c4d2fe..825fb98782a 100644 --- a/app/views/profiles/keys/_key.html.haml +++ b/app/views/profiles/keys/_key.html.haml @@ -21,14 +21,23 @@ .key-list-item-dates %span.last-used-at.gl-mr-3 = s_('Profiles|Last used:') - = key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never') + -# TODO: Remove this conditional when https://gitlab.com/gitlab-org/gitlab/-/issues/324764 is resolved. + - if Feature.enabled?(:disable_ssh_key_used_tracking) + = _('Unavailable') + = link_to sprite_icon('question-o'), help_page_path('user/ssh.md', anchor: 'view-your-accounts-ssh-keys') + - else + = key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never') %span.expires.gl-mr-3 = key.expired? ? s_('Profiles|Expired:') : s_('Profiles|Expires:') = key.expires_at ? key.expires_at.to_date : _('Never') %span.last-used-at.gl-mr-3 = s_('Profiles|Usage type:') = ssh_key_usage_types.invert[key.usage_type] - %span.key-created-at.gl-display-flex.gl-align-items-center - - if key.can_delete? - .gl-ml-3 - = render 'shared/ssh_keys/key_delete', icon: true, button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) + .gl-display-flex.gl-float-right + - if key.can_delete? + - if key.signing? && !is_admin && Feature.enabled?(:revoke_ssh_signatures) + = render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-confirm-modal-button', data: ssh_key_revoke_modal_data(key, revoke_profile_key_path(key)) }) do + = _('Revoke') + .gl-pl-3 + = render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) }) do + = _('Remove') diff --git a/app/views/profiles/saved_replies/index.html.haml b/app/views/profiles/saved_replies/index.html.haml new file mode 100644 index 00000000000..2ae7a092249 --- /dev/null +++ b/app/views/profiles/saved_replies/index.html.haml @@ -0,0 +1,10 @@ +- page_title _('Saved Replies') + +#js-saved-replies-root.row.gl-mt-5{ data: { base_path: profile_saved_replies_path } } + .col-lg-4 + %h4.gl-mt-0 + = page_title + %p + = _('Saved replies can be used when creating comments inside issues, merge requests, and epics.') + .col-lg-8 + = gl_loading_icon(size: 'lg') diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index a140d780180..5ffffb80d97 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -53,7 +53,7 @@ = status_form.hidden_field :emoji, data: { js_name: 'emoji' } = status_form.hidden_field :message, data: { js_name: 'message' } = status_form.hidden_field :availability, data: { js_name: 'availability' } - = status_form.hidden_field :clear_status_after, data: { js_name: 'clearStatusAfter' } + = status_form.hidden_field :clear_status_after, value: @user.status&.clear_status_at&.to_s(:iso8601), data: { js_name: 'clearStatusAfter' } .col-lg-12 %hr .row.user-time-preferences.js-search-settings-section @@ -103,6 +103,15 @@ .form-group.gl-form-group = f.label :twitter = f.text_field :twitter, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|@username") + .form-group.gl-form-group + - external_accounts_help_url = help_page_path('user/profile/index', anchor: 'add-external-accounts-to-your-user-profile-page') + - external_accounts_link_start = ''.html_safe % { url: external_accounts_help_url } + - external_accounts_docs_link = s_('Profiles|Your Discord user ID. Should be between %{min} and %{max} digits long. %{external_accounts_link_start}Learn more.%{external_accounts_link_end}').html_safe % { min: '17', max: '20', external_accounts_link_start: external_accounts_link_start, external_accounts_link_end: ''.html_safe } + = f.label :discord + = f.text_field :discord, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|User ID") + %small.form-text.text-gl-muted + = external_accounts_docs_link + .form-group.gl-form-group = f.label :website_url, s_('Profiles|Website url') = f.text_field :website_url, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|https://website.com") diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 4c045574834..3add3af3c65 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -125,7 +125,12 @@ %span.gl-text-gray-500 = _("no name set") %td= registration[:created_at].to_date.to_s(:medium) - %td= link_to _('Delete'), registration[:delete_path], method: :delete, class: "gl-button btn btn-danger float-right", data: { confirm: _('Are you sure you want to delete this device? This action cannot be undone.'), confirm_btn_variant: "danger" }, aria: { label: _('Delete') } + %td + = render Pajamas::ButtonComponent.new(variant: :danger, + href: registration[:delete_path], + method: :delete, + button_options: { class: 'float-right', data: { confirm: _('Are you sure you want to delete this device? This action cannot be undone.'), confirm_btn_variant: "danger" }, aria: { label: _('Delete') }}) do + = _('Delete') - else .settings-message.text-center -- cgit v1.2.3