Skip to content

Commit

Permalink
Generalize the warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
aspecter committed Jun 2, 2023
1 parent dc17ef0 commit 83971b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ZclCreateModifyEndpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ limitations under the License.
<q-dialog v-model="showWarningDialog" persistent>
<zcl-warning-dialog
title="Do you want to proceed?"
message="ZCL device type is being modified which can cause all the configuration on the endpoint to be cleared and re-adjusted."
:message="warningMessage"
cancel-label="No"
ok-label="Yes"
@ok="
Expand Down Expand Up @@ -217,6 +217,7 @@ export default {
primaryDeviceTypeTmp: null, // Temp store for the selected primary device type
enableMultipleDevice: false,
enablePrimaryDevice: false,
warningMessage: '',
showWarningDialog: false,
warningDialogReturnValue: null,
deviceTypeMountSnapshot: null,
Expand Down Expand Up @@ -391,6 +392,8 @@ export default {
let deviceTypeChanged = true
// this.deviceTypeMountSnapshot
if (deviceTypeChanged) {
this.warningMessage =
'ZCL device type is being modified which can cause all the configuration on the endpoint to be cleared and re-adjusted.'
this.showWarningDialog = true
return
}
Expand Down

0 comments on commit 83971b5

Please sign in to comment.