71
71
</button >
72
72
</div >
73
73
</div >
74
+
75
+ <div class =" form-group" >
76
+ <label for =" patch" >Patch</label >
77
+ <div class =" input-refresh-wrapper" >
78
+ <select v-model =" form.patch" id =" patch" >
79
+ <option :value =" true" >True</option >
80
+ <option :value =" false" >False</option >
81
+ </select >
82
+ </div >
83
+ </div >
84
+
85
+ <div class =" form-group" >
86
+ <label for =" tagId" >TAG VERSION</label >
87
+ <div class =" input-refresh-wrapper" >
88
+ <input
89
+ type =" number"
90
+ id =" tagId"
91
+ v-model =" form.tagVersion"
92
+ required
93
+ readonly
94
+ @input =" validateField('tagId')"
95
+ :class =" {'invalid-input': !form.tagId}"
96
+ >
97
+ <button type =" button" @click =" decrementTagVersion" class =" refresh-button" >
98
+ <i class =" fas fa-minus" style =" color :#26c1c9 " ></i >
99
+ </button >
100
+ <button type =" button" @click =" incrementTagVersion" class =" refresh-button" >
101
+ <i class =" fas fa-plus" style =" color :#26c1c9 " ></i >
102
+ </button >
103
+ </div >
104
+ </div >
105
+
106
+
74
107
</template >
75
108
</vue-collapsible-panel >
76
109
<vue-collapsible-panel :expanded =" false" >
@@ -134,6 +167,8 @@ export default {
134
167
regId: ' example.com' ,
135
168
tagCreatorName: ' ' ,
136
169
tagRegId: ' ' ,
170
+ tagVersion: 0 ,
171
+ patch: false
137
172
},
138
173
isRegIdValid: true ,
139
174
isTagRegIdValid: true ,
@@ -208,9 +243,25 @@ export default {
208
243
qualifiers .tag_creator_regid = this .form .tagRegId ;
209
244
}
210
245
246
+ if (this .form .patch === true ) {
247
+ qualifiers .patch = this .form .patch ;
248
+ }
249
+
250
+ if (this .form .tagVersion > 0 ) {
251
+ qualifiers .tag_version = this .form .tagVersion ;
252
+ }
253
+
211
254
const purl = new PackageURL (' swid' , namespace, this .form .name , this .form .version , qualifiers, null );
212
255
this .packageUrl = purl .toString ();
213
- }
256
+ },
257
+ incrementTagVersion () {
258
+ this .form .tagVersion += 1 ;
259
+ },
260
+ decrementTagVersion () {
261
+ if (this .form .tagVersion > 0 ) {
262
+ this .form .tagVersion -= 1 ;
263
+ }
264
+ },
214
265
},
215
266
};
216
267
</script >
@@ -244,7 +295,7 @@ export default {
244
295
color : #A9C7DF ;
245
296
}
246
297
.form-group input ,
247
- .form-group textarea {
298
+ .form-group textarea , select {
248
299
width : 100% ;
249
300
padding : 10px ;
250
301
background-color : #222C3C ;
@@ -254,15 +305,16 @@ export default {
254
305
transition : border-color 0.3s ease-in-out ;
255
306
}
256
307
.form-group input :focus ,
257
- .form-group textarea :focus {
308
+ .form-group textarea :focus ,
309
+ .form-group select :focus {
258
310
border-color : #0093EE ;
259
311
outline : none ;
260
312
}
261
313
.input-refresh-wrapper {
262
314
display : flex ;
263
315
align-items : center ;
264
316
}
265
- .input-refresh-wrapper input {
317
+ .input-refresh-wrapper input , .input-refresh-wrapper select {
266
318
flex-grow : 1 ;
267
319
}
268
320
.input-refresh-wrapper button {
0 commit comments