Release 1.1.4

This commit is contained in:
Omelette 蛋卷
2024-02-04 21:42:15 -05:00
parent b11fc3f1d7
commit b2f0f7f479
3 changed files with 23 additions and 8 deletions

View File

@@ -65,4 +65,13 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
## [1.1.3] - 2024-02-04
### Fixed
- Fix JSON to Lua table regex.
- Fix JSON to Lua table regex.
## [1.1.4] - 2024-02-04
### Changed
- Config 'showQuickButtons' is now 'quickButtons' to avoid splitting other entries.
- Disable status bar button tooltip to prevent obscuring notifications.
### Fixed
- File display not showing if directory does not exist.

View File

@@ -32,12 +32,12 @@
"dcsLuaRunner.serverPort": {
"type": "number",
"default": 12080,
"description": "Remote DCS Fiddle port."
"description": "Remote DCS Fiddle port for mission env. GUI env will automatically be on the next port (12081 by default)."
},
"dcsLuaRunner.useHttps": {
"type": "boolean",
"default": false,
"description": "If server is behind a HTTPS reverse proxy. You should also change the port to 443."
"description": "Set if server is behind a HTTPS reverse proxy. You should also change server port accordingly (443)."
},
"dcsLuaRunner.webAuthUsername": {
"type": "string",
@@ -71,7 +71,7 @@
"default": "JSON",
"description": "Note: Experimental feature! Original returned data is in JSON. Conversion to Lua table is done after receiving data and may not be 100% accurate. Please report any issues."
},
"dcsLuaRunner.showQuickButtons": {
"dcsLuaRunner.quickButtons": {
"type": "boolean",
"default": false,
"description": "Show buttons to quickly switch settings beside the run button."

View File

@@ -11,7 +11,7 @@ async function runLua(lua: string, outputChannel: vscode.OutputChannel, filename
const runCodeLocally = config.get('runCodeLocally') as boolean;
const runInMissionEnv = config.get('runInMissionEnv') as boolean;
const serverAddress = runCodeLocally ? '127.0.0.1' : config.get('serverAddress') as string;
const serverPort = runCodeLocally ? 12080 : config.get('serverPort') as number + (runInMissionEnv ? 0 : 1);
const serverPort = (runCodeLocally ? 12080 : config.get('serverPort') as number) + (runInMissionEnv ? 0 : 1);
const useHttps = runCodeLocally ? false : config.get('useHttps') as boolean;
const authUsername = config.get('webAuthUsername') as string;
const authPassword = config.get('webAuthPassword') as string;
@@ -27,7 +27,13 @@ async function runLua(lua: string, outputChannel: vscode.OutputChannel, filename
} else if (returnDisplay === 'file') {
const activeEditor = vscode.window.activeTextEditor;
const workspaceFolder = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.fsPath : '';
const filePath = `${workspaceFolder}/.vscode/dcs_lua_output.${returnDisplayFormat}`;
const vscodeFolderPath = `${workspaceFolder}/.vscode`;
const filePath = `${vscodeFolderPath}/dcs_lua_output.${returnDisplayFormat}`;
// Create the .vscode directory if it doesn't exist
if (!fs.existsSync(vscodeFolderPath)) {
fs.mkdirSync(vscodeFolderPath);
}
// Create the file if it doesn't exist
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, '');
@@ -151,7 +157,7 @@ export function activate(context: vscode.ExtensionContext) {
const runTarget = runCodeLocally ? 'local machine' : 'remote server';
const runEnv = runInMissionEnv ? 'mission' : 'GUI';
const serverAddress = runCodeLocally ? '127.0.0.1' : config.get('serverAddress') as string;
const serverPort = runCodeLocally ? 12080 : config.get('serverPort') as number + (runInMissionEnv ? 0 : 1);
const serverPort = (runCodeLocally ? 12080 : config.get('serverPort') as number) + (runInMissionEnv ? 0 : 1);
if (config.get('returnDisplay') === 'Console Output') {
outputChannel.show(true);
outputChannel.appendLine(`[DCS] Settings: Run code in ${runEnv} environment on ${runTarget} (${serverAddress}:${serverPort}).`);
@@ -198,7 +204,7 @@ export function activate(context: vscode.ExtensionContext) {
vscode.commands.executeCommand('setContext', 'luaFileActive', vscode.window.activeTextEditor.document.languageId === 'lua');
}
let statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100);
statusBarItem.tooltip = 'DCS Lua Runner: Click to change settings';
// statusBarItem.tooltip = 'DCS Lua Runner: Click to change settings';
statusBarItem.show();
statusBarItem.command = 'extension.showQuickPick';
context.subscriptions.push(statusBarItem);