summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/extensions/options_dialog.html
blob: 77f5d941e0f9a57cd78dc07aaab6ced7eb79ed02 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="item_behavior.html">
<link rel="import" href="navigation_helper.html">

<dom-module id="extensions-options-dialog">
  <template>
    <style>
      #icon {
        height: 32px;
        margin-inline-end: 10px;
        width: 32px;
      }

      #icon-and-name-wrapper {
        align-items: center;
        display: flex;
      }

      ExtensionOptions {
        display: block;
        height: 100%;
        overflow: hidden;
      }

      cr-dialog::part(dialog) {
        /* CSS variables are set by the JS. */
        height: var(--dialog-height);
        opacity: var(--dialog-opacity, 0);
        /* When loading, it's possible for an size update to follow after the
           initial size update. The debounce time on size updates is 50ms.
           A 100ms delay for the opacity transition will allow two updates to
           occur without showing the dialog resizing to the user. */
        transition: opacity 100ms ease 100ms;
        width: var(--dialog-width);
      }

      cr-dialog::part(wrapper) {
        height: 100%;
        max-height: initial;
        overflow: hidden;
      }

      cr-dialog #body {
        height: 100%;
        padding: 0;
      }

      cr-dialog {
        --cr-dialog-body-border-bottom: none;
        --cr-dialog-body-border-top: none;
        --scroll-border: none;
      }

      cr-dialog::part(body-container) {
        height: 100%;
        min-height: initial;
      }
    </style>

    <cr-dialog id="dialog" close-text="$i18n{close}"
        on-close="onClose_" show-close-button>
      <div slot="title">
        <div id="icon-and-name-wrapper">
          <img id="icon" src="[[data_.iconUrl]]"
              alt$="[[appOrExtension(
                  data.type,
                  '$i18nPolymer{appIcon}',
                  '$i18nPolymer{extensionIcon}')]]">
          <span>[[data_.name]]</span>
        </div>
      </div>
      <div slot="body" id="body">
      </div>
    </cr-dialog>
  </template>
  <script src="options_dialog.js"></script>
</dom-module>