88 <p :class =" 'stepper-instructions'" >{{ $t('select-license-instructions') }}</p >
99 <b-steps size =" is-small" >
1010 <b-step-item
11- v-for =" item in this.licenses"
12- :label =" item.label"
11+ v-for =" item in this.steps"
1312 :icon-pack =" item['icon-pack']"
1413 :icon =" item.icon"
15- v-bind:key =" item.shortName"
14+ :label =$t(item.label)
15+ :key =" item.shortName"
1616 :selected =" isStepSelected(item.shortName)"
1717 :visible =" isStepVisible(item.shortName)"
1818 :clickable =true
1919 :type =" attributeType(item.shortName)"
2020 >
2121 <SelectionStep
22+ v-if =" item.itemType==='licenseAttribute'"
2223 :selected =" isStepSelected(item.shortName)"
2324 :stepId =" item.shortName"
2425 v-on:input =" updateLicense(item.shortName)"
2526 />
26- </b-step-item >
27- <b-step-item
28- :label =" this.$t('AttributionDetailsLabel')"
29- :clickable =true
30- icon =" check"
31- :type =" 'attributionDetails'"
32- :visible =" isStepVisible('')"
33- >
27+ <CopyrightWaiverStep
28+ v-if =" item.itemType==='CC0Attribute'"
29+ />
30+
3431 <AttributionDetailsStep
32+ v-if =" item.itemType==='AttributionDetails'"
3533 v-model =" value.attributionDetails"
3634 />
3735 </b-step-item >
4442
4543import SelectionStep from ' ./SelectionStep'
4644import AttributionDetailsStep from ' ./AttributionDetailsStep'
45+ import CopyrightWaiverStep from ' ./CopyrightWaiverStep'
4746
4847export default {
4948 name: ' Stepper' ,
5049 props: [' value' ],
5150 components: {
5251 SelectionStep,
53- AttributionDetailsStep
52+ AttributionDetailsStep,
53+ CopyrightWaiverStep
5454 },
5555 data () {
5656 return {
57- licenses : [
57+ steps : [
5858 {
59- label: this . $t ( ' AttributionLabel ' ) ,
59+ label: ' stepper-label.Attribution ' ,
6060 shortName: ' BY' ,
6161 ' icon-pack' : ' fab' ,
62- icon: ' creative-commons-by'
62+ itemType: ' licenseAttribute' ,
63+ icon: this .getAttributionIcon ()
6364 },
6465 {
65- label: this . $t ( ' NoDerivativesLabel ' ) ,
66+ label: ' stepper-label.NoDerivatives ' ,
6667 shortName: ' ND' ,
6768 ' icon-pack' : ' fab' ,
69+ itemType: ' licenseAttribute' ,
6870 icon: ' creative-commons-nd'
6971 },
7072 {
71- label: this . $t ( ' NonCommercialLabel ' ) ,
73+ label: ' stepper-label.NonCommercial ' ,
7274 shortName: ' NC' ,
7375 ' icon-pack' : ' fab' ,
76+ itemType: ' licenseAttribute' ,
7477 icon: ' creative-commons-nc'
7578 },
7679 {
77- label: this . $t ( ' Share-AlikeLabel ' ) ,
80+ label: ' stepper-label. Share-Alike ' ,
7881 shortName: ' SA' ,
7982 ' icon-pack' : ' fab' ,
83+ itemType: ' licenseAttribute' ,
8084 icon: ' creative-commons-sa'
85+ },
86+ {
87+ label: ' stepper-label.CopyrightWaiver' ,
88+ shortName: ' wv' ,
89+ ' icon-pack' : ' fas' ,
90+ itemType: ' CC0Attribute' ,
91+ icon: ' exclamation-circle'
92+ },
93+ {
94+ label: ' stepper-label.AttributionDetails' ,
95+ shortName: ' ad' ,
96+ ' icon-pack' : ' fas' ,
97+ itemType: ' AttributionDetails' ,
98+ icon: ' check'
8199 }
82100 ]
83101 }
@@ -88,13 +106,16 @@ export default {
88106 }
89107 },
90108 methods: {
109+ getAttributionIcon () {
110+ return this .isStepSelected (' BY' ) ? ' creative-commons-by' : ' creative-commons-zero'
111+ },
91112 updateLicense (itemId ) {
92113 const attrs = { ... this .licenseAttributes }
93114 attrs[itemId] = ! attrs[itemId]
94115 this .$emit (' input' , {
95116 shortName: this .shortLicenseName (attrs),
96117 fullName: this .fullLicenseName (attrs),
97- personalDetails : this .$props .value .personalDetails
118+ attributionDetails : this .$props .value .attributionDetails
98119 })
99120 },
100121 shortLicenseName (attr ) {
@@ -131,9 +152,9 @@ export default {
131152 },
132153 isStepVisible (attrName ) {
133154 if (this .$props .value .shortName .includes (' CC0' )) {
134- return attrName === ' BY'
155+ return ( attrName === ' BY' || attrName === ' wv ' || attrName === ' ad ' )
135156 }
136- return ! (this .$props .value .shortName .includes (' ND' ) && attrName === ' SA' )
157+ return ! (this .$props .value .shortName .includes (' ND' ) && attrName === ' SA' ) && ! (attrName === ' wv ' )
137158 }
138159 }
139160}
@@ -176,6 +197,7 @@ export default {
176197 span .step-title {
177198 font-size :0.875rem ;
178199 line-height :1 ;
200+ white-space : nowrap ;
179201 }
180202 }
181203 }
@@ -215,12 +237,12 @@ export default {
215237 a .step-link {
216238 div .step-marker {
217239 span > svg > path {
218- opacity : 50 % !important ;
240+ opacity : 40 % !important ;
219241 }
220242 }
221243 div .step-details span .step-title {
222- font-weight : 400 ;
223- opacity : 50 % ;
244+ font-weight : 500 ;
245+ opacity : 60 % ;
224246 }
225247 }
226248 }
@@ -235,11 +257,11 @@ export default {
235257 }
236258 section .step-content {
237259 padding-bottom : 0 ;
238- height : 300 px ;
260+ height : 280 px ;
239261 }
240262 nav .step-navigation {
241263 display : flex ;
242- margin : 0.5 rem 1rem 0.5rem auto ;
264+ margin : 0 1rem 0.5rem auto ;
243265 justify-content : flex-end ;
244266 a .pagination-previous {
245267 margin-left : auto ;
0 commit comments