summaryrefslogtreecommitdiff
path: root/app/views/shared/doorkeeper/applications/_show.html.haml
blob: 562b1aee4ca9739041e20a1c04df6be02cc625c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
- show_trusted_row = local_assigns.fetch(:show_trusted_row, false)

.table-holder.oauth-application-show
  %table.table
    %tr
      %td
        = _('Application ID')
      %td
        .clipboard-group
          .input-group
            %input.label.label-monospace.monospace{ id: "application_id", type: "text", autocomplete: 'off', value: @application.uid, readonly: true }
            .input-group-append
              = clipboard_button(target: '#application_id', title: _("Copy ID"), class: "gl-button btn btn-default")
    %tr
      %td
        = _('Secret')
      %td
        - if Feature.enabled?('hash_oauth_secrets')
          - if @application.plaintext_secret
            = clipboard_button(clipboard_text: @application.plaintext_secret, button_text: _('Copy'), title: _("Copy secret"), class: "btn btn-default btn-md gl-button")
            %span= _('This is the only time the secret is accessible. Copy the secret and store it securely.')
          - else
            = _('The secret is only available when you first create the application.')
        - else
          = clipboard_button(clipboard_text: @application.secret, button_text: _('Copy'), title: _("Copy secret"), class: "btn btn-default btn-md gl-button")
    %tr
      %td
        = _('Callback URL')
      %td
        - @application.redirect_uri.split.each do |uri|
          %div
            %span.monospace= uri

    - if show_trusted_row
      %tr
        %td
          = _('Trusted')
        %td
          = @application.trusted? ? _('Yes') : _('No')

    %tr
      %td
        = _('Confidential')
      %td
        = @application.confidential? ? _('Yes') : _('No')

    = render "shared/tokens/scopes_list", token: @application

.form-actions.gl-display-flex.gl-justify-content-space-between
  %div
    - if @created
      = link_to _('Continue'), index_path, class: 'btn btn-confirm btn-md gl-button gl-mr-3'
    = link_to _('Edit'), edit_path, class: 'btn btn-default btn-md gl-button'
  = render 'shared/doorkeeper/applications/delete_form', path: delete_path, submit_btn_css: 'btn btn-danger btn-md gl-button btn-danger-secondary'