15
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
-->
17
17
<dialogs-menu >
18
- <add-registry-url if =" { ! props .readOnlyRegistries }" opened =" { state[' add-registry-url' ] }" on-close =" { onClose (' add-registry-url' ) }"
19
- on-notify =" { props .onNotify }" on-server-change =" { props .onServerChange }" ></add-registry-url >
20
- <change-registry-url opened =" { state[' change-registry-url' ] }" on-close =" { onClose (' change-registry-url' ) }"
21
- on-notify =" { props .onNotify }" on-server-change =" { props .onServerChange }" ></change-registry-url >
22
- <remove-registry-url if =" { ! props .readOnlyRegistries }" opened =" { state[' remove-registry-url' ] }" on-close =" { onClose (' remove-registry-url' ) }"
23
- on-notify =" { props .onNotify }" on-server-change =" { props .onServerChange }" ></remove-registry-url >
18
+ <add-registry-url
19
+ if =" { ! props .readOnlyRegistries }"
20
+ opened =" { state[' add-registry-url' ] }"
21
+ on-close =" { onClose (' add-registry-url' ) }"
22
+ on-notify =" { props .onNotify }"
23
+ on-server-change =" { props .onServerChange }"
24
+ ></add-registry-url >
25
+ <change-registry-url
26
+ opened =" { state[' change-registry-url' ] }"
27
+ on-close =" { onClose (' change-registry-url' ) }"
28
+ on-notify =" { props .onNotify }"
29
+ on-server-change =" { props .onServerChange }"
30
+ ></change-registry-url >
31
+ <remove-registry-url
32
+ if =" { ! props .readOnlyRegistries }"
33
+ opened =" { state[' remove-registry-url' ] }"
34
+ on-close =" { onClose (' remove-registry-url' ) }"
35
+ on-notify =" { props .onNotify }"
36
+ on-server-change =" { props .onServerChange }"
37
+ ></remove-registry-url >
24
38
<div class =" container" >
25
39
<material-button onClick =" { onClick }" waves-center =" true" rounded =" true" waves-opacity =" 0.6" waves-duration =" 600" >
26
40
<i class =" material-icons" >more_vert</i >
27
41
</material-button >
28
- <material-dropdown-list items =" { dropdownItems .filter (item => item .ro || ! props .readOnlyRegistries ) }" onSelect =" { onDropdownSelect }"
29
- opened =" { state .isDropdownOpened }" />
42
+ <material-dropdown-list
43
+ items =" { dropdownItems .filter (item => item .ro || ! props .readOnlyRegistries ) }"
44
+ onSelect =" { onDropdownSelect }"
45
+ opened =" { state .isDropdownOpened }"
46
+ />
30
47
</div >
31
48
<div class =" overlay" onclick =" { onClick }" if =" { state .isDropdownOpened }" ></div >
32
49
<script >
38
55
components: {
39
56
AddRegistryUrl,
40
57
ChangeRegistryUrl,
41
- RemoveRegistryUrl
58
+ RemoveRegistryUrl,
42
59
},
43
- dropdownItems: [{
44
- title: ' Add URL' ,
45
- name: ' add-registry-url' ,
46
- ro: false
47
- }, {
48
- title: ' Change URL' ,
49
- name: ' change-registry-url' ,
50
- ro: true
51
- }, {
52
- title: ' Remove URL' ,
53
- name: ' remove-registry-url' ,
54
- ro: false
55
- }],
60
+ dropdownItems: [
61
+ {
62
+ title: ' Add URL' ,
63
+ name: ' add-registry-url' ,
64
+ ro: false ,
65
+ },
66
+ {
67
+ title: ' Change URL' ,
68
+ name: ' change-registry-url' ,
69
+ ro: true ,
70
+ },
71
+ {
72
+ title: ' Remove URL' ,
73
+ name: ' remove-registry-url' ,
74
+ ro: false ,
75
+ },
76
+ ],
56
77
onDropdownSelect (key , item ) {
57
78
this .update ({
58
79
[item .name ]: true ,
59
- isDropdownOpened: false
80
+ isDropdownOpened: false ,
60
81
});
61
82
},
62
83
onClose (name ) {
63
84
return () => {
64
85
this .update ({
65
86
[name]: false ,
66
- isDropdownOpened: false
67
- })
68
- }
87
+ isDropdownOpened: false ,
88
+ });
89
+ };
69
90
},
70
91
onClick () {
71
92
this .update ({
72
- isDropdownOpened: ! this .state .isDropdownOpened
73
- })
74
- }
75
- }
93
+ isDropdownOpened: ! this .state .isDropdownOpened ,
94
+ });
95
+ },
96
+ };
76
97
</script >
77
98
<style >
78
- :host > .container {
99
+ :host > .container {
79
100
position : absolute ;
80
101
top : 0px ;
81
102
right : 16px ;
128
149
line-height : 36px ;
129
150
}
130
151
</style >
131
- </dialogs-menu >
152
+ </dialogs-menu >
0 commit comments