summaryrefslogtreecommitdiffstats
path: root/src/components/Navigation.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Navigation.vue')
-rw-r--r--src/components/Navigation.vue13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue
index df1c3f0f..a0d4c92c 100644
--- a/src/components/Navigation.vue
+++ b/src/components/Navigation.vue
@@ -56,6 +56,10 @@ export default {
type: String,
required: true,
},
+ rootTitle: {
+ type: String,
+ default: t('photos', 'Photos'),
+ },
id: {
type: Number,
required: true,
@@ -68,7 +72,7 @@ export default {
},
name() {
if (this.isRoot) {
- return t('photos', 'Photos')
+ return this.rootTitle
}
return this.basename
},
@@ -93,14 +97,15 @@ export default {
/**
* We do not want encoded slashes when browsing by folder
* so we generate a new valid route object, get the final url back
- * decode it and use it as a direct string, which vue-router
+ * decode it and use it as a direct string, which vue-router
* does not encode afterwards
+ * @returns {string}
*/
to() {
const route = Object.assign({}, this.$route, {
// always remove first slash
- params: { path: this.parentPath.substr(1) }
- });
+ params: { path: this.parentPath.substr(1) },
+ })
return decodeURIComponent(this.$router.resolve(route).resolved.path)
},
},