thingsboard/ui-ngx/src/app/shared/components/protobuf-content.component.html

44 lines
1.9 KiB
HTML
Raw Normal View History

2021-10-28 10:20:50 +03:00
<!--
2024-01-09 10:46:16 +02:00
Copyright © 2016-2024 The Thingsboard Authors
2021-10-28 10:20:50 +03:00
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="flex flex-col" style="background: #fff;" [class.fill-height]="fillHeight"
tb-fullscreen
[fullscreen]="fullscreen" (fullscreenChanged)="onFullscreen()">
<div style="height: 40px;" class="tb-protobuf-content-toolbar flex flex-row justify-start items-center">
2021-10-26 22:06:48 +03:00
<label class="tb-title no-padding">{{ label }}</label>
<span class="flex-1"></span>
<button type="button"
2021-10-26 21:52:35 +03:00
mat-button *ngIf="!readonly && !disabled" class="tidy" (click)="beautifyProtobuf()">
{{'js-func.tidy' | translate }}
</button>
<fieldset style="width: initial">
<div matTooltip="{{(fullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"
matTooltipPosition="above"
style="border-radius: 50%"
(click)="fullscreen = !fullscreen">
2023-02-17 19:24:01 +02:00
<button type='button' mat-icon-button class="tb-mat-32">
<mat-icon class="material-icons">{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>
</button>
</div>
</fieldset>
</div>
<div id="tb-protobuf-panel" tb-toast toastTarget="{{toastTargetId}}"
class="tb-protobuf-content-panel flex flex-col">
<div #protobufEditor id="tb-protobuf-input" [style]="editorStyle" [class.fill-height]="fillHeight"></div>
</div>
</div>