mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 17:23:25 -05:00
Add graph icons to OE and TD (#18808)
* add graph icons to OE and TD * PR comments * change enum type * change sub type to icon and make basic as default * changed icontype to icon * change default logic location * change icon name to be more generic * use right icons
This commit is contained in:
@@ -18,11 +18,25 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
|
||||
|
||||
const NewTable: string = localize('tableDesigner.newTable', "New Table");
|
||||
|
||||
enum TableIcon {
|
||||
Basic = 'Basic',
|
||||
Temporal = 'Temporal',
|
||||
GraphEdge = 'GraphEdge',
|
||||
GraphNode = 'GraphNode'
|
||||
}
|
||||
export class TableDesignerInput extends EditorInput {
|
||||
public static ID: string = 'workbench.editorinputs.tableDesignerInput';
|
||||
private _designerComponentInput: TableDesignerComponentInput;
|
||||
private _title: string;
|
||||
private _name: string;
|
||||
private _tableIcon: azdata.designers.TableIcon;
|
||||
private _tableIconMap: Map<TableIcon, string> = new Map<TableIcon, string>([
|
||||
[TableIcon.Basic, 'table-basic'],
|
||||
[TableIcon.Temporal, 'table-temporal'],
|
||||
[TableIcon.GraphEdge, 'table-graphedge'],
|
||||
[TableIcon.GraphNode, 'table-graphnode']
|
||||
]);
|
||||
|
||||
|
||||
constructor(
|
||||
private _provider: TableDesignerProvider,
|
||||
@@ -42,6 +56,7 @@ export class TableDesignerInput extends EditorInput {
|
||||
this._onDidChangeDirty.fire();
|
||||
}
|
||||
}));
|
||||
this._tableIcon = tableInfo.tableIcon.toString() === '' ? TableIcon.Basic : tableInfo.tableIcon as TableIcon;
|
||||
this.setEditorLabel();
|
||||
}
|
||||
|
||||
@@ -52,7 +67,7 @@ export class TableDesignerInput extends EditorInput {
|
||||
public get resource(): URI {
|
||||
return URI.from({
|
||||
scheme: Schemas.tableDesigner,
|
||||
path: 'table-designer'
|
||||
path: this._tableIconMap.get(this._tableIcon)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user