Skip to content

Commit

Permalink
Update NetworkingCard.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Aug 23, 2023
1 parent deb8f93 commit b6dea89
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions photon-client/src/components/settings/NetworkingCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,36 @@ const saveGeneralSettings = () => {
The NetworkTables Server Address is not set or is invalid. NetworkTables is unable to connect.
</v-banner>
<cv-radio
v-show="useSettingsStore().network.shouldManage"
v-model="useSettingsStore().network.connectionType"
label="IP Assignment Mode"
tooltip="DHCP will make the radio (router) automatically assign an IP address; this may result in an IP address that changes across reboots. Static IP assignment means that you pick the IP address and it won't change."
:disabled="!useSettingsStore().network.shouldManage"
:input-cols="12-3"
:list="['DHCP','Static']"
/>
<cv-input
v-if="useSettingsStore().network.connectionType === NetworkConnectionType.Static"
v-model="useSettingsStore().network.staticIp"
:input-cols="12-3"
:disabled="useSettingsStore().network.connectionType !== NetworkConnectionType.Static || !useSettingsStore().network.shouldManage"
label="Static IP"
:rules="[v => isValidIPv4(v) || 'Invalid IPv4 address']"
:input-cols="12-3"
:rules="[v => (isValidIPv4(v) || !useSettingsStore().network.shouldManage) || 'Invalid IPv4 address']"
/>
<cv-input
v-show="useSettingsStore().network.shouldManage"
v-model="useSettingsStore().network.hostname"
label="Hostname"
:disabled="!useSettingsStore().network.shouldManage"
:input-cols="12-3"
:rules="[v => isValidHostname(v) || 'Invalid hostname']"
/>
<v-divider/>
<span>Advanced Networking</span>
<cv-switch
v-model="useSettingsStore().network.shouldManage"
label="Manage Device Networking"
tooltip="If enabled, Photon will manage device hostname and network settings."
class="mt-3 mb-3"
:label-cols="3"
/>
<cv-switch
v-model="useSettingsStore().network.runNTServer"
label="Run NetworkTables Server (Debugging Only)"
Expand Down

0 comments on commit b6dea89

Please sign in to comment.