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
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<template slot="table-content" id='sub-lines'> <template slot="table-content" id='sub-lines'>
<tr v-for="(code, lineNo) in submission" :key="`${submissionObj.pk}${lineNo}`" :id="`sub-line-${lineNo}`"> <tr v-for="(code, lineNo) in submission" :key="`${submissionObj.pk}${lineNo}`" :id="`sub-line-${lineNo}`">
<submission-line <submission-line
:hint="hintAtHiddenComment(lineNo)"
:code="code" :code="code"
:line-no="lineNo" :line-no="lineNo"
@toggleEditor="toggleEditorOnLine(lineNo)" @toggleEditor="toggleEditorOnLine(lineNo)"
...@@ -170,6 +171,10 @@ export default { ...@@ -170,6 +171,10 @@ export default {
} }
}, 5e3) }, 5e3)
}, },
hintAtHiddenComment (lineNo) {
return !this.showFeedback && this.origFeedback[lineNo]
&& this.origFeedback[lineNo].length > 0
},
init () { init () {
SubmissionNotes.RESET_STATE() SubmissionNotes.RESET_STATE()
SubmissionNotes.SET_SUBMISSION(this.submissionObj) SubmissionNotes.SET_SUBMISSION(this.submissionObj)
......
<template> <template>
<div> <div>
<td class="line-number-cell"> <td class="line-number-cell">
<v-btn <v-btn v-if="hint"
block block
depressed
class="line-number-btn" class="line-number-btn"
color="error"
@click="toggleEditor"
>
{{ lineNo }}
</v-btn>
<v-btn
v-else
flat flat
block
depressed
class="line-number-btn"
@click="toggleEditor" @click="toggleEditor"
> >
{{ lineNo }} {{ lineNo }}
...@@ -32,7 +43,11 @@ export default { ...@@ -32,7 +43,11 @@ export default {
codeLanguage: { codeLanguage: {
type: String, type: String,
default: 'lang-c' default: 'lang-c'
} },
hint: {
type: Boolean,
default: false,
},
}, },
methods: { methods: {
toggleEditor () { toggleEditor () {
...@@ -60,5 +75,6 @@ export default { ...@@ -60,5 +75,6 @@ export default {
height: fit-content; height: fit-content;
min-width: 50px; min-width: 50px;
margin: 0; margin: 0;
border-radius: 0;
} }
</style> </style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment