mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add accessibility information to query history items (#20958)
* Add accessibility information to query history items * bump version
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"name": "query-history",
|
"name": "query-history",
|
||||||
"displayName": "%queryHistory.displayName%",
|
"displayName": "%queryHistory.displayName%",
|
||||||
"description": "%queryHistory.description%",
|
"description": "%queryHistory.description%",
|
||||||
"version": "0.5.1",
|
"version": "0.5.2",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||||
|
|||||||
@@ -6,5 +6,8 @@
|
|||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
|
export const succeeded = localize('succeeded', "Succeeded");
|
||||||
|
export const failed = localize('failed', "Failed");
|
||||||
|
|
||||||
export const errorLoading = (err: any): string => localize('errorLoading', "Error loading saved query history items. {0}", err.message ?? err);
|
export const errorLoading = (err: any): string => localize('errorLoading', "Error loading saved query history items. {0}", err.message ?? err);
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,9 @@ export class QueryHistoryProvider implements vscode.TreeDataProvider<QueryHistor
|
|||||||
treeItem.tooltip = item.queryText;
|
treeItem.tooltip = item.queryText;
|
||||||
treeItem.description = item.connectionProfile ? `${item.connectionProfile.serverName}|${item.connectionProfile.databaseName} ${item.timestamp}` : item.timestamp;
|
treeItem.description = item.connectionProfile ? `${item.connectionProfile.serverName}|${item.connectionProfile.databaseName} ${item.timestamp}` : item.timestamp;
|
||||||
treeItem.command = { title: '', command: ITEM_SELECTED_COMMAND_ID, arguments: [item] };
|
treeItem.command = { title: '', command: ITEM_SELECTED_COMMAND_ID, arguments: [item] };
|
||||||
|
treeItem.accessibilityInformation = {
|
||||||
|
label: `${item.isSuccess ? loc.succeeded : loc.failed} ${treeItem.description} ${item.queryText}`
|
||||||
|
}
|
||||||
return treeItem;
|
return treeItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user