|
381 | 381 | </div>
|
382 | 382 | <div class="cardContent">
|
383 | 383 | <v-radio-group v-model="settings.wifiMode" column
|
384 |
| - @change="v$.settings.wifiMode.$touch" |
385 | 384 | >
|
386 |
| - <v-radio v-bind:label="$t('message.settings_network_mode_ap')" value="ap"></v-radio> |
387 |
| - <v-radio v-bind:label="$t('message.settings_network_mode_client')" value="client"></v-radio> |
| 385 | + <v-radio v-bind:label="$t('message.settings_network_mode_ap')" value="ap" @change="v$.settings.wifiMode.$touch"></v-radio> |
| 386 | + <v-radio v-bind:label="$t('message.settings_network_mode_client')" value="client" @change="v$.settings.wifiMode.$touch"></v-radio> |
388 | 387 | </v-radio-group>
|
389 | 388 | <div v-if="settings.wifiMode=='client'">
|
390 | 389 | <v-select
|
|
436 | 435 | </v-dialog>
|
437 | 436 | </v-card-actions-->
|
438 | 437 | </div>
|
439 |
| - <template> |
440 |
| - <div class="text-center"> |
441 |
| - <v-dialog |
442 |
| - v-model="wifi_overlay" |
443 |
| - persistent |
444 |
| - > |
445 |
| - <v-card> |
446 |
| - <v-card-text> |
447 |
| - <div class="text-center"> |
448 |
| - {{ $t('message.settings_network_wait') }} |
449 |
| - </div> |
450 |
| - </v-card-text> |
451 |
| - </v-card> |
452 |
| - </v-dialog> |
453 |
| - </div> |
454 |
| - </template> |
455 | 438 | </v-card>
|
456 | 439 | </v-col>
|
457 | 440 | </v-layout>
|
@@ -952,26 +935,26 @@ export default {
|
952 | 935 | this.v$.settings.$reset();
|
953 | 936 | console.log('set dirty false');
|
954 | 937 | });
|
| 938 | + console.log("wifi dirty state: ", this.v$.settings.wifiMode.$dirty || this.v$.settings.wifiSSID.$dirty || this.v$.settings.wifiPsw.$dirty); |
955 | 939 | if (this.v$.settings.wifiMode.$dirty || this.v$.settings.wifiSSID.$dirty || this.v$.settings.wifiPsw.$dirty) {
|
956 | 940 | if(this.settings.wifiMode=="client") {
|
957 | 941 | const network = this.networks.find(item => { return item.ssid==this.settings.wifiSSID });
|
958 | 942 | if(network != null) {
|
959 |
| - this.wifi_overlay = true; |
| 943 | + console.log("connecting"); |
960 | 944 | this.$wifi_connect.connect(network.ssid, network.conn_type, this.settings.wifiUser, this.settings.wifiPsw)
|
961 | 945 | .then((result) => {
|
| 946 | + console.log("connected: ", result.data); |
962 | 947 | this.snackText = this.$i18n.t('message.settings_network_updated');
|
963 | 948 | this.snackbar = true;
|
964 |
| - this.wifi_overlay = false; |
965 | 949 | })
|
966 | 950 | .catch((error) => {
|
967 | 951 | console.error(error);
|
968 |
| - this.wifi_overlay = false; |
969 | 952 | });
|
970 | 953 | }
|
971 | 954 | } else {
|
972 |
| - console.log("disconnecting") |
| 955 | + console.log("disconnecting"); |
973 | 956 | this.$wifi_connect.disconnect().then((result) => {
|
974 |
| - console.log(result); |
| 957 | + console.log("disconnected: ", result.data); |
975 | 958 | });
|
976 | 959 | }
|
977 | 960 | }
|
@@ -1106,7 +1089,6 @@ export default {
|
1106 | 1089 | networks: [],
|
1107 | 1090 | wifi_status: null,
|
1108 | 1091 | wifi_pwd_show: false,
|
1109 |
| - wifi_overlay: false, |
1110 | 1092 | programList: [],
|
1111 | 1093 | };
|
1112 | 1094 | },
|
|
0 commit comments