mirror of
https://github.com/RoganDawes/P4wnP1_aloa.git
synced 2025-03-17 13:21:50 +01:00
Fixed design of usb component
This commit is contained in:
parent
c9f3df4f0a
commit
2ec7b0d2e4
23
dist/www/index.html
vendored
23
dist/www/index.html
vendored
@ -5,7 +5,7 @@
|
||||
<script src="vue.js"></script>
|
||||
<script src="vuex.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
<script src="codemirror/lib/codemirror.js"></script>
|
||||
<link rel="stylesheet" href="codemirror/lib/codemirror.css">
|
||||
@ -22,6 +22,20 @@
|
||||
height: 60%;
|
||||
}
|
||||
|
||||
.toggle-collapse-closed::after {
|
||||
font-family: 'FontAwesome';
|
||||
content: "\f077";
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toggle-collapse-opened::after {
|
||||
font-family: 'FontAwesome';
|
||||
content: "\f078";
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal-mask {
|
||||
position: fixed;
|
||||
z-index: 9998;
|
||||
@ -96,23 +110,24 @@
|
||||
<div id="app">
|
||||
<h1>{{ state.title }}</h1>
|
||||
<p>{{ state.text }}</p>
|
||||
|
||||
<!--
|
||||
<table>
|
||||
<tr>
|
||||
<td><state></state></td>
|
||||
<td><state></state></td>
|
||||
</tr>
|
||||
</table>
|
||||
-->
|
||||
<modal v-if="$store.state.isModalEnabled" @close="$store.commit('setModalEnabled',false)">
|
||||
<h3 slot="header">My header</h3>
|
||||
<p slot="body">Some body text</p>
|
||||
</modal>
|
||||
|
||||
<tabs>
|
||||
<tab header="USB">
|
||||
<tab header="USB" :selected="true">
|
||||
<usb-settings></usb-settings>
|
||||
</tab>
|
||||
<tab header="HID Script" :selected="true">
|
||||
<tab header="HID Script">
|
||||
<hid-script v-model="testString"></hid-script>
|
||||
</tab>
|
||||
<tab header="Logger" >
|
||||
|
3
dist/www/p4wnp1.css
vendored
3
dist/www/p4wnp1.css
vendored
@ -82,7 +82,7 @@ button {
|
||||
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
display: block;
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
background-color: gray;
|
||||
@ -91,6 +91,7 @@ button {
|
||||
/* box-shadow: h-offset v-offset blur spread color inset initial inherit */
|
||||
box-shadow: 1px 1px 1px 0 #3f3f3f, -1px -1px 1px 0 #ffffff; /* 2px offset gray to top, white to bottom */
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@ func newCompUSBSettingsData(vm *hvue.VM) interface{} {
|
||||
const (
|
||||
compUSBSettingsTemplate = `
|
||||
<div>
|
||||
<table>
|
||||
<table cellspacing="1">
|
||||
<tr>
|
||||
<td>USB gadget settings</td>
|
||||
<td><button @click="ApplyGadgetSettings" :disabled="deployPending">Apply</button>
|
||||
@ -93,21 +93,26 @@ const (
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CDC ECM</td>
|
||||
<td><toggle-switch v-model="currentGadgetSettings.Use_CDC_ECM"></toggle-switch></td>
|
||||
<td>
|
||||
<toggle-switch v-model="currentGadgetSettings.Use_CDC_ECM"></toggle-switch>
|
||||
<a @click="cdcEcmDetails = !cdcEcmDetails" :class="{ 'toggle-collapse-closed': cdcEcmDetails, 'toggle-collapse-opened': !cdcEcmDetails } "></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="currentGadgetSettings.Use_CDC_ECM">
|
||||
<td></td>
|
||||
<td><ethernet-addresses v-bind:settings="currentGadgetSettings.CdcEcmSettings" @hostAddrChange="currentGadgetSettings.CdcEcmSettings.HostAddr=$event" @devAddrChange="currentGadgetSettings.CdcEcmSettings.DevAddr=$event"></ethernet-addresses></td>
|
||||
<tr v-if="cdcEcmDetails">
|
||||
<td colspan="2"><ethernet-addresses v-bind:settings="currentGadgetSettings.CdcEcmSettings" @hostAddrChange="currentGadgetSettings.CdcEcmSettings.HostAddr=$event" @devAddrChange="currentGadgetSettings.CdcEcmSettings.DevAddr=$event"></ethernet-addresses></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RNDIS</td>
|
||||
<td><toggle-switch v-model="currentGadgetSettings.Use_RNDIS"></toggle-switch></td>
|
||||
<td><input type="checkbox" v-if="currentGadgetSettings.Use_RNDIS" v-model="rndisDetails"></td>
|
||||
<td>
|
||||
<toggle-switch v-model="currentGadgetSettings.Use_RNDIS"></toggle-switch>
|
||||
<a @click="rndisDetails = !rndisDetails" :class="{ 'toggle-collapse-closed': rndisDetails, 'toggle-collapse-opened': !rndisDetails } "></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr v-if="rndisDetails">
|
||||
<td></td>
|
||||
<td><ethernet-addresses v-bind:settings="currentGadgetSettings.RndisSettings" @hostAddrChange="currentGadgetSettings.RndisSettings.HostAddr=$event" @devAddrChange="currentGadgetSettings.RndisSettings.DevAddr=$event"></ethernet-addresses></td>
|
||||
<td colspan="2"><ethernet-addresses v-bind:settings="currentGadgetSettings.RndisSettings" @hostAddrChange="currentGadgetSettings.RndisSettings.HostAddr=$event" @devAddrChange="currentGadgetSettings.RndisSettings.DevAddr=$event"></ethernet-addresses></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>HID Keyboard</td>
|
||||
<td><toggle-switch v-model="currentGadgetSettings.Use_HID_KEYBOARD"></toggle-switch></td>
|
||||
|
@ -62,7 +62,7 @@ func createGlobalStateStruct() GlobalState {
|
||||
state.CurrentGadgetSettings = NewUSBGadgetSettings()
|
||||
//UpdateGadgetSettingsFromDeployed(state.CurrentGadgetSettings)
|
||||
state.EventLog = NewLogger(maxLogEntries)
|
||||
state.IsModalEnabled = true
|
||||
state.IsModalEnabled = false
|
||||
|
||||
state.Counter = 1337
|
||||
state.Text = "Hi there says MaMe82"
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
# dependencies for the web app
|
||||
gopherjs build -o ../build/webapp.js #main.go
|
||||
scp ../build/webapp* pi@raspberrypi.local:~/P4wnP1_go/dist/www/
|
||||
scp ../dist/www/index.html pi@raspberrypi.local:~/P4wnP1_go/dist/www/
|
||||
scp ../dist/www/p4wnp1.css pi@raspberrypi.local:~/P4wnP1_go/dist/www/
|
||||
#scp ../build/webapp* pi@raspberrypi.local:/usr/local/P4wnP1/www/
|
||||
#scp ../dist/www/index.html pi@raspberrypi.local:/usr/local/P4wnP1/www/
|
||||
#scp ../dist/www/p4wnp1.css pi@raspberrypi.local:/usr/local/P4wnP1/www
|
||||
scp ../build/webapp* root@raspberrypi.local:/usr/local/P4wnP1/www/
|
||||
scp ../dist/www/index.html root@raspberrypi.local:/usr/local/P4wnP1/www/
|
||||
scp ../dist/www/p4wnp1.css root@raspberrypi.local:/usr/local/P4wnP1/www/
|
||||
|
Loading…
x
Reference in New Issue
Block a user