Skip to content

Commit

Permalink
change Exp label
Browse files Browse the repository at this point in the history
  • Loading branch information
JumanaFM committed Nov 10, 2023
1 parent 0ebbdce commit 6ca724e
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 41 deletions.
2 changes: 1 addition & 1 deletion public/style/plugin.css
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@
}
#nb-app .nb-sidebar .thread-view .thread-row .footer > span .icon {
height: 14px;
vertical-align: top;
vertical-align: bottom;
}

#nb-app-wrapper .thread-overflow-wrapper .tooltip-arrow {
Expand Down
4 changes: 3 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ function embedNbApp() {
let filterUpvotes = this.filter.upvotes
if (filterUpvotes.length > 0) {
items = items.filter(item => {
if ( (filterUpvotes.includes('anyone') && item.hasUpvotes()) || (this.currentConfigs.isExpClass && item.hasUserPost(this.user.id))) {
if ( (filterUpvotes.includes('anyone') && item.hasUpvotes())
|| (this.currentConfigs.isExpClass && item.hasUserPost(this.user.id))
|| (this.currentConfigs.isExpClass && item.hasReplyRequests())) {
return true
}
if (filterUpvotes.includes('me') && item.hasMyUpvotes()) {
Expand Down
4 changes: 3 additions & 1 deletion src/components/editor/EditorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
<div class="checkbox-buttons">
<input type="checkbox" id="draft-request-reply" v-if="currentConfigs.isExpClass" v-model="upvotedByMe">
<input type="checkbox" id="draft-request-reply" v-else v-model="replyRequested">
<label for="draft-request-reply">{{ currentConfigs.isExpClass ? "Discuss with class" : "Request replies" }}</label>
<label for="draft-request-reply">{{ currentConfigs.isExpClass ? "Looking for Classmates' Perspectives" : "Request replies" }}</label>
</div>
<div class="checkbox-buttons">
<div class="buttons">
<button class="cancel" @click="cancel" :disabled='isSubmitting'>Cancel</button>
<button class="submit" @click="submit" :disabled='isSubmitting || !canSubmit'>
Expand Down
67 changes: 34 additions & 33 deletions src/components/filters/FilterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,41 @@
</div>
</div>
<div class="title">Max. # of threads</div>
<div>
<div>
<input
type="number"
id="max-threads"
placeholder="n/a"
min="0"
v-model="maxThreads"
@keypress="event => validateNumber(event)"
@change="onFilterChange('max-threads')">
</div>
<div class="title">{{currentConfigs.isExpClass ? `Looking for Classmates' Perspectives` : 'Upvotes'}}</div>
<div class="upvotes">
<div>
<input
type="number"
id="max-threads"
placeholder="n/a"
min="0"
v-model="maxThreads"
@keypress="event => validateNumber(event)"
@change="onFilterChange('max-threads')">
type="checkbox"
id="anyone-upvotes"
value="anyone"
v-model="filterUpvotes"
@change="onFilterChange('upvotes')">
<label for="anyone-upvotes">
anyone
</label>
</div>
<div>
<input
type="checkbox"
id="my-upvotes"
value="me"
v-model="filterUpvotes"
@change="onFilterChange('upvotes')">
<label for="my-upvotes">
me
</label>
</div>
</div>
<div class="title">Users tagged</div>
<div class="user-tags">
<div>
Expand Down Expand Up @@ -163,31 +188,7 @@
</label>
</div>
</div>
<div class="title">{{currentConfigs.isExpClass ? 'Discussion comments' : 'Upvotes'}}</div>
<div class="upvotes">
<div>
<input
type="checkbox"
id="anyone-upvotes"
value="anyone"
v-model="filterUpvotes"
@change="onFilterChange('upvotes')">
<label for="anyone-upvotes">
anyone
</label>
</div>
<div>
<input
type="checkbox"
id="my-upvotes"
value="me"
v-model="filterUpvotes"
@change="onFilterChange('upvotes')">
<label for="my-upvotes">
me
</label>
</div>
</div>

<div class="title">
Others
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/highlights/NbHighlight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default {
},
style: function () {
if (this.isHidden) {
return "fill: none; stroke: rgb(255 204 1 / 75%); stroke-dasharray: 3;"
return "fill: none; stroke: rgb(255 204 1 / 95%); stroke-dasharray: 3;"
}
if (!this.thread) {
return 'fill: rgb(231, 76, 60); fill-opacity: 0.3; cursor: pointer;'
Expand Down
8 changes: 4 additions & 4 deletions src/components/thread/ThreadComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@
</span>
&nbsp;·&nbsp;
<span
v-tooltip="currentConfigs.isExpClass ? (comment.upvotedByMe ? 'undo discuss' : 'discuss') : (comment.upvotedByMe ? 'undo upvote' : 'upvote')"
v-tooltip="currentConfigs.isExpClass ? (comment.upvotedByMe ? `undo looking for classmates' perspectives` : `looking for classmates' perspectives`) : (comment.upvotedByMe ? 'undo upvote' : 'upvote')"
@click="toggleUpvote(comment)">
<font-awesome-icon :icon="currentConfigs.isExpClass ? 'comments' : 'thumbs-up'" class="icon" :style="styleUpvote">
</font-awesome-icon>
{{ comment.upvoteCount }}
<span v-if="currentConfigs.isExpClass" class="icon" :style="styleUpvote">👁️‍🗨️</span>
<font-awesome-icon v-else :icon="'thumbs-up'" class="icon" :style="styleUpvote"></font-awesome-icon>
{{ comment.upvoteCount }}
</span>
&nbsp;·&nbsp;
<span
Expand Down

0 comments on commit 6ca724e

Please sign in to comment.