Fix cookie paths

This commit is contained in:
Henrique Dias committed 2017-07-20 19:00:51 +01:00
1 parent 915eb68954
commit 2936858adb
5 files changed
+13 -2392

No files matched your search

+4 -2
View File
@@ -214,8 +214,10 @@ export default {
}
}
document.cookie = `sort=${sort}; max-age=31536000; path=${this.$store.state.baseURL}`
document.cookie = `order=${order}; max-age=31536000; path=${this.$store.state.baseURL}`
let path = this.$store.state.baseURL
if (path === '') path = '/'
document.cookie = `sort=${sort}; max-age=31536000; path=${path}`
document.cookie = `order=${order}; max-age=31536000; path=${path}`
this.$store.commit('setReload', true)
}
}
+3 -1
View File
@@ -20,7 +20,9 @@ export default {
}
this.$store.commit('listingDisplay', display)
document.cookie = `display=${display}; max-age=31536000; path=${this.$store.state.baseURL}`
let path = this.$store.state.baseURL
if (path === '') path = '/'
document.cookie = `display=${display}; max-age=31536000; path=${path}`
},
icon: function () {
if (this.$store.state.req.display === 'mosaic') return 'view_list'