|
12 | 12 | lazy="true" required="false" feedback="false" autofocus="false" |
13 | 13 | :label="$t('message.version')" :tooltip="this.$t('message.component_version_desc')"/> |
14 | 14 | <b-input-group-form-select id="v-classifier-input" required="true" |
15 | | - v-model="project.classifier" :options="availableClassifiers" |
| 15 | + v-model="project.classifier" :options="sortAvailableClassifiers" |
16 | 16 | :label="$t('message.classifier')" :tooltip="$t('message.component_classifier_desc')" /> |
17 | 17 | <b-form-group |
18 | 18 | id="project-description-form-group" |
|
100 | 100 | readOnlyProjectName: '', |
101 | 101 | readOnlyProjectVersion: '', |
102 | 102 | availableClassifiers: [ |
103 | | - { value: 'APPLICATION', text: 'Application' }, |
104 | | - { value: 'FRAMEWORK', text: 'Framework' }, |
105 | | - { value: 'LIBRARY', text: 'Library' }, |
106 | | - { value: 'CONTAINER', text: 'Container' }, |
107 | | - { value: 'OPERATING_SYSTEM', text: 'Operating System' }, |
108 | | - { value: 'DEVICE', text: 'Device' }, |
109 | | - { value: 'FIRMWARE', text: 'Firmware' }, |
110 | | - { value: 'FILE', text: 'File' } |
| 103 | + { value: 'APPLICATION', text: this.$i18n.t('message.component_application') }, |
| 104 | + { value: 'FRAMEWORK', text: this.$i18n.t('message.component_framework') }, |
| 105 | + { value: 'LIBRARY', text: this.$i18n.t('message.component_library') }, |
| 106 | + { value: 'CONTAINER', text: this.$i18n.t('message.component_container') }, |
| 107 | + { value: 'OPERATING_SYSTEM', text: this.$i18n.t('message.component_os') }, |
| 108 | + { value: 'DEVICE', text: this.$i18n.t('message.component_device') }, |
| 109 | + { value: 'FIRMWARE', text: this.$i18n.t('message.component_firmware') }, |
| 110 | + { value: 'FILE', text: this.$i18n.t('message.component_file') } |
111 | 111 | ], |
112 | 112 | selectableLicenses: [], |
113 | 113 | selectedLicense: '', |
|
131 | 131 | beforeMount() { |
132 | 132 | this.retrieveLicenses(); |
133 | 133 | }, |
| 134 | + computed: { |
| 135 | + sortAvailableClassifiers: function() { |
| 136 | + this.availableClassifiers.sort(function(a, b) { |
| 137 | + return a.text.localeCompare(b.text); |
| 138 | + }); |
| 139 | + return this.availableClassifiers; |
| 140 | + } |
| 141 | + }, |
134 | 142 | methods: { |
135 | 143 | syncReadOnlyNameField: function(value) { |
136 | 144 | this.readOnlyProjectName = value; |
|
0 commit comments