fix merge error
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-buttons">
|
||||
<ion-button (click)="onAddClick()" class="ion-padding ion-margin">Add Node</ion-button>
|
||||
<ion-button (click)="onSaveClick()" class="ion-padding ion-margin">Save</ion-button>
|
||||
<ion-button (click)="onAddClick($event)" class="ion-padding ion-margin" fill="outline" color="medium">Add Node</ion-button>
|
||||
<ion-button (click)="onSaveClick()" class="ion-padding ion-margin" fill="outline" color="medium">Save</ion-button>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ion-content>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
@@ -3,6 +3,8 @@ import HostRecord from '../../structures/HostRecord';
|
||||
import PageRecord from '../../structures/PageRecord';
|
||||
import {PageService} from '../../service/page.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {PopoverController} from '@ionic/angular';
|
||||
import {NodePickerComponent} from '../../components/editor/node-picker/node-picker.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-editor',
|
||||
@@ -21,6 +23,7 @@ export class EditorPage implements OnInit {
|
||||
protected pages: PageService,
|
||||
protected route: ActivatedRoute,
|
||||
protected router: Router,
|
||||
protected popover: PopoverController,
|
||||
) {
|
||||
this.route.params.subscribe(params => {
|
||||
this.pageId = params.id;
|
||||
@@ -42,7 +45,7 @@ export class EditorPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
onAddClick() {
|
||||
/*onAddClick() {
|
||||
this.hostRecords.push(new HostRecord(''));
|
||||
setTimeout(() => {
|
||||
const host = this.editorHosts.toArray().reverse()[0].hostContainer.nativeElement;
|
||||
@@ -53,6 +56,15 @@ export class EditorPage implements OnInit {
|
||||
s.removeAllRanges();
|
||||
s.addRange(r);
|
||||
}, 0);
|
||||
}*/
|
||||
|
||||
async onAddClick($event) {
|
||||
const popover = await this.popover.create({
|
||||
component: NodePickerComponent,
|
||||
event: $event,
|
||||
});
|
||||
|
||||
await popover.present();
|
||||
}
|
||||
|
||||
onNewHostRequested($event) {
|
||||
|
||||
Reference in New Issue
Block a user