mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
fix bugs and render xrefs
This commit is contained in:
parent
18f17e61c8
commit
abc6e4e8af
@ -52,6 +52,7 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
|
||||
- Test note persistence
|
||||
- Test note search
|
||||
- remove old ionic project
|
||||
- setup CI/CD
|
||||
|
||||
## Optionally for Future
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { CardItem, NoteItem } from '../../../../models/app-state';
|
||||
import { CardItem } from '../../../../models/app-state';
|
||||
import { NoteItem } from '../../../../models/note-state';
|
||||
import { AppService } from '../../../../services/app.service';
|
||||
import { UUID } from 'angular2-uuid';
|
||||
|
||||
|
@ -22,7 +22,12 @@
|
||||
Cross References
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
{{ cardItem.data.xref }}
|
||||
<ng-container *ngIf="prepXref(cardItem.data.xref) as refs">
|
||||
<span *ngFor="let ref of refs">
|
||||
<a (click)="openPassage(ref)">{{ ref.toString() }}</a
|
||||
>,
|
||||
</span>
|
||||
</ng-container>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
|
@ -4,6 +4,7 @@ import { NoteEditModalComponent } from './edit-modal/note-edit-modal.component';
|
||||
import { CardComponent } from '../../../common/components/card.component';
|
||||
import { AppService } from '../../../services/app.service';
|
||||
import { NoteItem } from '../../../models/note-state';
|
||||
import { BibleReference } from 'src/app/common/bible-reference';
|
||||
|
||||
@Component({
|
||||
selector: 'app-note-card',
|
||||
@ -25,6 +26,14 @@ export class NoteCardComponent extends CardComponent {
|
||||
this.copyToClip(text, html);
|
||||
}
|
||||
|
||||
prepXref(xref: string) {
|
||||
return xref.split(';').map((o) => new BibleReference(o));
|
||||
}
|
||||
|
||||
openPassage(ref: BibleReference) {
|
||||
this.appService.getPassage(ref);
|
||||
}
|
||||
|
||||
edit() {
|
||||
this.dialog.open(NoteEditModalComponent, {
|
||||
data: this.cardItem,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { StrongsResult } from 'src/app/models/app-state';
|
||||
import { StrongsResult } from '../../../models/strongs-state';
|
||||
import { BibleReference } from 'src/app/common/bible-reference';
|
||||
|
||||
@Component({
|
||||
|
@ -30,7 +30,7 @@ const initialState: AppState = {
|
||||
type: 'Note',
|
||||
data: {
|
||||
id: UUID.UUID(),
|
||||
xref: '',
|
||||
xref: '1 pe 2:16; jn 3:16',
|
||||
title: 'Title Here',
|
||||
content: '# Content Here\nIn Markdown format.',
|
||||
},
|
||||
|
@ -3,8 +3,10 @@ import { StorageMap } from '@ngx-pwa/local-storage';
|
||||
import { AngularFireDatabase, AngularFireObject } from '@angular/fire/database';
|
||||
import { IStorable } from '../models/storable';
|
||||
import { AppService } from './app.service';
|
||||
import { DisplaySettings, SavedPage, User, NoteItem } from '../models/app-state';
|
||||
import { DisplaySettings, SavedPage, User } from '../models/app-state';
|
||||
|
||||
import { SubscriberComponent } from '../common/components/subscriber.component';
|
||||
import { NoteItem } from '../models/note-state';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
Loading…
x
Reference in New Issue
Block a user