Total Complexity | 5 |
Complexity/F | 1.25 |
Lines of Code | 52 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import template from './sw-extension-uninstall-modal.html.twig'; |
||
2 | import './sw-extension-uninstall-modal.scss'; |
||
3 | |||
4 | const { Component } = Shopware; |
||
|
|||
5 | |||
6 | /** |
||
7 | * @private |
||
8 | */ |
||
9 | Component.register('sw-extension-uninstall-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 | data() { |
||
28 | return { |
||
29 | removePluginData: false |
||
30 | }; |
||
31 | }, |
||
32 | |||
33 | computed: { |
||
34 | title() { |
||
35 | return this.$t('sw-extension-store.component.sw-extension-uninstall-modal.title', { extensionName: this.extensionName }); |
||
36 | } |
||
37 | }, |
||
38 | |||
39 | methods: { |
||
40 | emitClose() { |
||
41 | if (this.isLoading) { |
||
42 | return; |
||
43 | } |
||
44 | |||
45 | this.$emit('modal-close'); |
||
46 | }, |
||
47 | |||
48 | emitUninstall() { |
||
49 | this.$emit('uninstall-extension', this.removePluginData); |
||
50 | } |
||
51 | } |
||
52 | }); |
||
53 |
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.