File: bluetooth_settings.html

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (158 lines) | stat: -rw-r--r-- 6,479 bytes parent folder | download | duplicates (7)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
    <style include="device-emulator-shared-styles cr-shared-style iron-flex
        iron-flex-alignment iron-positioning">
    </style>
    <cr-dialog id="editDialog">
      <div slot="title">[[currentEditableObject.alias]]</div>
      <div slot="body">
        <form>
          <div class="form-field-section">
            <cr-input value="{{currentEditableObject.alias}}"
                label="Alias"></cr-input>
            <cr-input on-input="validatePath"
                id="devicePathInput"
                value="{{currentEditableObject.path}}"
                label="Path"></cr-input>
            <cr-input value="{{currentEditableObject.name}}"
                label="Name"></cr-input>
            <cr-input id="deviceAddressInput" on-input="handleAddressInput"
                value="{{currentEditableObject.address}}"
                label="Address (xx:xx:xx:xx:xx:xx)"
                maxlength="17"></cr-input>
          </div>
          <div class="form-field-section">
            <span class="toggle-button-label">Trusted</span>
            <cr-checkbox
                checked="{{currentEditableObject.isTrusted}}"></cr-checkbox>
          </div>
          <div class="form-field-section">
            <span class="toggle-button-label">Incoming Connnection</span>
            <cr-checkbox
                checked="{{currentEditableObject.incoming}}"></cr-checkbox>
          </div>
          <div class="form-field-section">
            <div class="form-label">Class</div>
            <cr-radio-group class="device-class-group"
                selected="{{currentEditableObject.class}}">
              <template is="dom-repeat"
                  items="[[deviceClassOptions]]" as="option">
                <cr-radio-button name="[[option.text]]"
                    >[[option.text]]</cr-radio-button>
              </template>
            </cr-radio-group>
          </div>
          <div class="form-field-section">
            <label>
              <span class="form-label">Pair Authentication</span>
              <cr-radio-group
                  selected="{{currentEditableObject.pairingMethod}}">
                <template is="dom-repeat"
                    items="[[deviceAuthenticationMethods]]" as="method">
                  <cr-radio-button name="[[method]]"
                      >[[method]]</cr-radio-button>
                </template>
              </cr-radio-group>
            </label>
          </div>
          <div>
              <div class="form-field-section"
                  hidden$=
                      "[[!showAuthToken(currentEditableObject.pairingMethod)]]"
                      >
                <cr-input value="{{currentEditableObject.pairingAuthToken}}"
                    label="Code"></cr-input>
              </div>
            <div class="form-field-section">
              <label>
                <span class="form-label">Pairing Action</span>
                <cr-radio-group
                    selected="{{currentEditableObject.pairingAction}}">
                  <template is="dom-repeat"
                      items="[[deviceAuthenticationActions]]">
                    <cr-radio-button name="[[item]]"
                        >[[item]]</cr-radio-button>
                  </template>
                </cr-radio-group>
              </label>
            </div>
          </div>
        </form>
      </div>
      <div slot="button-container">
        <cr-button class="action-button" on-click="onCloseClick_">
          Close
        </cr-button>
      </div>
    </cr-dialog>

    <div class="layout vertical">
      <div class="element-label">
        <cr-icon-button iron-icon="device-emulator:bluetooth"></cr-icon-button>
        Bluetooth
      </div>
      <table class="devices-table">
        <tbody>
          <tr class="table-section-header">
            <td colspan="2">Presets</td>
            <td class="centered-cell-label">Discoverable</td>
            <td class="centered-cell-label">Paired</td>
          </tr>
          <template is="dom-repeat" items="[[predefinedDevices]]">
            <tr>
              <td class="alias-cell">[[item.alias]]</td>
              <td class="icon-cell">
                <cr-icon-button iron-icon="device-emulator:content-copy"
                    on-click="copyDevice" data-predefined="true">
                </cr-icon-button>
                <cr-icon-button disabled iron-icon="device-emulator:settings">
                </cr-icon-button>
                <cr-icon-button disabled iron-icon="device-emulator:delete">
                </cr-icon-button>
              </td>
              <td class="control-cell">
                <cr-checkbox checked="{{item.discoverable}}"
                    data-predefined="true"
                    on-change="discoverDevice"></cr-checkbox>
              </td>
              <td class="control-cell">
                <cr-checkbox on-change="pairDevice" data-predefined="true"
                    checked="{{item.paired}}"></cr-checkbox>
              </td>
            </tr>
          </template>
        </tbody>
        <tbody>
          <tr class="table-section-header">
            <td colspan="4">Custom</td>
          </tr>
          <template is="dom-repeat" items="[[devices]]">
            <tr>
              <td class="alias-cell">[[item.alias]]</td>
              <td class="icon-cell">
                <cr-icon-button iron-icon="device-emulator:content-copy"
                    data-predefined="false" on-click="copyDevice">
                </cr-icon-button>
                <cr-icon-button iron-icon="device-emulator:settings"
                    on-click="showEditDialog"></cr-icon-button>
                <cr-icon-button iron-icon="device-emulator:delete"
                    on-click="deleteDevice"></cr-icon-button>
              </td>
              <td class="control-cell">
                <cr-checkbox checked="{{item.discoverable}}"
                    data-predefined="false"
                    on-change="discoverDevice"></cr-checkbox>
              </td>
              <td class="control-cell">
                <cr-checkbox checked="{{item.paired}}"
                    data-predefined="false"
                    on-change="pairDevice"></cr-checkbox>
              </td>
            </tr>
          </template>
        </tbody>
      </table>
      <div class="add-device-container">
        <cr-button on-click="appendNewDevice">
          Add Device
        </cr-button>
      </div>
    </div>