Skip to content

Commit

Permalink
Link to pattern creation page
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 23, 2024
1 parent 0a41246 commit 2b2f8d2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions assets/vue/ClassifySnippets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@
</div>
<div class="snippet-footer">
<div class="snippet-likelyness">
<div v-if="snippet.license_name !== null">
<b>{{ snippet.likelyness }}%</b> similarity to <b>{{ snippet.license_name }}</b
>, estimated risk
{{ snippet.risk }}
</div>
<div v-else>No similarity to any known licenses</div>
<a :href="snippet.editUrl" target="_blank">
<div v-if="snippet.license_name !== null">
<b>{{ snippet.likelyness }}%</b> similarity to <b>{{ snippet.license_name }}</b
>, estimated risk
{{ snippet.risk }}
</div>
<div v-else>No similarity to any known licenses</div>
</a>
</div>
<div class="snippet-assessment float-right">
<div v-if="snippet.classified === true && snippet.license === true">
Expand Down Expand Up @@ -170,6 +172,7 @@ export default {
for (const snippet of snippets) {
snippet.buttonPressed = null;
snippet.fileUrl = `/reviews/file_view/${snippet.package}/${snippet.filename}`;
snippet.editUrl = `/snippet/edit/${snippet.id}`;
let num = snippet.sline ?? 1;
const lines = [];
for (const line of snippet.text.split('\n')) {
Expand Down Expand Up @@ -243,8 +246,9 @@ export default {
line-height: 20px;
padding: 10px;
}
.snippet-file a {
color: #586069;
.snippet-file a,
.snippet-likelyness a {
color: #212529;
}
.snippet-file-container {
padding: 0;
Expand Down

0 comments on commit 2b2f8d2

Please sign in to comment.