Shared pages refactoring part 1

This commit is contained in:
Čarodej
2022-02-08 10:01:38 +01:00
parent 09774b1d48
commit f04c057490
25 changed files with 170 additions and 191 deletions

View File

@@ -267,16 +267,15 @@ const FunctionHelpers = {
Vue.prototype.$downloadFile = function (url, filename) {
// Show alert message when download is disabled
if (!store.getters.user.data.meta.restrictions.canDownload) {
if (store.getters.user && !store.getters.user.data.meta.restrictions.canDownload) {
Vue.prototype.$temporarilyDisabledDownload()
return
}
var anchor = document.createElement('a')
let anchor = document.createElement('a')
anchor.href = url
anchor.download = filename
document.body.appendChild(anchor)