This commit is contained in:
Alex Taxiera
2024-09-18 13:07:18 +00:00
committed by GitHub
2 changed files with 27 additions and 9 deletions

16
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"workbench.colorCustomizations": {
"commandCenter.border": "#15202b99",
"sash.hoverBorder": "#65c89b",
"statusBar.background": "#42b883",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#359268",
"statusBarItem.remoteBackground": "#42b883",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#42b883",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#42b88399",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.remoteColor": "#42b883"
}

View File

@@ -4089,13 +4089,15 @@ async function addTextbox(textboxType) {
} }
//ART TAB //ART TAB
function uploadArt(imageSource, otherParams) { function uploadArt(imageSource, otherParams) {
art.src = imageSource; imageURL(imageSource, (src) => {
if (otherParams && otherParams == 'autoFit') { art.src = src
art.onload = function() { if (otherParams && otherParams == 'autoFit') {
autoFitArt(); art.onload = function() {
art.onload = artEdited; autoFitArt();
}; art.onload = artEdited;
} };
}
}, otherParams);
} }
function artEdited() { function artEdited() {
card.artSource = art.src; card.artSource = art.src;
@@ -5081,7 +5083,7 @@ async function loadCard(selectedCardKey) {
document.querySelector('#art-y').value = scaleY(card.artY) - scaleHeight(card.marginY); document.querySelector('#art-y').value = scaleY(card.artY) - scaleHeight(card.marginY);
document.querySelector('#art-zoom').value = card.artZoom * 100; document.querySelector('#art-zoom').value = card.artZoom * 100;
document.querySelector('#art-rotate').value = card.artRotate || 0; document.querySelector('#art-rotate').value = card.artRotate || 0;
uploadArt(card.artSource); uploadArt(card.artSource, 'noproxy');
document.querySelector('#setSymbol-x').value = scaleX(card.setSymbolX) - scaleWidth(card.marginX); document.querySelector('#setSymbol-x').value = scaleX(card.setSymbolX) - scaleWidth(card.marginX);
document.querySelector('#setSymbol-y').value = scaleY(card.setSymbolY) - scaleHeight(card.marginY); document.querySelector('#setSymbol-y').value = scaleY(card.setSymbolY) - scaleHeight(card.marginY);
document.querySelector('#setSymbol-zoom').value = card.setSymbolZoom * 100; document.querySelector('#setSymbol-zoom').value = card.setSymbolZoom * 100;
@@ -5256,7 +5258,7 @@ function imageURL(url, destination, otherParams) {
// If an image URL does not have HTTP in it, assume it's a local file in the repo local_art directory. // If an image URL does not have HTTP in it, assume it's a local file in the repo local_art directory.
if (!url.includes('http')) { if (!url.includes('http')) {
imageurl = '/local_art/' + url; imageurl = '/local_art/' + url;
} else if (params.get('noproxy') != '') { } else if (params.get('noproxy') != '' && (!otherParams || otherParams != 'noproxy')) {
//CORS PROXY LINKS //CORS PROXY LINKS
//Previously: https://cors.bridged.cc/ //Previously: https://cors.bridged.cc/
imageurl = 'https://corsproxy.io/?' + encodeURIComponent(url); imageurl = 'https://corsproxy.io/?' + encodeURIComponent(url);