Browse Source

feat: AI widget work in the chat: the widget preview check screenshots only the widget in small chunks instead of html2canvas, so the page no longer freezes, and hides icon glyphs it can't draw; widget cards lead the turn summary with the widget's preview image; review cards list newly set fields as plain values and show image fields as thumbnails, old and new; action details show image changes as thumbnails; the status line names the tool that is preparing; the 'Still' prefix starts over whenever the status text changes; edited dashboards and widgets aren't reloaded a second time at the end of a turn

pull/16833/head
Igor Kulikov 3 weeks ago
parent
commit
7b1def72dd
  1. 14
      ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html
  2. 1
      ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts
  3. 15
      ui-ngx/src/app/modules/home/components/ai/ai-approval-card.component.html
  4. 25
      ui-ngx/src/app/modules/home/components/ai/ai-approval-card.component.ts
  5. 21
      ui-ngx/src/app/modules/home/components/ai/ai-chat.component.ts
  6. 14
      ui-ngx/src/app/modules/home/components/ai/ai-record-card.component.ts
  7. 4
      ui-ngx/src/app/modules/home/components/ai/ai-record-loader.service.ts
  8. 4
      ui-ngx/src/app/modules/home/components/ai/ai-run-summary.component.ts
  9. 125
      ui-ngx/src/app/modules/home/components/ai/ai-widget-check.service.ts
  10. 13
      ui-ngx/src/app/modules/home/components/ai/ai-work-line.component.ts
  11. 2
      ui-ngx/src/app/shared/models/ai-chat.models.ts
  12. 35
      ui-ngx/src/theme/ai-theme.scss

14
ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html

@ -82,7 +82,19 @@
@for (fact of block.rows; track $index) {
<dt>{{ label(fact) }}</dt>
<dd [class.mono]="fact.mono">
@if (factLink(fact); as url) {
@if (fact.images; as pair) {
<span class="k-detail-images">
@if (pair.current) {
<img class="k-detail-img was" [src]="pair.current | image: {preview: true} | async" alt="">
<mat-icon class="tb-mat-16" aria-hidden="true">arrow_forward</mat-icon>
}
@if (pair.value) {
<img class="k-detail-img" [src]="pair.value | image: {preview: true} | async" alt="">
} @else {
{{ 'ai-assistant.review.not-set' | translate }}
}
</span>
} @else if (factLink(fact); as url) {
<a [routerLink]="url">{{ factValue(fact) }}</a>
} @else if (fact.secret && !revealed().has(view().hood?.key + $index)) {
<span>{{ masked(factValue(fact)) }}</span>

1
ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts

@ -58,6 +58,7 @@ export interface AiDetailFact {
entity?: AiDetailEntity;
mono?: boolean;
secret?: boolean;
images?: {current?: string; value?: string};
}
export interface AiDetailCommand {

15
ui-ngx/src/app/modules/home/components/ai/ai-approval-card.component.html

@ -30,7 +30,7 @@
<dl class="k-fields">
@for (fact of facts; track $index) {
<dt>@if (fact.labelCode) { <code>{{ fact.label }}</code> } @else { {{ fact.label }} }</dt>
<dd>@if (fact.valueCode) { <code>{{ fact.value }}</code> } @else { {{ fact.value }} }</dd>
<dd>@if (fact.image) { <img class="k-img" [src]="fact.value | image: {preview: true} | async" alt=""> } @else if (fact.valueCode) { <code>{{ fact.value }}</code> } @else { {{ fact.value }} }</dd>
}
</dl>
}
@ -47,8 +47,17 @@
@for (change of changes; track $index) {
<tr>
<th scope="row">@if (change.labelCode) { <code>{{ change.label }}</code> } @else { {{ change.label }} }</th>
<td class="k-diff-was">{{ change.current }}</td>
<td class="k-diff-now"><span>{{ change.value }}</span></td>
@if (change.image || change.currentImage) {
<td class="k-diff-was">
@if (change.currentImage) { <img class="k-img was" [src]="change.current | image: {preview: true} | async" alt=""> } @else { {{ change.current }} }
</td>
<td class="k-diff-now">
@if (change.image) { <img class="k-img" [src]="change.value | image: {preview: true} | async" alt=""> } @else { <span>{{ change.value }}</span> }
</td>
} @else {
<td class="k-diff-was">{{ change.current }}</td>
<td class="k-diff-now"><span>{{ change.value }}</span></td>
}
</tr>
}
</tbody>

25
ui-ngx/src/app/modules/home/components/ai/ai-approval-card.component.ts

@ -37,6 +37,8 @@ export interface AiReviewRow {
valueCode: boolean;
current?: string;
value: string;
image?: boolean;
currentImage?: boolean;
}
const MAX_FIELDS = 5;
@ -52,6 +54,10 @@ const VALUE_TOKENS: Record<string, string[]> = {
const CODE_FIELDS = new Set(['arguments', 'expression', 'output']);
const IMAGE_FIELDS = new Set(['widget-image']);
const IMAGE_VALUE = /^(tb-image;|\/api\/images\/|data:image\/)/;
const STACK_AT = 24;
const OWN_TYPE_LABELS = new Set(['DASHBOARD_WIDGET', 'DASHBOARD_STATE', 'DASHBOARD_ENTITY_ALIAS', 'DASHBOARD_FILTER', 'NOTIFICATION', 'NOTIFICATION_SETTINGS', 'NOTIFICATION_PREFERENCES', 'IMAGE', 'PLATFORM_SETTINGS', 'RELATION', 'VERSION', 'WHITE_LABELING', 'MAIL_TEMPLATE', 'CUSTOM_TRANSLATION', 'CUSTOM_MENU', 'MOBILE_APP', 'MOBILE_BUNDLE', 'MOBILE_QR_CODE', 'TWO_FACTOR_SETTINGS', 'MY_PROFILE', 'MY_TWO_FACTOR', 'MAIL_SERVER', 'REPORT_COMPONENT', 'REPORT_ENTITY_ALIAS', 'REPORT_FILTER', 'SCHEDULED_REPORT']);
@ -221,7 +227,7 @@ export class AiApprovalCardComponent implements OnChanges {
}
get facts(): AiReviewRow[] {
const rows = this.rows('FACT').slice(0, MAX_FIELDS);
const rows = [...this.rows('FACT').slice(0, MAX_FIELDS), ...this.rows('CHANGE', field => field.current === undefined || field.current === null)];
if (this.listing && this.review?.target) {
rows.push({label: this.translate.instant('ai-assistant.record.set-up-on'), labelCode: false, valueCode: false, value: this.review.target});
}
@ -230,8 +236,11 @@ export class AiApprovalCardComponent implements OnChanges {
private reviewFacts(): AiDetailFact[] {
return [
...this.rows('FACT').map(row => ({label: row.label, raw: true, value: row.value, mono: row.valueCode})),
...this.rows('CHANGE').map(row => ({label: row.label, raw: true, value: `${row.current ?? '—'} → ${row.value}`, mono: row.valueCode}))
...this.rows('FACT').map(row => row.image ? {label: row.label, raw: true, images: {value: row.value}}
: {label: row.label, raw: true, value: row.value, mono: row.valueCode}),
...this.rows('CHANGE').map(row => row.image || row.currentImage
? {label: row.label, raw: true, images: {current: row.currentImage ? row.current : undefined, value: row.image ? row.value : undefined}}
: {label: row.label, raw: true, value: `${row.current ?? '—'} → ${row.value}`, mono: row.valueCode})
];
}
@ -240,7 +249,7 @@ export class AiApprovalCardComponent implements OnChanges {
}
get changes(): AiReviewRow[] {
return this.rows('CHANGE');
return this.rows('CHANGE', field => field.current !== undefined && field.current !== null);
}
get unchanged(): AiReviewRow[] {
@ -294,13 +303,15 @@ export class AiApprovalCardComponent implements OnChanges {
});
}
private rows(kind: AiReviewField['kind']): AiReviewRow[] {
return (this.review?.fields ?? []).filter(field => field.kind === kind).map(field => ({
private rows(kind: AiReviewField['kind'], include: (field: AiReviewField) => boolean = () => true): AiReviewRow[] {
return (this.review?.fields ?? []).filter(field => field.kind === kind && include(field)).map(field => ({
label: field.name ?? this.translate.instant('ai-assistant.review.field.' + field.id),
labelCode: !!field.name,
valueCode: CODE_FIELDS.has(field.id) && field.value !== undefined && field.value !== null,
current: kind === 'CHANGE' ? this.value(field, field.current) : undefined,
value: this.value(field, field.value)
value: this.value(field, field.value),
image: IMAGE_FIELDS.has(field.id) && IMAGE_VALUE.test(field.value ?? ''),
currentImage: IMAGE_FIELDS.has(field.id) && IMAGE_VALUE.test(field.current ?? '')
}));
}

21
ui-ngx/src/app/modules/home/components/ai/ai-chat.component.ts

@ -959,9 +959,11 @@ export class AiChatComponent implements OnInit, OnDestroy {
case 'assistantDelta':
this.appendDelta(event.data.text);
break;
case 'thinking':
this.work.update(work => work && event.data?.headline ? {...work, headline: event.data.headline} : work);
case 'thinking': {
const headline = this.thinkingHeadline(event.data);
this.work.update(work => work && headline ? {...work, headline} : work);
break;
}
case 'assistantMessage':
this.messages.update(list => [...this.withoutStreaming(list), {
from: 'AI', content: event.data.message, time: Date.now(),
@ -1098,6 +1100,14 @@ export class AiChatComponent implements OnInit, OnDestroy {
this.router.navigate(['/reporting/templates', created.id]);
}
private thinkingHeadline(data: {headline?: string; tool?: string; arguments?: unknown} | undefined): string | undefined {
if (data?.tool) {
const words = aiActionWords(data.tool, data.arguments);
return this.translate.instant(words.key + '.run', words.params);
}
return data?.headline;
}
private openCreatedWidget(tool: string | undefined, affected: EntityId[] | undefined): void {
const chatId = this.chatId();
const created = affected?.find(entity => entity.entityType === EntityType.WIDGET_TYPE);
@ -1316,9 +1326,10 @@ export class AiChatComponent implements OnInit, OnDestroy {
this.stopping.set(false);
this.work.set(undefined);
this.stopRunningActions();
if (this.affectedEntities.length) {
this.panelService.emitUpdatedData(this.affectedEntities);
this.affectedEntities = [];
const notYetReloaded = this.affectedEntities.filter(entity => !LIVE_EDITED_TYPES.has(entity.entityType as EntityType));
this.affectedEntities = [];
if (notYetReloaded.length) {
this.panelService.emitUpdatedData(notYetReloaded);
}
this.chats.setReplying(this.replyingChatId, false);
this.replyingChatId = undefined;

14
ui-ngx/src/app/modules/home/components/ai/ai-record-card.component.ts

@ -29,6 +29,15 @@ export function aiDashboardThumb(cards: number): string {
+ `<rect x="81" y="33" width="35" height="43" rx="2" fill="#fff" stroke="#e3e6e8"/>${rows}</svg>`;
}
export function aiWidgetThumb(): string {
return `<svg viewBox="0 0 120 80" xmlns="http://www.w3.org/2000/svg"><rect width="120" height="80" fill="#f4f6f7"/>`
+ `<rect x="22" y="8" width="76" height="64" rx="4" fill="#fff" stroke="#e3e6e8"/>`
+ `<rect x="29" y="15" width="30" height="4" rx="1" fill="#9aa3a9"/>`
+ `<path d="M40 55 A20 20 0 1 1 80 55" fill="none" stroke="#e3e6e8" stroke-width="6" stroke-linecap="round"/>`
+ `<path d="M40 55 A20 20 0 0 1 73 40" fill="none" stroke="#305680" stroke-width="6" stroke-linecap="round"/>`
+ `<rect x="52" y="50" width="16" height="5" rx="1" fill="#5f6b73"/></svg>`;
}
@Component({
selector: 'tb-ai-record-card',
template: `
@ -155,7 +164,7 @@ export class AiRecordCardComponent {
picture = computed(() => {
const view = this.view();
return !!(view.image || view.imageUrl || view.entityType === EntityType.DASHBOARD);
return !!(view.image || view.imageUrl || view.entityType === EntityType.DASHBOARD || view.entityType === EntityType.WIDGET_TYPE);
});
primaryAction = computed<AiRecordPrimary>(() => {
@ -168,7 +177,8 @@ export class AiRecordCardComponent {
hasFoot = computed(() => !!this.note() || this.facts().length > 0 || this.actions().length > 0);
thumb = computed(() => this.sanitizer.bypassSecurityTrustHtml(aiDashboardThumb(this.view().widgets ?? 4)));
thumb = computed(() => this.sanitizer.bypassSecurityTrustHtml(this.view().entityType === EntityType.WIDGET_TYPE
? aiWidgetThumb() : aiDashboardThumb(this.view().widgets ?? 4)));
openLabel = computed(() => this.translate.instant('ai-assistant.record.open-type', {type: this.typeWord()}));

4
ui-ngx/src/app/modules/home/components/ai/ai-record-loader.service.ts

@ -185,9 +185,11 @@ export class AiRecordLoaderService {
meta: this.translate.instant(template.type === ReportTemplateType.SUB_REPORT ? 'ai-assistant.record.sub-report' : 'ai-assistant.record.report')
})));
case EntityType.WIDGET_TYPE:
return this.http.get<{name: string; widgetType?: string}>(`/api/widgetTypeInfo/${entity.id}`, defaultHttpOptionsFromConfig(CONFIG))
return this.http.get<{name: string; widgetType?: string; image?: string; description?: string}>(`/api/widgetTypeInfo/${entity.id}`,
defaultHttpOptionsFromConfig(CONFIG))
.pipe(map(info => ({
key, entityType, alarmRule: false, name: info.name, url: `/resources/widgets-library/widget-types/${entity.id}`,
image: info.image || undefined, description: info.description || undefined,
meta: info.widgetType && widgetTypesData.get(info.widgetType as widgetType)
? this.translate.instant(widgetTypesData.get(info.widgetType as widgetType).name) : undefined
})));

4
ui-ngx/src/app/modules/home/components/ai/ai-run-summary.component.ts

@ -10,6 +10,8 @@ import { EntityType, entityTypeTranslations } from '@shared/models/entity-type.m
import { AiRecordView } from '@home/components/ai/ai-record.models';
import { AiRecordLoaderService } from '@home/components/ai/ai-record-loader.service';
const LEAD_TYPES = new Set<EntityType>([EntityType.DASHBOARD, EntityType.WIDGET_TYPE]);
@Component({
selector: 'tb-ai-run-summary',
template: `
@ -57,7 +59,7 @@ export class AiRunSummaryComponent {
rows = signal<AiRecordView[]>([]);
lead = computed(() => this.rows().find(row => row.entityType === EntityType.DASHBOARD && !!row.url) ?? null);
lead = computed(() => this.rows().find(row => LEAD_TYPES.has(row.entityType as EntityType) && !!row.url) ?? null);
rest = computed(() => this.rows().filter(row => row !== this.lead()));

125
ui-ngx/src/app/modules/home/components/ai/ai-widget-check.service.ts

@ -1,9 +1,8 @@
// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc.
// SPDX-License-Identifier: BUSL-1.1
import { Injectable } from '@angular/core';
import { from, Observable, of } from 'rxjs';
import { firstValueFrom, from, Observable, of } from 'rxjs';
import { catchError, filter, map, switchMap, take, timeout } from 'rxjs/operators';
import html2canvas from 'html2canvas';
import { WidgetService } from '@core/http/widget.service';
import { AiResourceService } from '@core/http/ai-resource.service';
import { migrateWidgetTypeToDynamicForms } from '@shared/models/widget.models';
@ -15,6 +14,8 @@ const MAX_REASON_LENGTH = 1900;
const MAX_LINE_LENGTH = 300;
const PREVIEW_WIDTH = 1280;
const PREVIEW_HEIGHT = 800;
const STYLE_CHUNK = 8;
const ICON_FONT = /material (icons|symbols)/i;
interface WidgetCheckReport {
initialised: boolean;
@ -26,6 +27,8 @@ interface WidgetCheckReport {
screenshot?: string;
}
type CapturedReport = WidgetCheckReport & {canvas?: HTMLCanvasElement};
@Injectable({
providedIn: 'root'
})
@ -50,9 +53,9 @@ export class AiWidgetCheckService {
);
}
private run(widget: WidgetInfo): Promise<WidgetCheckReport & {canvas?: HTMLCanvasElement}> {
private run(widget: WidgetInfo): Promise<CapturedReport> {
return new Promise(resolve => {
const report: WidgetCheckReport & {canvas?: HTMLCanvasElement} = {initialised: false, errors: [], console: []};
const report: CapturedReport = {initialised: false, errors: [], console: []};
const config = JSON.parse(widget.defaultConfig || '{}');
config.title = config.title || widget.widgetName;
const frame = document.createElement('iframe');
@ -142,29 +145,98 @@ export class AiWidgetCheckService {
}
}
private capture(frame: HTMLIFrameElement): Promise<HTMLCanvasElement | undefined> {
private async capture(frame: HTMLIFrameElement): Promise<HTMLCanvasElement | undefined> {
const doc = frame.contentDocument;
const win = frame.contentWindow;
const target = (doc?.querySelector('tb-widget-container') || doc?.querySelector('tb-widget')) as HTMLElement;
if (!target) {
return Promise.resolve(undefined);
if (!target || !win) {
return undefined;
}
const rect = target.getBoundingClientRect();
const width = Math.ceil(rect.width);
const height = Math.ceil(rect.height);
if (!width || !height) {
return undefined;
}
const clone = target.cloneNode(true) as HTMLElement;
const sources = [target, ...Array.from(target.querySelectorAll<Element>('*'))];
const copies = [clone, ...Array.from(clone.querySelectorAll<Element>('*'))];
for (let i = 0; i < sources.length; i++) {
if (i % STYLE_CHUNK === STYLE_CHUNK - 1) {
await new Promise(resolve => setTimeout(resolve));
}
this.copyElement(win, sources[i], copies[i]);
}
const markup = new XMLSerializer().serializeToString(clone);
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">` +
`<foreignObject x="0" y="0" width="100%" height="100%">${markup}</foreignObject></svg>`;
const image = new Image();
image.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
await image.decode();
const canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
canvas.getContext('2d').drawImage(image, 0, 0);
return canvas;
}
private copyElement(win: Window, source: Element, copy: Element) {
const style = win.getComputedStyle(source);
let text = '';
for (const property of Array.from(style)) {
if (!property.startsWith('--')) {
text += `${property}:${style.getPropertyValue(property)};`;
}
}
copy.setAttribute('style', text);
const glyph = source.tagName !== 'CANVAS' && ICON_FONT.test(style.fontFamily) && source.childElementCount === 0;
const image = source.tagName === 'CANVAS' ? this.canvasImage(source as HTMLCanvasElement)
: glyph ? this.glyphImage(win, source, style) : undefined;
if (glyph && !image) {
copy.setAttribute('style', text + 'visibility:hidden;');
return;
}
if (image) {
const img = copy.ownerDocument.createElement('img');
img.setAttribute('src', image);
img.setAttribute('style', text);
copy.replaceWith(img);
}
return html2canvas(target, {logging: false, useCORS: true, backgroundColor: null, scale: 1})
.catch(() => undefined);
}
private attachScreenshot(report: WidgetCheckReport & {canvas?: HTMLCanvasElement}): Observable<WidgetCheckReport> {
private canvasImage(canvas: HTMLCanvasElement): string | undefined {
try {
return canvas.toDataURL();
} catch (e) {
return undefined;
}
}
private glyphImage(win: Window, source: Element, style: CSSStyleDeclaration): string | undefined {
const rect = source.getBoundingClientRect();
const glyph = source.textContent?.trim();
if (!glyph || !rect.width || !rect.height) {
return undefined;
}
const canvas = win.document.createElement('canvas');
canvas.width = Math.ceil(rect.width);
canvas.height = Math.ceil(rect.height);
const context = canvas.getContext('2d');
context.font = `${style.fontStyle} ${style.fontWeight} ${style.fontSize} ${style.fontFamily}`;
context.fillStyle = style.color;
context.textAlign = 'center';
context.textBaseline = 'middle';
context.fillText(glyph, canvas.width / 2, canvas.height / 2);
return this.canvasImage(canvas);
}
private attachScreenshot(report: CapturedReport): Observable<WidgetCheckReport> {
const canvas = report.canvas;
delete report.canvas;
if (!canvas) {
return of(report);
}
return from(new Promise<Blob>(resolve => canvas.toBlob(blob => resolve(blob), 'image/png'))).pipe(
switchMap(blob => blob ? this.aiResources.upload(new File([blob], 'widget-check.png', {type: 'image/png'})) : of(null)),
filter(event => !event || event.type === 'done'),
take(1),
map(event => {
if (event?.type === 'done' && event.resource?.id) {
report.screenshot = event.resource.id;
return from(this.upload(canvas, 'widget-check.png')).pipe(
map(screenshot => {
if (screenshot) {
report.screenshot = screenshot;
}
return report;
}),
@ -172,6 +244,19 @@ export class AiWidgetCheckService {
);
}
private upload(canvas: HTMLCanvasElement | undefined, name: string): Promise<string | undefined> {
if (!canvas) {
return Promise.resolve(undefined);
}
return new Promise<Blob>(resolve => canvas.toBlob(blob => resolve(blob), 'image/png')).then(blob => !blob ? undefined :
firstValueFrom(this.aiResources.upload(new File([blob], name, {type: 'image/png'})).pipe(
filter(event => event.type === 'done'),
take(1),
map(event => event.type === 'done' ? event.resource?.id : undefined),
catchError(() => of(undefined))
), {defaultValue: undefined}));
}
private toReason(report: WidgetCheckReport): string {
const trimmed: WidgetCheckReport = {...report, errors: report.errors.slice(0, 6), console: [...new Set(report.console)].slice(0, 5)};
let reason = JSON.stringify(trimmed);

13
ui-ngx/src/app/modules/home/components/ai/ai-work-line.component.ts

@ -1,6 +1,6 @@
// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc.
// SPDX-License-Identifier: BUSL-1.1
import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject, input, NgZone, OnInit, signal } from '@angular/core';
import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject, input, linkedSignal, NgZone, OnInit, signal } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { AiSpinKind, aiWorkClock } from '@home/components/ai/ai-action.models';
@ -41,9 +41,18 @@ export class AiWorkLineComponent implements OnInit {
private elapsed = computed(() => Math.max(0, this.now() - this.since()));
private shown = computed(() => ({words: this.words(), since: this.since()}), {
equal: (a, b) => a.words === b.words && a.since === b.since
});
private wordsSince = linkedSignal<{words: string; since: number}, number>({
source: this.shown,
computation: (shown, previous) => !previous || previous.source.since !== shown.since ? shown.since : Date.now()
});
say = computed(() => {
const words = this.words();
if (this.held() || this.elapsed() < STILL_AFTER_MS || !words) {
if (this.held() || this.now() - this.wordsSince() < STILL_AFTER_MS || !words) {
return words;
}
return this.translate.instant('ai-assistant.work.still', {words: words.charAt(0).toLocaleLowerCase() + words.slice(1)});

2
ui-ngx/src/app/shared/models/ai-chat.models.ts

@ -244,7 +244,7 @@ export interface AssistantDeltaChatEvent extends BaseChatEvent {
export interface ThinkingChatEvent extends BaseChatEvent {
event: 'thinking';
data: {headline: string};
data: {headline?: string; tool?: string; arguments?: unknown};
}
export type ChatEvent = AssistantChatEvent | AssistantDeltaChatEvent | ToolExecutionRequestedEvent | ToolExecutionResultEvent | ErrorEvent | ChatTitleGeneratedEvent

35
ui-ngx/src/theme/ai-theme.scss

@ -1269,6 +1269,41 @@
}
}
.k-detail-images {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--tb-text-muted);
}
.k-detail-img {
display: block;
width: 100px;
height: 80px;
object-fit: contain;
border: 1px solid var(--tb-ink-12, rgba(0, 0, 0, 0.12));
border-radius: 6px;
background: #fff;
&.was {
opacity: .6;
}
}
.k-review .k-img {
display: block;
width: 150px;
height: 120px;
object-fit: contain;
border: 1px solid var(--tb-ink-12, rgba(0, 0, 0, 0.12));
border-radius: 6px;
background: #fff;
&.was {
opacity: .6;
}
}
.k-review code,
.k-diff code {
display: inline-block;

Loading…
Cancel
Save