mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
add tooltip for dashboard learn more button (#22744)
This commit is contained in:
@@ -68,12 +68,14 @@ export class ToolbarAction extends Action {
|
|||||||
constructor(
|
constructor(
|
||||||
id: string,
|
id: string,
|
||||||
label: string,
|
label: string,
|
||||||
|
tooltip: string,
|
||||||
cssClass: string,
|
cssClass: string,
|
||||||
private runFn: (id: string) => void,
|
private runFn: (id: string) => void,
|
||||||
private context: any, // this
|
private context: any, // this
|
||||||
private logService: ILogService
|
private logService: ILogService
|
||||||
) {
|
) {
|
||||||
super(id, label, cssClass);
|
super(id, label, cssClass);
|
||||||
|
this.tooltip = tooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
override async run(): Promise<void> {
|
override async run(): Promise<void> {
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig
|
|||||||
content = this.getToolbarContent(tabId);
|
content = this.getToolbarContent(tabId);
|
||||||
if (tabId === this.homeTabId) {
|
if (tabId === this.homeTabId) {
|
||||||
const configureDashboardCommand = MenuRegistry.getCommand('configureDashboard');
|
const configureDashboardCommand = MenuRegistry.getCommand('configureDashboard');
|
||||||
const configureDashboardAction = new ToolbarAction(configureDashboardCommand.id, configureDashboardCommand.title.toString(), TaskRegistry.getOrCreateTaskIconClassName(configureDashboardCommand), this.runAction, this, this.logService);
|
const configureDashboardAction = new ToolbarAction(configureDashboardCommand.id, configureDashboardCommand.title.toString(), nls.localize('dashboard.configureDashboardTooltip', "Learn more about how to configure the dashboard"), TaskRegistry.getOrCreateTaskIconClassName(configureDashboardCommand), this.runAction, this, this.logService);
|
||||||
content.push({ action: configureDashboardAction });
|
content.push({ action: configureDashboardAction });
|
||||||
}
|
}
|
||||||
this.toolbar.setContent(content);
|
this.toolbar.setContent(content);
|
||||||
@@ -272,7 +272,7 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig
|
|||||||
_tasks.forEach(a => {
|
_tasks.forEach(a => {
|
||||||
const iconClassName = TaskRegistry.getOrCreateTaskIconClassName(a);
|
const iconClassName = TaskRegistry.getOrCreateTaskIconClassName(a);
|
||||||
const title = typeof a.title === 'string' ? a.title : a.title.value;
|
const title = typeof a.title === 'string' ? a.title : a.title.value;
|
||||||
toolbarActions.push(new ToolbarAction(a.id, title, iconClassName, this.runAction, this, this.logService));
|
toolbarActions.push(new ToolbarAction(a.id, title, title, iconClassName, this.runAction, this, this.logService));
|
||||||
});
|
});
|
||||||
|
|
||||||
let content: ITaskbarContent[] = [];
|
let content: ITaskbarContent[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user