Skip to content

Commit

Permalink
differentiate full and partial credit when group is merged
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyBlaise99 committed Jan 21, 2024
1 parent 896c55a commit cdf2689
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/components/c-segment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
div(v-if="isOpen", v-hljs="path")
.code(
v-for="(line, index) in segment.lines", v-bind:key="index",
v-bind:style="{ 'background-color': `${authorColors[segment.knownAuthor]}${transparencyValue}` }"
v-bind:style="{ 'background-color': `${authorColors[segment.knownAuthor]}" +
"${segment.isFullCredit ? fullCreditTransparencyValue : partialCreditTransparencyValue}` }"
)
.line-number {{ `${segment.lineNumbers[index]}\n` }}
.line-content {{ `${line}\n` }}
Expand Down Expand Up @@ -53,7 +54,8 @@ export default defineComponent({
return {
isOpen: (this.segment.knownAuthor !== null) || this.segment.lines.length < 5 as boolean,
canOpen: (this.segment.knownAuthor === null) && this.segment.lines.length > 4 as boolean,
transparencyValue: '30' as string,
fullCreditTransparencyValue: '75' as string,
partialCreditTransparencyValue: '30' as string,
};
},
computed: {
Expand Down

0 comments on commit cdf2689

Please sign in to comment.