UI: fixed route and toolbar suffix button to json editor
This commit is contained in:
parent
536075bb3b
commit
bdb9e32562
@ -88,9 +88,14 @@
|
|||||||
@if (aiConfigForm.get('responseFormat.type').value === responseFormat.JSON_SCHEMA) {
|
@if (aiConfigForm.get('responseFormat.type').value === responseFormat.JSON_SCHEMA) {
|
||||||
<tb-json-object-edit
|
<tb-json-object-edit
|
||||||
jsonRequired
|
jsonRequired
|
||||||
iconHint="{{ 'rule-node-config.ai.response-json-schema-hint' | translate }}"
|
|
||||||
label="{{ 'rule-node-config.ai.response-json-schema' | translate }}"
|
label="{{ 'rule-node-config.ai.response-json-schema' | translate }}"
|
||||||
formControlName="schema">
|
formControlName="schema">
|
||||||
|
<button mat-icon-button class="tb-mat-32"
|
||||||
|
toolbarSuffixButton
|
||||||
|
matTooltip="{{ 'rule-node-config.ai.response-json-schema-hint' | translate }}"
|
||||||
|
matTooltipPosition="above">
|
||||||
|
<mat-icon style="color: #7b7b7b">info</mat-icon>
|
||||||
|
</button>
|
||||||
</tb-json-object-edit>
|
</tb-json-object-edit>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -39,18 +39,11 @@ export const aiModelRoutes: Routes = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: 'ai-models',
|
|
||||||
redirectTo: '/settings/ai-models'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
AiModelsTableConfigResolver
|
AiModelsTableConfigResolver
|
||||||
],
|
],
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(aiModelRoutes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class AiModelRoutingModule { }
|
export class AiModelRoutingModule { }
|
||||||
|
|||||||
@ -32,13 +32,7 @@
|
|||||||
mat-button *ngIf="!readonly && !disabled" class="tidy" (click)="minifyJSON()">
|
mat-button *ngIf="!readonly && !disabled" class="tidy" (click)="minifyJSON()">
|
||||||
{{'js-func.mini' | translate }}
|
{{'js-func.mini' | translate }}
|
||||||
</button>
|
</button>
|
||||||
@if (iconHint) {
|
<ng-content select="[toolbarSuffixButton]"></ng-content>
|
||||||
<button mat-icon-button class="tb-mat-32"
|
|
||||||
matTooltip="{{ iconHint }}"
|
|
||||||
matTooltipPosition="above">
|
|
||||||
<mat-icon class="material-icons">info</mat-icon>
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
<button mat-icon-button class="tb-mat-32" (click)="fullscreen = !fullscreen"
|
<button mat-icon-button class="tb-mat-32" (click)="fullscreen = !fullscreen"
|
||||||
matTooltip="{{(fullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"
|
matTooltip="{{(fullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"
|
||||||
matTooltipPosition="above">
|
matTooltipPosition="above">
|
||||||
|
|||||||
@ -74,8 +74,6 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va
|
|||||||
|
|
||||||
@Input() label: string;
|
@Input() label: string;
|
||||||
|
|
||||||
@Input() iconHint: string;
|
|
||||||
|
|
||||||
@Input() disabled: boolean;
|
@Input() disabled: boolean;
|
||||||
|
|
||||||
@Input() fillHeight: boolean;
|
@Input() fillHeight: boolean;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user