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) {
|
||||
<tb-json-object-edit
|
||||
jsonRequired
|
||||
iconHint="{{ 'rule-node-config.ai.response-json-schema-hint' | translate }}"
|
||||
label="{{ 'rule-node-config.ai.response-json-schema' | translate }}"
|
||||
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>
|
||||
}
|
||||
</div>
|
||||
|
||||
@ -39,18 +39,11 @@ export const aiModelRoutes: Routes = [
|
||||
}
|
||||
];
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'ai-models',
|
||||
redirectTo: '/settings/ai-models'
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
providers: [
|
||||
AiModelsTableConfigResolver
|
||||
],
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
imports: [RouterModule.forChild(aiModelRoutes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AiModelRoutingModule { }
|
||||
|
||||
@ -32,13 +32,7 @@
|
||||
mat-button *ngIf="!readonly && !disabled" class="tidy" (click)="minifyJSON()">
|
||||
{{'js-func.mini' | translate }}
|
||||
</button>
|
||||
@if (iconHint) {
|
||||
<button mat-icon-button class="tb-mat-32"
|
||||
matTooltip="{{ iconHint }}"
|
||||
matTooltipPosition="above">
|
||||
<mat-icon class="material-icons">info</mat-icon>
|
||||
</button>
|
||||
}
|
||||
<ng-content select="[toolbarSuffixButton]"></ng-content>
|
||||
<button mat-icon-button class="tb-mat-32" (click)="fullscreen = !fullscreen"
|
||||
matTooltip="{{(fullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"
|
||||
matTooltipPosition="above">
|
||||
|
||||
@ -74,8 +74,6 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va
|
||||
|
||||
@Input() label: string;
|
||||
|
||||
@Input() iconHint: string;
|
||||
|
||||
@Input() disabled: boolean;
|
||||
|
||||
@Input() fillHeight: boolean;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user