2020-02-08 21:07:47 +00:00
|
|
|
<ng-container>
|
2020-10-13 16:57:56 +00:00
|
|
|
<ion-header>
|
2020-02-08 21:07:47 +00:00
|
|
|
<ion-toolbar>
|
|
|
|
<ion-buttons slot="start">
|
2020-10-12 16:59:32 +00:00
|
|
|
<ion-menu-button></ion-menu-button>
|
2020-02-08 21:07:47 +00:00
|
|
|
</ion-buttons>
|
2020-02-09 03:47:05 +00:00
|
|
|
<ion-title #titleBar>
|
2020-11-17 04:48:59 +00:00
|
|
|
<div style="display: flex; flex-direction: row;">
|
|
|
|
<i *ngIf="editorService.currentPageType" [ngClass]="typeIcons[editorService.currentPageType]" style="font-size: 18pt; margin: auto 10px;"></i>
|
|
|
|
<ion-input
|
|
|
|
style="flex: 1;"
|
|
|
|
[(ngModel)]="editorService.mutablePageName"
|
|
|
|
[readonly]="!editorService.canEdit()"
|
|
|
|
placeholder="Click to edit page name..."
|
|
|
|
class="title-input"
|
|
|
|
></ion-input>
|
|
|
|
</div>
|
2020-02-09 03:47:05 +00:00
|
|
|
</ion-title>
|
2020-10-14 16:25:26 +00:00
|
|
|
<ion-buttons slot="end">
|
2020-11-03 03:47:29 +00:00
|
|
|
<button
|
|
|
|
class="save-button"
|
|
|
|
(click)="editorService.triggerSave()"
|
|
|
|
title="Manually save this note"
|
|
|
|
*ngIf="editorService.isEditing && editorService.canEdit()"
|
|
|
|
>
|
2020-10-14 16:25:26 +00:00
|
|
|
<i *ngIf="!(editorService.isSaving || editorService.willSave)" class="fa fa-check-circle"></i>
|
|
|
|
{{ (editorService.isSaving || editorService.willSave) ? 'Saving...' : 'Saved!' }}
|
|
|
|
</button>
|
2020-11-20 18:16:05 +00:00
|
|
|
<button
|
2020-11-23 16:22:36 +00:00
|
|
|
*ngIf="editorService.isEditing && editorService.canEdit() && !isFilloutMode"
|
2020-11-09 17:06:02 +00:00
|
|
|
title="More page options"
|
|
|
|
(click)="onPageMenuClick($event)"
|
2020-11-20 18:16:05 +00:00
|
|
|
class="clear-btn"
|
|
|
|
style="padding: 10px;"
|
2020-11-09 17:06:02 +00:00
|
|
|
>
|
2020-11-03 03:47:29 +00:00
|
|
|
<i class="fa fa-ellipsis-v"></i>
|
2020-11-20 18:16:05 +00:00
|
|
|
</button>
|
2020-10-14 16:25:26 +00:00
|
|
|
</ion-buttons>
|
2020-02-08 21:07:47 +00:00
|
|
|
</ion-toolbar>
|
|
|
|
</ion-header>
|
2020-02-08 09:36:14 +00:00
|
|
|
|
2020-10-13 16:57:56 +00:00
|
|
|
<ion-content>
|
2020-10-25 23:42:27 +00:00
|
|
|
<ng-container *ngIf="editorService.notAvailable">
|
|
|
|
<div class="editor-root ion-padding" style="text-align: center; padding-top: 100px; color: #494949; font-size: 1.2em;">
|
|
|
|
Sorry, this page is not available offline yet.
|
|
|
|
</div>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="!editorService.notAvailable">
|
2020-02-11 18:20:26 +00:00
|
|
|
<div class="editor-root ion-padding">
|
2020-10-14 03:28:38 +00:00
|
|
|
<div
|
|
|
|
class="host-container"
|
2020-10-14 12:37:14 +00:00
|
|
|
style="display: flex; margin-bottom: 20px;"
|
2020-10-14 03:28:38 +00:00
|
|
|
*ngFor="let node of editorService.immutableNodes"
|
|
|
|
>
|
2020-11-23 16:22:36 +00:00
|
|
|
<div class="host-icons" *ngIf="!isFilloutMode">
|
2020-11-17 04:48:59 +00:00
|
|
|
<i class="type-icon fa" [ngClass]="typeIcons[(node.isNorm() ? 'node' : node.type)] + ' ' + (node.isNorm() ? 'node' : (node.isForm() ? 'form-input ' + node.type : node.type))"></i>
|
2020-11-20 18:16:05 +00:00
|
|
|
<button (click)="onOptionsClick($event, node)" *ngIf="editorService.canEdit()" class="clear-btn">
|
2020-10-14 03:47:59 +00:00
|
|
|
<i class="fa fa-ellipsis-v" title="Node options"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2020-10-14 03:28:38 +00:00
|
|
|
<ng-container *ngIf="node.isNorm()">
|
2020-11-03 03:59:58 +00:00
|
|
|
<editor-norm style="flex: 1;" [nodeId]="node.UUID" [editorUUID]="editorService.instanceUUID"></editor-norm>
|
2020-10-14 03:28:38 +00:00
|
|
|
</ng-container>
|
2020-10-16 17:20:16 +00:00
|
|
|
<ng-container *ngIf="node.type === 'markdown'">
|
2020-11-03 03:59:58 +00:00
|
|
|
<editor-markdown style="flex: 1;" [nodeId]="node.UUID" [editorUUID]="editorService.instanceUUID"></editor-markdown>
|
2020-10-16 17:20:16 +00:00
|
|
|
</ng-container>
|
2020-10-14 12:50:50 +00:00
|
|
|
<ng-container *ngIf="node.type === 'database_ref'">
|
2020-11-03 03:59:58 +00:00
|
|
|
<editor-database style="flex: 1;" [nodeId]="node.UUID" [editorUUID]="editorService.instanceUUID"></editor-database>
|
2020-10-14 12:50:50 +00:00
|
|
|
</ng-container>
|
2020-10-14 12:37:14 +00:00
|
|
|
<ng-container *ngIf="node.type === 'code_ref'">
|
2020-11-03 03:59:58 +00:00
|
|
|
<editor-code style="flex: 1;" [nodeId]="node.UUID" [editorUUID]="editorService.instanceUUID"></editor-code>
|
2020-10-14 12:37:14 +00:00
|
|
|
</ng-container>
|
2020-10-14 15:04:38 +00:00
|
|
|
<ng-container *ngIf="node.type === 'file_ref'">
|
2020-11-03 03:59:58 +00:00
|
|
|
<editor-files style="flex: 1;" [nodeId]="node.UUID" [editorUUID]="editorService.instanceUUID"></editor-files>
|
2020-10-14 15:04:38 +00:00
|
|
|
</ng-container>
|
2020-11-17 04:48:59 +00:00
|
|
|
<ng-container *ngIf="node.isForm()">
|
2020-11-23 16:22:36 +00:00
|
|
|
<editor-node-form-input style="flex: 1;" [isFilloutMode]="isFilloutMode" [nodeId]="node.UUID" [editorUUID]="editorService.instanceUUID"></editor-node-form-input>
|
2020-11-17 04:48:59 +00:00
|
|
|
</ng-container>
|
2020-02-08 21:07:47 +00:00
|
|
|
</div>
|
2020-11-23 16:22:36 +00:00
|
|
|
<button *ngIf="editorService.canEdit() && !isFilloutMode" class="host-add-button" (click)="onAddClick($event)">
|
2020-10-14 03:59:15 +00:00
|
|
|
<i class="fa fa-plus"></i> Add Node
|
|
|
|
</button>
|
2020-02-08 09:36:14 +00:00
|
|
|
</div>
|
2020-02-08 21:07:47 +00:00
|
|
|
</ng-container>
|
|
|
|
</ion-content>
|
2020-02-08 22:33:31 +00:00
|
|
|
</ng-container>
|