Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Navigation.vue')
-rw-r--r--src/components/Navigation.vue16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue
index facbdf10..df1c3f0f 100644
--- a/src/components/Navigation.vue
+++ b/src/components/Navigation.vue
@@ -89,11 +89,25 @@ export default {
}
return t('photos', 'Back to {folder}', { folder: this.parentName })
},
+
+ /**
+ * 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
+ * does not encode afterwards
+ */
+ to() {
+ const route = Object.assign({}, this.$route, {
+ // always remove first slash
+ params: { path: this.parentPath.substr(1) }
+ });
+ return decodeURIComponent(this.$router.resolve(route).resolved.path)
+ },
},
methods: {
folderUp() {
- this.$router.push(this.parentPath)
+ this.$router.push(this.to)
},
},
}