Remove default description and license and add checklist nag for license (#892)

* Remove default description, remove default license, and add a checklist nag for setting a license

* Make Unknown license display nicer in License settings

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Prospector
2023-01-11 10:06:29 -08:00
committed by GitHub
parent 61a4f15e53
commit aabf270144
3 changed files with 25 additions and 24 deletions

View File

@@ -88,7 +88,7 @@
type="url"
maxlength="2048"
placeholder="License URL (optional)"
:disabled="!hasPermission"
:disabled="!hasPermission || licenseId === 'LicenseRef-Unknown'"
/>
</div>
</div>
@@ -168,6 +168,12 @@ export default {
friendly: 'Custom',
short: licenseId.replaceAll('LicenseRef-', ''),
}
if (licenseId === 'LicenseRef-Unknown') {
this.license = {
friendly: 'Unknown',
short: licenseId.replaceAll('LicenseRef-', ''),
}
}
this.allowOrLater = licenseId.includes('-or-later')
this.nonSpdxLicense = licenseId.includes('LicenseRef-')
},
@@ -180,7 +186,8 @@ export default {
let id = ''
if (
(this.nonSpdxLicense && this.license.friendly === 'Custom') ||
this.license.short === 'All-Rights-Reserved'
this.license.short === 'All-Rights-Reserved' ||
this.license.short === 'Unknown'
)
id += 'LicenseRef-'
id += this.license.short