diff --git a/src/components/GrampsjsDnaMatches.js b/src/components/GrampsjsDnaMatches.js index 6a9049bf..8e910b9b 100644 --- a/src/components/GrampsjsDnaMatches.js +++ b/src/components/GrampsjsDnaMatches.js @@ -49,6 +49,7 @@ class GrampsjsDnaMatches extends GrampsjsTranslateMixin(LitElement) { return { data: {type: Array}, person: {type: Object}, + loading: {type: Boolean}, } } @@ -56,9 +57,13 @@ class GrampsjsDnaMatches extends GrampsjsTranslateMixin(LitElement) { super() this.data = [] this.person = {} + this.loading = false } render() { + if (this.loading) { + return this.renderLoading() + } return html` ${this.data @@ -68,6 +73,55 @@ class GrampsjsDnaMatches extends GrampsjsTranslateMixin(LitElement) { ` } + renderLoading() { + const numRows = + this.person?.person_ref_list?.filter(ref => ref.rel === 'DNA')?.length ?? + 1 + return html` +
+ ${[...Array(numRows).keys()].map( + () => html` +
+
+ +   + +
+
+
+
${this._('Relationship')}
+
+   +
+
+
+
${this._('Shared DNA')}
+
+   +
+
+
+
${this._('Shared Segments')}
+
+   +
+
+
+
${this._('Largest Segment')}
+
+   +
+
+
+
+ ` + )} +
+ ` + } + _personCard(match) { return html`
diff --git a/src/views/GrampsjsViewPersonDna.js b/src/views/GrampsjsViewPersonDna.js index 94fb4959..ca3d79bd 100644 --- a/src/views/GrampsjsViewPersonDna.js +++ b/src/views/GrampsjsViewPersonDna.js @@ -47,6 +47,7 @@ export class GrampsjsViewPersonDna extends GrampsjsView { .data="${this._data}" .strings="${this.strings}" .person="${this.person}" + ?loading="${this.loading}" >

${this._('Chromosome Browser')}