diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 3108288..6e4fa17 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -710,6 +710,17 @@ export default class ClientConnection { ) ); } + public setMagicWallList(list:any) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity( + 0, + "magic_list", + typeof (list) == 'string' ? list : JSON.stringify(list) + ) + ) + ); + } public setConfigure(k: string, v: string) { this.ws?.send( diff --git a/src/components/ControlPanelDialog.vue b/src/components/ControlPanelDialog.vue index 6fecdb7..8af61d6 100644 --- a/src/components/ControlPanelDialog.vue +++ b/src/components/ControlPanelDialog.vue @@ -124,9 +124,22 @@ min="0" v-model="test_monitor_wall[current_index].angle" @keydown="testLog($event)" - oninput="if(value<0)value=0;if(value>360)value=360;" hint="" @update:model-value="changeAngle()" + :rules="[ + (val) => + (val != null && + val != undefined && + val.toString().length > 0) || + $t('Please type something'), + (val) => + parseInt(val) >= 0 || + $t('the number must be greater than 0'), + (val) => + parseInt(val) <= 360 || + $t('the number must be greater than 360'), + ]" + lazy-rules >