Laravel Vapor - Fix inconsistency of download triggers which suppose to open in a new tab instead of current

This commit is contained in:
Dillon Ngo
2024-10-24 03:24:31 +08:00
parent 18f071af50
commit be7387a16f
10 changed files with 22 additions and 11 deletions
@@ -41,7 +41,8 @@
successHandler(response) {
if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
}
},
@@ -135,7 +135,8 @@
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}
@@ -139,7 +139,8 @@
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}
@@ -281,7 +281,8 @@ export default {
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}
@@ -309,7 +310,8 @@ export default {
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}
@@ -109,7 +109,8 @@ export default {
successHandler(response) {
if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
}
},
@@ -93,7 +93,8 @@ export default {
this.returnData = null;
if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
}
}
@@ -99,7 +99,8 @@ export default {
successHandler(response) {
if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
}
},
@@ -95,7 +95,8 @@
this.returnData = null;
if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
}
}
@@ -133,7 +133,8 @@ export default {
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}
@@ -39,7 +39,8 @@
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
// window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}