Tidy up editor, file tree, get list field working, allow creating new items
This commit is contained in:
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
computed,
|
||||
effect,
|
||||
input,
|
||||
signal,
|
||||
@@ -22,8 +23,12 @@ export class EditorComponent {
|
||||
// TODO: This needs to be reworked so we have a local property and implement some kind of auto-save
|
||||
fileContents = input<string>();
|
||||
selectedMessage = input.required<ProtoMessage>();
|
||||
// TODO: This needs to start with the parsed file contents, and get updated when the code value changes
|
||||
protected values = signal([]);
|
||||
|
||||
protected values = computed(() => {
|
||||
const message = this.selectedMessage();
|
||||
return message.values.map((value) => null);
|
||||
});
|
||||
|
||||
private code = viewChild<ElementRef<HTMLElement>>('code');
|
||||
|
||||
constructor() {
|
||||
|
||||
Reference in New Issue
Block a user