mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-08-15 03:13:39 +00:00
relayout folders
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
@if (route()) {
|
||||
<!-- <div class="flex items-start m-2 w-fit border-2 border-red-500"> -->
|
||||
<div
|
||||
class="flex flex-col bg-gray-800 border-2 {{
|
||||
isInError() ? 'border-red-500' : 'border-gray-600'
|
||||
}} border-solid w-full h-full"
|
||||
>
|
||||
<div class="flex items-center justify-end border-gray-600 border-b-2">
|
||||
<div class="flex-grow text-left ml-2 text-white">Route {{ index() }}</div>
|
||||
<div class="flex items-center justify-center hover:bg-gray-700" (click)="delete.emit()">
|
||||
<mat-icon class="!text-red-500">close</mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<form [formGroup]="formGroup">
|
||||
<div class="m-2">
|
||||
<div class="flex items-center m-1">
|
||||
<label class="mr-2 text-white"> Input: </label>
|
||||
<select
|
||||
class="pl-1 border-2 border-gray-200 text-white border-solid rounded-sm w-full"
|
||||
formControlName="input"
|
||||
>
|
||||
@for (option of moduleIds(); track option) {
|
||||
<option [value]="option">
|
||||
{{ option }}
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
@if (!formGroup.controls['input'].valid) {
|
||||
<!-- TODO(jwetzell): better error displaying -->
|
||||
<div class="ml-2 text-red-500">{{ formGroup.controls['input'].errors | json }}</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<div class="flex items-center">
|
||||
@if (schemaService.processorTypes.length > 0) {
|
||||
<div
|
||||
matTooltip="Add Processor"
|
||||
class="flex items-center justify-center w-10 h-10 bg-transparent hover:bg-gray-700 hover:cursor-pointer text-blue-400"
|
||||
[matMenuTriggerFor]="addProcessorMenu"
|
||||
>
|
||||
<mat-icon>add</mat-icon>
|
||||
</div>
|
||||
<mat-menu #addProcessorMenu="matMenu">
|
||||
@for (processorType of schemaService.processorTypes; track processorType) {
|
||||
<button mat-menu-item (click)="addProcessor(processorType.type)">
|
||||
<span>{{ processorType.name }}</span>
|
||||
</button>
|
||||
}
|
||||
</mat-menu>
|
||||
}
|
||||
<div class="text-md text-white text-center">Processors</div>
|
||||
</div>
|
||||
@if (processors() !== undefined && processors()!.length > 0) {
|
||||
<div class="border-2 border-gray-500 m-2">
|
||||
@for (processor of processors(); track processor; let i = $index) {
|
||||
<div cdkDrag>
|
||||
<app-processor
|
||||
[path]="path() + '/processors/' + i"
|
||||
(processorChange)="processorUpdated(i, $event)"
|
||||
[processor]="processor"
|
||||
(delete)="deleteProcessor(i)"
|
||||
></app-processor>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
<ng-template #addProcessorMenu>
|
||||
@if (schemaService.processorTypes.length > 0) {
|
||||
<div cdkMenu class="context-menu">
|
||||
@for (processorType of schemaService.processorTypes; track processorType) {
|
||||
<button cdkMenuItem class="context-menu-item" (click)="addProcessor(processorType.type)">
|
||||
<span>{{ processorType.name }}</span>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</ng-template>
|
||||
}
|
||||
Reference in New Issue
Block a user