Selaa lähdekoodia

Updated to future UI

Min 6 vuotta sitten
vanhempi
commit
b0706ca107
3 muutettua tiedostoa jossa 95 lisäystä ja 10 poistoa
  1. BIN
      server/server
  2. 93 10
      server/templates/boards.pug
  3. 2 0
      server/templates/head.pug

BIN
server/server


+ 93 - 10
server/templates/boards.pug

@@ -9,19 +9,102 @@ h1.title Boards
                     label.label ID
                     .control
                         input.input(type="number" v-model="board.new_id" min="0", max="65535", step="1")
+                .columns
+                    .column
+                        .field
+                            label.label Key (in base16)
+                            .control
+                                input.input(type="text" v-model="board.new_key")
+                            p.help Leave empty for random
+                    .column
+                        .field
+                            label.label Key size
+                            .control
+                                .select
+                                    select(v-model="board.new_keysize")
+                                        option(:value="128") 128 bit
+                                        option(:value="192") 192 bit
+                                        option(:value="256") 256 bit
+                hr
+                .columns
+                    .column
+                        .field
+                            label.label Update period (in minutes)
+                            .control
+                                input.input(type="number" min="0.1", max="36000", step="1")
+                    .column
+                        .field
+                            label.label Accelerometer threshold
+                            .control
+                                input.input(type="number" min="10", max="5000", step="10" placeholder="Threshold")
+                    .column
+                        .field
+                            label.label Accelerometer critical threshold
+                            .control
+                                input.input(type="number" min="10", max="10000", step="100" placeholder="Threshold")
+                .columns
+                    .column
+                        .field
+                            label.checkbox
+                                input(type="checkbox")
+                            | Disable light sensor
+
+                    .column
+                        .field
+                            label.checkbox
+                                input(type="checkbox")
+                            | Disable accelerometer critical threshold
+                hr
+                .columns
+                    .column
+                        .field
+                            label.label New WiFi network SSID
+                            .control
+                                input.input(type="text" placeholder="SSID")
+                    .column
+                        .field
+                            label.label New WiFi network Passphrase
+                            .control
+                                input.input(type="text" placeholder="Passphrase")
                 .field
-                    label.label Key size
                     .control
-                        .select
-                            select(v-model="board.new_keysize")
-                                option(:value="128") 128 bit
-                                option(:value="192") 192 bit
-                                option(:value="256") 256 bit
+                        table.table.is-hoverable.is-fullwidth
+                            thead
+                                tr
+                                    th SSID
+                                    th Action
+                            tbody
+                                tr
+                                    td Click here for viruses
+                                    td
+                                        a.button.is-small.is-danger.is-outlined Remove
+                                tr
+                                    td Some other access point
+                                    td
+                                        a.button.is-small.is-danger.is-outlined Remove
+                hr
+                .columns
+                    .column
+                        .field
+                            label.label GSM APN Domain
+                            .control
+                                input.input(type="text" placeholder="APN Domain")
+                    .column
+                        .field
+                            label.label GSM APN Username
+                            .control
+                                input.input(type="text" placeholder="APN Username")
+                    .column
+                        .field
+                            label.label GSM APN Password
+                            .control
+                                input.input(type="text" placeholder="APN Password")
                 .field
-                    label.label Key (in base16)
-                    .control
-                        input.input(type="text" v-model="board.new_key")
-                p.help Leave empty for random
+                    label.checkbox
+                        input(type="checkbox")
+                    | Do not check location via GSM when WiFi is available
+
+
                 .field
                     .control
                         button.button.is-primary(@click="board_create") Submit

+ 2 - 0
server/templates/head.pug

@@ -13,6 +13,8 @@ html(lang='en')
                 ul
                     li(v-for="menu in menus" :class="{'is-active': menu_selected === menu}")
                         a(@click="menu_selected = menu") {{ menu }}
+                    li
+                        a(href="/admin/logout") logout
 
             section.section
                 article.message.is-warning(v-show="error")