summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/about_page/channel_switcher_dialog.html
blob: a974334455cfa653619fd1bc9bda9e883773a789 (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
<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/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_radio_group/cr_radio_group.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-selector.html">
<link rel="import" href="about_page_browser_proxy.html">
<link rel="import" href="../settings_shared_css.html">

<dom-module id="settings-channel-switcher-dialog">
  <template>
    <style include="settings-shared">
      #warningSelector > :not(.iron-selected) {
        display: none;
      }
    </style>
    <cr-dialog id="dialog" close-text="$i18n{close}">
      <div slot="title">$i18n{aboutChangeChannel}</div>
      <div slot="body">
        <!-- TODO(dbeam): this can be policy-controlled. Show this in the UI.
             https://www.chromium.org/administrators/policy-list-3#ChromeOsReleaseChannel
        -->
        <cr-radio-group on-selected-changed="onChannelSelectionChanged_">
          <cr-radio-button name="[[browserChannelEnum_.STABLE]]">
            $i18n{aboutChannelDialogStable}
          </cr-radio-button>
          <cr-radio-button name="[[browserChannelEnum_.BETA]]">
            $i18n{aboutChannelDialogBeta}
          </cr-radio-button>
          <cr-radio-button name="[[browserChannelEnum_.DEV]]">
            $i18n{aboutChannelDialogDev}
          </cr-radio-button>
        </cr-radio-group>
        <iron-selector id="warningSelector">
          <div>
            <h2>$i18n{aboutDelayedWarningTitle}</h2>
            <div>[[substituteString_(
                '$i18nPolymer{aboutDelayedWarningMessage}',
                '$i18nPolymer{aboutOsProductTitle}')]]</div>
          </div>
          <div>
            <h2>$i18n{aboutPowerwashWarningTitle}</h2>
            <div>$i18n{aboutPowerwashWarningMessage}</div>
          </div>
          <div>
            <h2>$i18n{aboutUnstableWarningTitle}</h2>
            <div>[[substituteString_(
                '$i18nPolymer{aboutUnstableWarningMessage}',
                '$i18nPolymer{aboutOsProductTitle}')]]</div>
          </div>
        </iron-selector>
      </div>
      <div slot="button-container">
        <cr-button class="cancel-button" on-click="onCancelTap_"
            id="cancel">$i18n{cancel}</cr-button>
        <cr-button id="changeChannel" class="action-button"
            on-click="onChangeChannelTap_"
            hidden="[[!shouldShowButtons_.changeChannel]]">
          $i18n{aboutChangeChannel}
        </cr-button>
        <cr-button id="changeChannelAndPowerwash" class="action-button"
            on-click="onChangeChannelAndPowerwashTap_"
            hidden="[[!shouldShowButtons_.changeChannelAndPowerwash]]">
          $i18n{aboutChangeChannelAndPowerwash}
        </cr-button>
      </div>
    </cr-dialog>
  </template>
  <script src="channel_switcher_dialog.js"></script>
</dom-module>