diff options
author | Kornel <kornel@geekhood.net> | 2020-01-25 18:05:48 +0000 |
---|---|---|
committer | Kornel <kornel@geekhood.net> | 2020-01-25 18:06:01 +0000 |
commit | b5da3d19ab96a17ea3b3662c6b70b434f5388bb4 (patch) | |
tree | d2d56f2f2d24760d653848490041c7bba3af34ae /front_end/templates | |
parent | b716c35bb04b879562b8ea7f84f9f3d342aa7c19 (diff) |
Detect crates with copyleft deps
Diffstat (limited to 'front_end/templates')
-rw-r--r-- | front_end/templates/crate_page.rs.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/front_end/templates/crate_page.rs.html b/front_end/templates/crate_page.rs.html index 42cfb24..d7dc821 100644 --- a/front_end/templates/crate_page.rs.html +++ b/front_end/templates/crate_page.rs.html @@ -232,7 +232,7 @@ <section id="license"> @if let Some(lic) = c.ver.license_name() { <b property="license">@lic</b> - @if lic.len() < 8 { + @if lic.len() < 8 && c.viral_license.is_none() { license } } else { @@ -240,6 +240,16 @@ <b title="@filename">Custom license</b> } } + @if let Some(ref vir) = c.viral_license { + and + @if vir.optional { + maybe + } + <a href="@url.crate_by_origin(&vir.origin)">@vir.license</a> + @if !vir.optional && vir.license.len() < 8 { + licenses + } + } </section> @if let Some(sz) = &c.sizes { |