-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added previous_tags setting #306
Changes from 6 commits
a0d3dd0
77d3ffc
3d7ada1
157a338
4a90ddb
e71956f
f70b68a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,6 @@ | |
v-click-outside="clickOutsideTag" | ||
/> | ||
</div> | ||
|
||
<!-- Quantity --> | ||
<div class="select" id="int"> | ||
<select v-model="quantity"> | ||
|
@@ -72,11 +71,26 @@ | |
</div> | ||
|
||
<br><br> | ||
|
||
<div v-if="show_previous_tags && Object.keys(previousTags).length > 0 && show_previous_tags"> | ||
<h1>{{ $t('tags.previous-tags') }}:</h1> | ||
xlcrr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div v-for="category in Object.keys(previousTags)"> | ||
<p>{{ getCategoryName(category) }}</p> | ||
|
||
<div v-if="Object.keys(recentTags).length > 0 && this.annotations !== true && this.id !== 0" class="mb-5"> | ||
<transition-group name="list" class="recent-tags" tag="div" :key="category"> | ||
<div | ||
v-for="tag in Object.keys(previousTags[category])" | ||
class="litter-tag" | ||
:key="tag" | ||
@click="addRecentTag(category, tag)" | ||
><p>{{ getTagName(category, tag) }}</p></div> | ||
</transition-group> | ||
</div> | ||
<hr v-if="Object.keys(previousTags).length > 0"> | ||
</div> | ||
|
||
<div v-if="Object.keys(recentTags).length > 0 && this.annotations !== true && this.id !== 0" class="mb-5"> | ||
<p class="mb-05">{{ $t('tags.recently-tags') }}</p> | ||
|
||
<div v-for="category in Object.keys(recentTags)"> | ||
<p>{{ getCategoryName(category) }}</p> | ||
|
||
|
@@ -90,7 +104,6 @@ | |
</transition-group> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<button | ||
:disabled="checkDecr" | ||
|
@@ -109,7 +122,6 @@ | |
@click="incr" | ||
>+</button> | ||
</div> | ||
|
||
<br> | ||
|
||
<button | ||
|
@@ -197,6 +209,11 @@ export default { | |
}; | ||
}, | ||
computed: { | ||
|
||
//whether the user wants to show previous tags. return type: boolean | ||
show_previous_tags(){ | ||
return this.user.previous_tags == 1; | ||
xlcrr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
/** | ||
* Litter tags for all categories, used by the Search field | ||
*/ | ||
|
@@ -323,6 +340,14 @@ export default { | |
return this.$store.state.litter.recentTags; | ||
}, | ||
|
||
/** | ||
* The previous tags the user applied | ||
*/ | ||
previousTags () | ||
{ | ||
return this.$store.state.litter.previousTags; | ||
}, | ||
|
||
/** | ||
* Get / Set the current tag (category -> tag) | ||
*/ | ||
|
@@ -352,6 +377,14 @@ export default { | |
}; | ||
}); | ||
}, | ||
|
||
/** | ||
* Currently authenticated user | ||
*/ | ||
user () | ||
{ | ||
return this.$store.state.user.user; | ||
}, | ||
}, | ||
methods: { | ||
|
||
|
@@ -543,6 +576,7 @@ export default { | |
*/ | ||
async submit () | ||
{ | ||
// this.previousTags = (this.$store.state.litter.tags[this.id] || {}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this or not? If its not needed it can be deleted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we do. When you click the submit button, then it stores the tags you used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it meant to be commented out? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got rid of it. My bad. |
||
this.processing = true; | ||
|
||
let action = ''; | ||
|
@@ -561,7 +595,7 @@ export default { | |
await this.$store.dispatch(action); | ||
|
||
this.processing = false; | ||
} | ||
}, | ||
} | ||
}; | ||
</script> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ | |
"presence": "Presence", | ||
"emails": "Emails", | ||
"show-flag": "Show Flag", | ||
"tagging": "Tagging", | ||
"teams": "Teams" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tagging": "Tagging", | ||
"show-previous-tags": "Show previously used tags" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tagging": "etiquetado", | ||
"show-previous-tags": "Mostrar etiquetas utilizadas anteriormente" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tagging": "Taggen", | ||
"show-previous-tags": "Eerder gebruikte tags weergeven" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tagging": "Tagowanie", | ||
"show-previous-tags": "Pokaż poprzednio używane tags" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also return a response and handle it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch