summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/extensions/pack_dialog.html
blob: 6718e23fec07709bf3947a2c0a80f62defe26d00 (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
55
56
57
58
59
60
61
62
63
64
65
66
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/util.html">
<link rel="import" href="pack_dialog_alert.html">

<dom-module id="extensions-pack-dialog">
  <template>
    <style include="cr-shared-style">
      cr-input {
        margin-top: var(--cr-form-field-bottom-spacing);
        --cr-input-error-display: none;
      }

      cr-button[slot='suffix'] {
        margin-inline-start: 10px;
      }

      /* Prevent focus-outline from being chopped by bottom of dialog body. */
      cr-input {
        margin-bottom: 2px;
      }
    </style>
    <cr-dialog id="dialog" close-text="$i18n{close}">
      <div slot="title">$i18n{packDialogTitle}</div>
      <div slot="body">
        <div>$i18n{packDialogContent}</div>
        <cr-input id="root-dir" label="$i18n{packDialogExtensionRoot}"
            value="{{packDirectory_}}">
          <cr-button id="root-dir-browse" on-click="onRootBrowse_"
              slot="suffix">
            $i18n{packDialogBrowse}
          </cr-button>
        </cr-input>
        <cr-input id="key-file" label="$i18n{packDialogKeyFile}"
            value="{{keyFile_}}">
          <cr-button id="key-file-browse" on-click="onKeyBrowse_"
              slot="suffix">
            $i18n{packDialogBrowse}
          </cr-button>
        </cr-input>
      </div>
      <div slot="button-container">
        <cr-button class="cancel-button" on-click="onCancelTap_">
          $i18n{cancel}
        </cr-button>
        <cr-button class="action-button" on-click="onConfirmTap_"
            disabled="[[!packDirectory_]]">
          $i18n{packDialogConfirm}
        </cr-button>
      </div>
    </cr-dialog>
    <template is="dom-if" if="[[lastResponse_]]" restamp>
      <extensions-pack-dialog-alert model="[[lastResponse_]]"
          on-close="onAlertClose_">
      </extensions-pack-dialog-alert>
    </template>
  </template>
  <script src="pack_dialog.js"></script>
</dom-module>