summaryrefslogtreecommitdiffstats
path: root/src/components/Navigation.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-11-12 07:12:36 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-11-13 08:45:29 +0100
commit2366aaf6ad5d607762f9453884bfb600f13b2c93 (patch)
treee318f5f0cb18a4444479f24e134730961eddd6a1 /src/components/Navigation.vue
parentae28cc9b2d79568ae069e3f25ed29791986791d0 (diff)
Tags
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
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)
},
},