minor changes to playworks converter, not a fix, just QOL
This commit is contained in:
@@ -546,6 +546,10 @@ ${getToolWebviewStyles()}
|
||||
convertBtn.disabled = !srcEl.value || !outEl.value || !baseNameEl.value.trim() || !hasNet;
|
||||
}
|
||||
|
||||
function defaultOutputDir(dir) {
|
||||
return dir ? dir.replace(/[\\\\/]+$/, '') + '\\\\Output' : '';
|
||||
}
|
||||
|
||||
document.getElementById('pickSrc').addEventListener('click', () => vscode.postMessage({ type: 'pickSource' }));
|
||||
document.getElementById('pickOut').addEventListener('click', () => vscode.postMessage({ type: 'pickOutput' }));
|
||||
document.getElementById('selectAll').addEventListener('click', () => {
|
||||
@@ -596,8 +600,8 @@ ${getToolWebviewStyles()}
|
||||
srcNameEl.textContent = msg.path.split(/[\\\\/]/).filter(Boolean).pop() || msg.path;
|
||||
baseNameEl.value = msg.baseName || '';
|
||||
if (!outEl.value && msg.dir) {
|
||||
outEl.value = msg.dir;
|
||||
outputDir = msg.dir;
|
||||
outEl.value = defaultOutputDir(msg.dir);
|
||||
outputDir = outEl.value;
|
||||
}
|
||||
updateConvertBtn();
|
||||
} else if (msg.type === 'outputPicked') {
|
||||
|
||||
Reference in New Issue
Block a user