Total Complexity | 5 |
Complexity/F | 1.67 |
Lines of Code | 51 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import template from './sw-extension-deactivation-modal.html.twig'; |
||
2 | import './sw-extension-deactivation-modal.scss'; |
||
3 | |||
4 | const { Component } = Shopware; |
||
|
|||
5 | |||
6 | /** |
||
7 | * @private |
||
8 | */ |
||
9 | Component.register('sw-extension-deactivation-modal', { |
||
10 | template, |
||
11 | |||
12 | props: { |
||
13 | extensionName: { |
||
14 | type: String, |
||
15 | required: true |
||
16 | }, |
||
17 | isLicensed: { |
||
18 | type: Boolean, |
||
19 | required: true |
||
20 | }, |
||
21 | isLoading: { |
||
22 | type: Boolean, |
||
23 | required: true |
||
24 | } |
||
25 | }, |
||
26 | |||
27 | computed: { |
||
28 | removeHint() { |
||
29 | return this.$tc('sw-extension-store.component.sw-extension-deactivation-modal.descriptionCancel', 0, |
||
30 | { |
||
31 | removeLabel: this.isLicensed ? |
||
32 | this.$tc('sw-extension-store.component.sw-extension-card-base.contextMenu.cancelAndRemoveLabel') : |
||
33 | this.$tc('sw-extension-store.component.sw-extension-card-base.contextMenu.removeLabel') |
||
34 | }); |
||
35 | } |
||
36 | }, |
||
37 | |||
38 | methods: { |
||
39 | emitClose() { |
||
40 | if (this.isLoading) { |
||
41 | return; |
||
42 | } |
||
43 | |||
44 | this.$emit('modal-close'); |
||
45 | }, |
||
46 | |||
47 | emitDeactivate() { |
||
48 | this.$emit('extension-deactivate'); |
||
49 | } |
||
50 | } |
||
51 | }); |
||
52 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.