diff --git a/src/components/tasks/partials/listSearch.vue b/src/components/tasks/partials/listSearch.vue index ed4826fc2..9f518a6c3 100644 --- a/src/components/tasks/partials/listSearch.vue +++ b/src/components/tasks/partials/listSearch.vue @@ -18,6 +18,10 @@ + No list found. Consider changing the search query. @@ -64,6 +68,13 @@ select(list) { this.$emit('selected', list) }, + namespace(namespaceId) { + const namespace = this.$store.getters['namespaces/getNamespaceById'](namespaceId) + if (namespace !== null) { + return namespace.title + } + return 'Shared Lists' + }, }, } diff --git a/src/store/modules/namespaces.js b/src/store/modules/namespaces.js index 7e480f0b1..0c60d62e2 100644 --- a/src/store/modules/namespaces.js +++ b/src/store/modules/namespaces.js @@ -60,6 +60,14 @@ export default { } return null }, + getNamespaceById: state => namespaceId => { + for (const n in state.namespaces) { + if (state.namespaces[n].id === namespaceId) { + return state.namespaces[n] + } + } + return null + }, }, actions: { loadNamespaces(ctx) { @@ -77,7 +85,7 @@ export default { }) }) - ctx.commit('lists/addLists', lists, {root:true}) + ctx.commit('lists/addLists', lists, {root: true}) return Promise.resolve() }) diff --git a/src/styles/components/list.scss b/src/styles/components/list.scss index 2bbcb5094..cb470bcf4 100644 --- a/src/styles/components/list.scss +++ b/src/styles/components/list.scss @@ -142,3 +142,7 @@ } } } + +.list-namespace-title { + color: $grey; +} diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index ef200868a..727a5b582 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -229,7 +229,7 @@
- +