diff --git a/src/sql/parts/modelComponents/card.component.html b/src/sql/parts/modelComponents/card.component.html index a68e2af708..c04190297d 100644 --- a/src/sql/parts/modelComponents/card.component.html +++ b/src/sql/parts/modelComponents/card.component.html @@ -2,31 +2,32 @@
- - -
-
-
-
-

{{label}}

+ +
+
+ +
+
+
- - - -
-

{{label}}

-

{{value}}

- - - - - - -
{{action.label}} - {{action.actionTitle}} -
-
-
-
+

{{label}}

+
+
+ +
+

{{label}}

+

{{value}}

+ + + + + + +
{{action.label}} + {{action.actionTitle}} +
+
+
+
\ No newline at end of file diff --git a/src/sql/parts/modelComponents/card.component.ts b/src/sql/parts/modelComponents/card.component.ts index c2c812af6c..3604ce3014 100644 --- a/src/sql/parts/modelComponents/card.component.ts +++ b/src/sql/parts/modelComponents/card.component.ts @@ -29,7 +29,7 @@ export default class CardComponent extends ComponentWithIconBase implements ICom private backgroundColor: string; - constructor( @Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef, + constructor(@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef, @Inject(forwardRef(() => ElementRef)) el: ElementRef, @Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService ) { @@ -130,6 +130,14 @@ export default class CardComponent extends ComponentWithIconBase implements ICom return this.cardType === 'VerticalButton'; } + public get showRadioButton():boolean{ + return this.selectable && (this.selected || this._hasFocus) + } + + public get showAsSelected(): boolean { + return this.selectable && this.selected; + } + public get actions(): ActionDescriptor[] { return this.getPropertyOrDefault((props) => props.actions, []); @@ -156,6 +164,7 @@ export default class CardComponent extends ComponentWithIconBase implements ICom private updateTheme(theme: IColorTheme) { this.backgroundColor = theme.getColor(colors.editorBackground, true).toString(); + this._changeRef.detectChanges(); } private onDidActionClick(action: ActionDescriptor): void { diff --git a/src/sql/parts/modelComponents/card.css b/src/sql/parts/modelComponents/card.css index 790c714949..52d1f1a179 100644 --- a/src/sql/parts/modelComponents/card.css +++ b/src/sql/parts/modelComponents/card.css @@ -1,4 +1,3 @@ - .model-card { position: relative; display: inline-block; @@ -7,23 +6,18 @@ margin: 15px; border-width: 1px; border-style: solid; - text-align: left; vertical-align: top; - box-shadow: rgba(120, 120, 120, 0.75) 0px 0px 6px; } .model-card.selected { - border-color: darkblue -} - -.vs-dark .monaco-workbench .model-card.selected, -.hc-black .monaco-workbench .model-card.selected { - border-color: darkblue + border-color: rgb(0, 120, 215); + box-shadow: rgba(0, 120, 215, 0.75) 0px 0px 6px; } .model-card.unselected { border-color: rgb(214, 214, 214); + box-shadow: none; } @@ -102,21 +96,43 @@ text-align: center; } +.model-card .selection-indicator-container { + position: absolute; + top: 5px; + right: 5px; + overflow: hidden; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: white; + border-width: 1px; + border-color: rgb(0, 120, 215); + border-style: solid; +} + +.model-card .selection-indicator { + margin: 4px; + width: 8px; + height: 8px; + border-radius: 50%; + background-color: rgb(0, 120, 215); +} + .model-card .model-table { border-spacing: 5px; } .model-table .table-row { - width: auto; - clear: both; + width: auto; + clear: both; } .model-table .table-cell { - vertical-align: top; - padding: 7px; + vertical-align: top; + padding: 7px; } .model-table a { cursor: pointer; text-decoration: underline -} +} \ No newline at end of file