From b8a5b1500c7d456c335ed20dc0b5178f1ea2c281 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 1 Jul 2017 09:30:46 +0100 Subject: [PATCH] Fix delete and preview back links when baseURL is domain root Former-commit-id: 3507b4b3c04620666850f91d9805c2aba6b0922a [formerly 947d4eabaf424e08e1c98aa83485ecdc103a21ef] [formerly 9f645f718de412acfb25e74bec57520100b3b18f [formerly 5fd7429d5dc1965ee0b1e1be7ac04aaf9f878c0f]] Former-commit-id: d6ce740e97e1e2fa83f75035ac0d8442e3d11b9e [formerly d0399d9beca23a92d4241ed1001923c9903ecba0] Former-commit-id: 1e106c3c4d098ddeac69952f94d03d20c6327ab8 --- _assets/src/components/DeletePrompt.vue | 2 +- _assets/src/components/Preview.vue | 3 +-- _assets/src/components/Search.vue | 9 ++++++--- _assets/src/utils/page.js | 3 ++- _assets/src/utils/webdav.js | 22 ---------------------- 5 files changed, 10 insertions(+), 29 deletions(-) diff --git a/_assets/src/components/DeletePrompt.vue b/_assets/src/components/DeletePrompt.vue index 820f3a57..97e581ea 100644 --- a/_assets/src/components/DeletePrompt.vue +++ b/_assets/src/components/DeletePrompt.vue @@ -31,7 +31,7 @@ export default { webdav.trash(window.location.pathname) .then(() => { // buttons.setDone('delete') - page.open(page.removeLastDir(window.location.pathname)) + page.open(page.removeLastDir(window.location.pathname) + '/') }) .catch(error => { // buttons.setDone('delete', false) diff --git a/_assets/src/components/Preview.vue b/_assets/src/components/Preview.vue index 3e748dba..653e4167 100644 --- a/_assets/src/components/Preview.vue +++ b/_assets/src/components/Preview.vue @@ -50,8 +50,7 @@ export default { return this.req.data.url + '?raw=true' }, back: function (event) { - let url = page.removeLastDir(window.location.pathname) - if (url === '') url = '/' + let url = page.removeLastDir(window.location.pathname) + '/' page.open(url) }, allowEdit: function (event) { diff --git a/_assets/src/components/Search.vue b/_assets/src/components/Search.vue index 16a19680..656e0d87 100644 --- a/_assets/src/components/Search.vue +++ b/_assets/src/components/Search.vue @@ -13,7 +13,7 @@
{{ text() }}