diff --git a/popup/src/components/mocks-tab/template.html b/popup/src/components/mocks-tab/template.html
index 4e146f8..6bf7063 100644
--- a/popup/src/components/mocks-tab/template.html
+++ b/popup/src/components/mocks-tab/template.html
@@ -5,6 +5,6 @@
-
+
diff --git a/popup/src/components/mocks/script.ts b/popup/src/components/mocks/script.ts
index 4cfbe41..d09fe2d 100644
--- a/popup/src/components/mocks/script.ts
+++ b/popup/src/components/mocks/script.ts
@@ -16,7 +16,9 @@ export default class Mocks extends Vue {
@Prop()
personalCode!: string
- mode: Mode = Mode.ADD
+ @Prop()
+ mode!: Mode
+
registers = new Registers()
register2Id: Record = {}
@@ -26,20 +28,21 @@ export default class Mocks extends Vue {
@Watch('personalCode', { immediate: true })
onPersonalCodeChanged (value: string, oldValue: string) {
- this.mode = Mode.ADD
- httpClient.mockConfigurations({ personalCode: this.personalCode })
+ this.mode === Mode.UPDATE && httpClient.mockConfigurations({ personalCode: this.personalCode })
.then((data: any) => {
for (const mockConfiguration of data.data) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.registers[mockConfiguration.code] = mockConfiguration.value
this.register2Id[mockConfiguration.code] = mockConfiguration.id
- this.mode = Mode.UPDATE
}
})
}
onXteeMtaChanged () {
+ if (this.mode !== Mode.UPDATE) {
+ return
+ }
if (this.register2Id.xtee_mta === 'undefined') {
return
}
@@ -54,6 +57,9 @@ export default class Mocks extends Vue {
}
onRiaChanged () {
+ if (this.mode !== Mode.UPDATE) {
+ return
+ }
if (this.register2Id.ria === 'undefined') {
return
}
diff --git a/popup/src/components/person-tab/template.html b/popup/src/components/person-tab/template.html
index 0bac3e4..917895f 100644
--- a/popup/src/components/person-tab/template.html
+++ b/popup/src/components/person-tab/template.html
@@ -60,6 +60,6 @@
Memory: {{copyText}}
-
+