Disable bookmarking when editing a module
This commit is contained in:
parent
297896e380
commit
5eadff662d
|
|
@ -33,7 +33,7 @@
|
|||
import AddContentButton from '@/components/AddContentButton';
|
||||
import BookmarkActions from '@/components/notes/BookmarkActions';
|
||||
|
||||
import {mapGetters} from 'vuex';
|
||||
import {mapState} from 'vuex';
|
||||
import {isHidden} from '@/helpers/content-block';
|
||||
import {meQuery} from '@/graphql/queries';
|
||||
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['editModule']),
|
||||
...mapState(['editModule']),
|
||||
filteredContentBlocks() {
|
||||
if (!(this.chapter && this.chapter.contentBlocks)) {
|
||||
return [];
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
import {meQuery} from '@/graphql/queries';
|
||||
|
||||
import {mapGetters} from 'vuex';
|
||||
import {mapState} from 'vuex';
|
||||
|
||||
import {isHidden} from '@/helpers/content-block';
|
||||
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['editModule']),
|
||||
...mapState(['editModule']),
|
||||
canEditModule() {
|
||||
return !this.contentBlock.indent && this.editModule;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex';
|
||||
import {mapState} from 'vuex';
|
||||
|
||||
import TextBlock from '@/components/content-blocks/TextBlock';
|
||||
import InstrumentWidget from '@/components/content-blocks/InstrumentWidget';
|
||||
|
|
@ -70,7 +70,7 @@ export default {
|
|||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['editModule']),
|
||||
...mapState(['editModule']),
|
||||
bookmarked() {
|
||||
return this.bookmarks && !!this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div class="bookmark-actions">
|
||||
<div
|
||||
class="bookmark-actions"
|
||||
v-if="!editModule">
|
||||
<a
|
||||
:class="{'bookmark-actions__action--bookmarked': bookmarked}"
|
||||
class="bookmark-actions__action bookmark-actions__bookmark"
|
||||
|
|
@ -27,12 +29,17 @@
|
|||
import AddNoteIcon from '@/components/icons/AddNoteIcon';
|
||||
import NoteIcon from '@/components/icons/NoteIcon';
|
||||
|
||||
import {mapState} from 'vuex';
|
||||
|
||||
export default {
|
||||
props: ['bookmarked', 'note'],
|
||||
components: {
|
||||
BookmarkIcon,
|
||||
AddNoteIcon,
|
||||
NoteIcon
|
||||
},
|
||||
computed: {
|
||||
...mapState(['editModule'])
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ export default new Vuex.Store({
|
|||
scrollToAssignmentReady: state => state.scrollToAssignmentReady,
|
||||
scrollingToAssignment: state => state.scrollingToAssignment,
|
||||
currentProjectEntry: state => state.currentProjectEntry,
|
||||
editModule: state => state.editModule,
|
||||
currentObjectiveGroup: state => state.currentObjectiveGroup,
|
||||
currentContent: state => state.currentContent,
|
||||
currentNoteBlock: state => state.currentNoteBlock,
|
||||
|
|
|
|||
Loading…
Reference in New Issue