Skip to content
Snippets Groups Projects
Commit f1dbd7dc authored by Dominik Seeger's avatar Dominik Seeger
Browse files

added a hint on commented lines when comments are hidden

parent 32561377
No related branches found
No related tags found
No related merge requests found
Pipeline #105010 failed
This commit is part of merge request !175. Comments created here will be created in the context of that merge request.
......@@ -8,6 +8,7 @@
<template slot="table-content" id='sub-lines'>
<tr v-for="(code, lineNo) in submission" :key="`${submissionObj.pk}${lineNo}`" :id="`sub-line-${lineNo}`">
<submission-line
:hint="hintAtHiddenComment(lineNo)"
:code="code"
:line-no="lineNo"
@toggleEditor="toggleEditorOnLine(lineNo)"
......@@ -170,6 +171,10 @@ export default {
}
}, 5e3)
},
hintAtHiddenComment (lineNo) {
return !this.showFeedback && this.origFeedback[lineNo]
&& this.origFeedback[lineNo].length > 0
},
init () {
SubmissionNotes.RESET_STATE()
SubmissionNotes.SET_SUBMISSION(this.submissionObj)
......
<template>
<div>
<td class="line-number-cell">
<v-btn
<v-btn v-if="hint"
block
depressed
class="line-number-btn"
color="error"
@click="toggleEditor"
>
{{ lineNo }}
</v-btn>
<v-btn
v-else
flat
block
depressed
class="line-number-btn"
@click="toggleEditor"
>
{{ lineNo }}
......@@ -32,7 +43,11 @@ export default {
codeLanguage: {
type: String,
default: 'lang-c'
}
},
hint: {
type: Boolean,
default: false,
},
},
methods: {
toggleEditor () {
......@@ -60,5 +75,6 @@ export default {
height: fit-content;
min-width: 50px;
margin: 0;
border-radius: 0;
}
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment