mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
Add close to tags popup (#9376)
This commit is contained in:
parent
a208ba4aba
commit
042afe1df3
2 changed files with 20 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
span.custom-control-description(:title='tag.name') {{tag.name}}
|
span.custom-control-description(:title='tag.name') {{tag.name}}
|
||||||
.tags-footer
|
.tags-footer
|
||||||
span.clear-tags(@click="clearTags()") {{$t("clearTags")}}
|
span.clear-tags(@click="clearTags()") {{$t("clearTags")}}
|
||||||
|
span.close-tags(@click="close()") {{$t("close")}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -68,6 +69,18 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
.close-tags {
|
||||||
|
color: $red-50;
|
||||||
|
margin: 1.1em 0;
|
||||||
|
margin-left: 2em;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.clear-tags {
|
.clear-tags {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 1.1em 0;
|
margin: 1.1em 0;
|
||||||
|
|
@ -102,6 +115,9 @@ export default {
|
||||||
clearTags () {
|
clearTags () {
|
||||||
this.selectedTags = [];
|
this.selectedTags = [];
|
||||||
},
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
.category-label(v-for='tagName in truncatedSelectedTags', :title="tagName") {{ tagName }}
|
.category-label(v-for='tagName in truncatedSelectedTags', :title="tagName") {{ tagName }}
|
||||||
.tags-more(v-if='remainingSelectedTags.length > 0') +{{ $t('more', { count: remainingSelectedTags.length }) }}
|
.tags-more(v-if='remainingSelectedTags.length > 0') +{{ $t('more', { count: remainingSelectedTags.length }) }}
|
||||||
.dropdown-toggle
|
.dropdown-toggle
|
||||||
tags-popup(v-if="showTagsSelect", :tags="user.tags", v-model="task.tags")
|
tags-popup(v-if="showTagsSelect", :tags="user.tags", v-model="task.tags", @close='closeTagsPopup()')
|
||||||
|
|
||||||
.option(v-if="task.type === 'habit'")
|
.option(v-if="task.type === 'habit'")
|
||||||
label(v-once) {{ $t('resetStreak') }}
|
label(v-once) {{ $t('resetStreak') }}
|
||||||
|
|
@ -671,6 +671,9 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({saveTask: 'tasks:save', destroyTask: 'tasks:destroy', createTask: 'tasks:create'}),
|
...mapActions({saveTask: 'tasks:save', destroyTask: 'tasks:destroy', createTask: 'tasks:create'}),
|
||||||
|
closeTagsPopup () {
|
||||||
|
this.showTagsSelect = false;
|
||||||
|
},
|
||||||
sortedChecklist (data) {
|
sortedChecklist (data) {
|
||||||
let sorting = clone(this.task.checklist);
|
let sorting = clone(this.task.checklist);
|
||||||
let movingItem = sorting[data.oldIndex];
|
let movingItem = sorting[data.oldIndex];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue