-
Notifications
+
{{ $t('notification.title') }}
diff --git a/src/helpers/getListTitle.js b/src/helpers/getListTitle.js
new file mode 100644
index 00000000..35c943e3
--- /dev/null
+++ b/src/helpers/getListTitle.js
@@ -0,0 +1,6 @@
+export const getListTitle = (l, $t) => {
+ if (l.id === -1) {
+ return $t('list.pseudo.favorites.title');
+ }
+ return l.title;
+}
diff --git a/src/helpers/getNamespaceTitle.js b/src/helpers/getNamespaceTitle.js
new file mode 100644
index 00000000..21fe7b7e
--- /dev/null
+++ b/src/helpers/getNamespaceTitle.js
@@ -0,0 +1,12 @@
+export const getNamespaceTitle = (n, $t) => {
+ if (n.id === -1) {
+ return $t('namespace.pseudo.sharedLists.title');
+ }
+ if (n.id === -2) {
+ return $t('namespace.pseudo.favorites.title');
+ }
+ if (n.id === -3) {
+ return $t('namespace.pseudo.savedFilters.title');
+ }
+ return n.title;
+}
diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json
index fe007a66..889ed5e9 100644
--- a/src/i18n/lang/en.json
+++ b/src/i18n/lang/en.json
@@ -245,6 +245,11 @@
"bucketTitleSavedSuccess": "The bucket title has been saved successfully.",
"bucketLimitSavedSuccess": "The bucket limit been saved successfully.",
"collapse": "Collapse this bucket"
+ },
+ "pseudo": {
+ "favorites": {
+ "title": "Favorites"
+ }
}
},
"namespace": {
@@ -294,6 +299,17 @@
"color": "Color",
"archived": "Is Archived",
"isArchived": "This namespace is archived"
+ },
+ "pseudo": {
+ "sharedLists": {
+ "title": "Shared Lists"
+ },
+ "favorites": {
+ "title": "Favorites"
+ },
+ "savedFilters": {
+ "title": "Filters"
+ }
}
},
"filters": {
@@ -414,6 +430,7 @@
"chooseDate": "Choose a date"
},
"editor": {
+ "edit": "Edit",
"done": "Done",
"heading1": "Heading 1",
"heading2": "Heading 2",
@@ -716,6 +733,7 @@
"contact": "contact us"
},
"notification": {
+ "title": "Notifications",
"none": "You don't have any notifications. Have a nice day!",
"explainer": "Notifications will appear here when actions on namespaces, lists or tasks you subscribed to happen."
},
diff --git a/src/main.js b/src/main.js
index ce389dcf..7475e957 100644
--- a/src/main.js
+++ b/src/main.js
@@ -85,6 +85,8 @@ import vueShortkey from 'vue-shortkey'
import message from './message'
import {colorIsDark} from './helpers/color/colorIsDark'
import {setTitle} from './helpers/setTitle'
+import {getNamespaceTitle} from './helpers/getNamespaceTitle'
+import {getListTitle} from './helpers/getListTitle'
// Vuex
import {store} from './store'
// i18n
@@ -199,6 +201,12 @@ Vue.mixin({
formatDateShort(date) {
return formatDate(date, 'PPpp', this.$t('date.locale'))
},
+ getNamespaceTitle(n) {
+ return getNamespaceTitle(n, p => this.$t(p))
+ },
+ getListTitle(l) {
+ return getListTitle(l, p => this.$t(p))
+ },
error(e, actions = []) {
return message.error(e, this, p => this.$t(p), actions)
},
diff --git a/src/store/index.js b/src/store/index.js
index dbe86067..ef235f64 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -20,7 +20,6 @@ import attachments from './modules/attachments'
import labels from './modules/labels'
import ListService from '../services/list'
-import {setTitle} from '@/helpers/setTitle'
Vue.use(Vuex)
@@ -69,8 +68,6 @@ export const store = new Vuex.Store({
return
}
- setTitle(currentList.title)
-
// Not sure if this is the right way to do it but hey, it works
if (
// List changed
@@ -140,4 +137,4 @@ export const store = new Vuex.Store({
state.quickActionsActive = active
},
},
-})
\ No newline at end of file
+})
diff --git a/src/views/list/ShowList.vue b/src/views/list/ShowList.vue
index e2ec94c3..086e0bcd 100644
--- a/src/views/list/ShowList.vue
+++ b/src/views/list/ShowList.vue
@@ -97,7 +97,7 @@ export default {
saveListToHistory(listData)
- this.setTitle(this.currentList.title)
+ this.setTitle(this.currentList.id ? this.getListTitle(this.currentList) : '')
// This invalidates the loaded list at the kanban board which lets it reload its content when
// switched to it. This ensures updates done to tasks in the gantt or list views are consistently
@@ -144,6 +144,7 @@ export default {
.then(r => {
this.$set(this, 'list', r)
this.$store.commit(CURRENT_LIST, r)
+ this.setTitle(this.getListTitle(r))
})
.catch(e => {
this.error(e)
@@ -154,4 +155,4 @@ export default {
},
},
}
-
\ No newline at end of file
+
diff --git a/src/views/namespaces/ListNamespaces.vue b/src/views/namespaces/ListNamespaces.vue
index d8fe0fd5..1f520816 100644
--- a/src/views/namespaces/ListNamespaces.vue
+++ b/src/views/namespaces/ListNamespaces.vue
@@ -39,7 +39,7 @@
- {{ n.title }}
+ {{ getNamespaceTitle(n) }}
{{ $t('namespace.archived') }}
diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue
index 6330e25b..7092b38e 100644
--- a/src/views/tasks/TaskDetailView.vue
+++ b/src/views/tasks/TaskDetailView.vue
@@ -3,9 +3,9 @@
- {{ parent.namespace.title }} >
+ {{ getNamespaceTitle(parent.namespace) }} >
- {{ parent.list.title }}
+ {{ getListTitle(parent.list) }}