mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 15:30:14 -04:00
doopdedoop | lots of moving things around, some removing of unused stuff
This commit is contained in:
parent
f14ee2321d
commit
2c986fb3df
@ -1,6 +1,6 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { SearchPage } from './search/search-page/search.page';
|
||||
import { SearchPage } from './pages/search/search.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ import { Observable } from 'rxjs';
|
||||
import { Breakpoints, BreakpointObserver } from '@angular/cdk/layout';
|
||||
import { map, shareReplay } from 'rxjs/operators';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import { SubscriberComponent } from './common/components/subscriber.component';
|
||||
import { SubscriberBase } from './common/subscriber-base';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
|
||||
@Component({
|
||||
@ -14,7 +14,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent extends SubscriberComponent implements AfterViewInit {
|
||||
export class AppComponent extends SubscriberBase implements AfterViewInit {
|
||||
savedPages$ = this.appService.select((state) => state.savedPages.value);
|
||||
mainPages$ = this.appService.select((state) => state.mainPages);
|
||||
fontSize$ = this.appService.select((state) => state.displaySettings.value.cardFontSize + 'pt');
|
||||
|
@ -11,25 +11,6 @@ import { FirebaseConfig } from './constants';
|
||||
import { AngularFireAuthModule } from '@angular/fire/auth';
|
||||
import { AngularFireDatabaseModule } from '@angular/fire/database';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
import { SearchPage } from './search/search-page/search.page';
|
||||
import { PageEditModalComponent } from './search/components/page-edit-modal/page-edit-modal.component';
|
||||
import { AddToPageModalComponent } from './search/components/add-to-page-modal/add-to-page-modal.component';
|
||||
import { NoteEditModalComponent } from './search/components/note/edit-modal/note-edit-modal.component';
|
||||
import { VersePickerModalComponent } from './search/components/verse-picker-modal/verse-picker-modal.component';
|
||||
|
||||
import { OkCancelModalComponent } from './common/components/ok-cancel-modal/ok-cancel-modal.component';
|
||||
import { SettingsComponent } from './common/components/settings/settings.component';
|
||||
|
||||
import { PassageCardComponent } from './search/components/passage/passage-card.component';
|
||||
import { WordsCardComponent } from './search/components/words/words-card.component';
|
||||
import { NoteCardComponent } from './search/components/note/note-card.component';
|
||||
import { StrongsComponent } from './search/components/strongs/strongs.component';
|
||||
import { StrongsCardComponent } from './search/components/strongs/card/strongs-card.component';
|
||||
import { StrongsModalComponent } from './search/components/strongs/modal/strongs-modal.component';
|
||||
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
@ -67,6 +48,25 @@ import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
|
||||
import { MatTreeModule } from '@angular/material/tree';
|
||||
import { ClipboardModule } from '@angular/cdk/clipboard';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
import { SearchPage } from './pages/search/search.page';
|
||||
|
||||
import { OkCancelModalComponent } from './components/ok-cancel-modal/ok-cancel-modal.component';
|
||||
import { SettingsComponent } from './components/settings/settings.component';
|
||||
|
||||
import { PassageCardComponent } from './components/passage/passage-card.component';
|
||||
import { StrongsComponent } from './components/strongs/strongs.component';
|
||||
import { StrongsCardComponent } from './components/strongs/card/strongs-card.component';
|
||||
import { StrongsModalComponent } from './components/strongs/modal/strongs-modal.component';
|
||||
import { WordsCardComponent } from './components/words/words-card.component';
|
||||
import { NoteCardComponent } from './components/note/note-card.component';
|
||||
import { PageEditModalComponent } from './components/page-edit-modal/page-edit-modal.component';
|
||||
import { NoteEditModalComponent } from './components/note/edit-modal/note-edit-modal.component';
|
||||
import { VersePickerModalComponent } from './components/verse-picker-modal/verse-picker-modal.component';
|
||||
import { AddToPageModalComponent } from './components/add-to-page-modal/add-to-page-modal.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
|
@ -4,7 +4,7 @@ import { Subscription } from 'rxjs';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class SubscriberComponent implements OnDestroy {
|
||||
export class SubscriberBase implements OnDestroy {
|
||||
protected subscriptions: Subscription[] = [];
|
||||
|
||||
public ngOnDestroy(): void {
|
@ -2,8 +2,8 @@ import { Component, Inject, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatSelectionList } from '@angular/material/list';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { CardItem } from '../../../models/app-state';
|
||||
import { AppService } from '../../../services/app.service';
|
||||
import { AppService } from '../../services/app.service';
|
||||
import { CardItem } from '../../models/card-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-to-page-modal-modal',
|
@ -1,19 +1,16 @@
|
||||
import { EventEmitter, Output, Input, ElementRef, Component } from '@angular/core';
|
||||
import { CardItem, OpenData } from '../../models/app-state';
|
||||
import { Observable } from 'rxjs';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { SubscriberComponent } from './subscriber.component';
|
||||
import { SubscriberBase } from '../common/subscriber-base';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { ListDirection } from '../list-direction';
|
||||
import { AddToPageModalComponent } from '../../search/components/add-to-page-modal/add-to-page-modal.component';
|
||||
import { ListDirection } from '../common/list-direction';
|
||||
import { AddToPageModalComponent } from '../components/add-to-page-modal/add-to-page-modal.component';
|
||||
import { CardItem } from '../models/card-state';
|
||||
|
||||
@Component({
|
||||
template: '',
|
||||
})
|
||||
export class CardComponent extends SubscriberComponent {
|
||||
@Output()
|
||||
onItemClicked = new EventEmitter<OpenData>();
|
||||
|
||||
export class CardComponent extends SubscriberBase {
|
||||
@Output()
|
||||
onClose = new EventEmitter<CardItem>();
|
||||
|
@ -1,11 +1,13 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { CardItem } from '../../../../models/app-state';
|
||||
import { NoteItem } from '../../../../models/note-state';
|
||||
import { AppService } from '../../../../services/app.service';
|
||||
|
||||
import { UUID } from 'angular2-uuid';
|
||||
|
||||
import { NoteItem } from 'src/app/models/note-state';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { CardItem } from 'src/app/models/card-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-note-edit-modal',
|
||||
templateUrl: 'note-edit-modal.component.html',
|
@ -1,10 +1,10 @@
|
||||
import { Component, ViewChild, ElementRef, OnInit } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
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';
|
||||
import { CardComponent } from '../../components/card.component';
|
||||
import { AppService } from '../../services/app.service';
|
||||
import { BibleReference } from '../../common/bible-reference';
|
||||
import { NoteItem } from '../../models/note-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-note-card',
|
@ -1,7 +1,7 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { AppService } from '../../../services/app.service';
|
||||
import { AppService } from '../../services/app.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-edit-modal',
|
@ -1,11 +1,11 @@
|
||||
import { Component, OnInit, ElementRef, ViewChild, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { BibleReference, Overlap } from '../../../common/bible-reference';
|
||||
import { AppService } from '../../../services/app.service';
|
||||
import { CardComponent } from '../../../common/components/card.component';
|
||||
import { Paragraph } from '../../../models/passage-state';
|
||||
import { StrongsModalComponent } from '../strongs/modal/strongs-modal.component';
|
||||
import { NoteItem } from 'src/app/models/note-state';
|
||||
import { CardComponent } from 'src/app/components/card.component';
|
||||
import { BibleReference, Overlap } from 'src/app/common/bible-reference';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { Paragraph } from 'src/app/models/passage-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-passage-card',
|
@ -9,23 +9,24 @@ import { AngularFireAuth } from '@angular/fire/auth';
|
||||
import { auth } from 'firebase/app';
|
||||
|
||||
import { Storable } from 'src/app/common/storable';
|
||||
import { SubscriberComponent } from '../subscriber.component';
|
||||
import { DisplaySettings, SavedPage } from 'src/app/models/app-state';
|
||||
import { SubscriberBase } from '../../common/subscriber-base';
|
||||
import { DisplaySettings } from 'src/app/models/app-state';
|
||||
import { CardFonts } from 'src/app/constants';
|
||||
|
||||
import { NavService } from 'src/app/services/nav.service';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
|
||||
import { NoteEditModalComponent } from '../../../search/components/note/edit-modal/note-edit-modal.component';
|
||||
import { OkCancelModalComponent, OkCancelResult } from '../ok-cancel-modal/ok-cancel-modal.component';
|
||||
import { PageEditModalComponent } from '../../../search/components/page-edit-modal/page-edit-modal.component';
|
||||
import { PageEditModalComponent } from 'src/app/components/page-edit-modal/page-edit-modal.component';
|
||||
import { NoteEditModalComponent } from 'src/app/components/note/edit-modal/note-edit-modal.component';
|
||||
import { SavedPage } from 'src/app/models/page-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
templateUrl: './settings.component.html',
|
||||
styleUrls: ['./settings.component.scss'],
|
||||
})
|
||||
export class SettingsComponent extends SubscriberComponent {
|
||||
export class SettingsComponent extends SubscriberBase {
|
||||
displaySettings: DisplaySettings;
|
||||
fonts: string[];
|
||||
cardFontFamily = '';
|
@ -1,9 +1,9 @@
|
||||
import { Component, ElementRef, ViewChild, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { AppService } from '../../../../services/app.service';
|
||||
import { CardComponent } from '../../../../common/components/card.component';
|
||||
import { BibleReference } from '../../../../common/bible-reference';
|
||||
import { StrongsModalComponent } from '../modal/strongs-modal.component';
|
||||
import { CardComponent } from 'src/app/components/card.component';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { BibleReference } from 'src/app/common/bible-reference';
|
||||
|
||||
@Component({
|
||||
selector: 'app-strongs-card',
|
@ -1,9 +1,9 @@
|
||||
import { Component, Inject, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { AppService } from '../../../../services/app.service';
|
||||
import { CardItem } from '../../../../models/app-state';
|
||||
import { BibleReference } from '../../../../common/bible-reference';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { BibleReference } from 'src/app/common/bible-reference';
|
||||
import { CardItem } from 'src/app/models/card-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-strongs-modal',
|
@ -1,6 +1,6 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { StrongsResult } from '../../../models/strongs-state';
|
||||
import { BibleReference } from 'src/app/common/bible-reference';
|
||||
import { StrongsResult } from '../../models/strongs-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-strongs',
|
@ -1,7 +1,7 @@
|
||||
import { EventEmitter, Component, Output } from '@angular/core';
|
||||
import { BibleReference, Book } from '../../../common/bible-reference';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { Book, BibleReference } from 'src/app/common/bible-reference';
|
||||
|
||||
@Component({
|
||||
selector: 'app-verse-picker',
|
||||
@ -13,10 +13,7 @@ export class VersePickerModalComponent {
|
||||
hasBook = false;
|
||||
book: Book;
|
||||
|
||||
constructor(
|
||||
public appService: AppService,
|
||||
public dialogRef: MatDialogRef<VersePickerModalComponent>
|
||||
) {
|
||||
constructor(public appService: AppService, public dialogRef: MatDialogRef<VersePickerModalComponent>) {
|
||||
this.hasBook = false;
|
||||
this.books = BibleReference.Books;
|
||||
}
|
||||
@ -33,9 +30,7 @@ export class VersePickerModalComponent {
|
||||
|
||||
setChapter(chapter: number) {
|
||||
// close the control, trigger the passage event.
|
||||
this.appService.getPassage(
|
||||
new BibleReference(this.book.name + ' ' + chapter)
|
||||
);
|
||||
this.appService.getPassage(new BibleReference(this.book.name + ' ' + chapter));
|
||||
this.dialogRef.close();
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
import { Component, ElementRef, ViewChild, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { AppService } from '../../../services/app.service';
|
||||
import { CardComponent } from '../../../common/components/card.component';
|
||||
import { WordLookupResult } from '../../../models/words-state';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { BibleReference } from 'src/app/common/bible-reference';
|
||||
import { CardComponent } from 'src/app/components/card.component';
|
||||
import { AppService } from 'src/app/services/app.service';
|
||||
import { WordLookupResult } from 'src/app/models/words-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-words-card',
|
||||
@ -30,14 +30,6 @@ export class WordsCardComponent extends CardComponent {
|
||||
this.copyToClip(text, html);
|
||||
}
|
||||
|
||||
openItem(p: string) {
|
||||
this.onItemClicked.emit({
|
||||
card: this.cardItem,
|
||||
qry: p,
|
||||
from_search_bar: false,
|
||||
});
|
||||
}
|
||||
|
||||
makePassage(p: string) {
|
||||
return BibleReference.makePassageFromReferenceKey(p);
|
||||
}
|
@ -1,9 +1,8 @@
|
||||
import { IStorable } from '../common/storable';
|
||||
import { NoteItem } from './note-state';
|
||||
import { BiblePassageResult } from './passage-state';
|
||||
import { StrongsResult } from './strongs-state';
|
||||
import { WordLookupResult } from './words-state';
|
||||
import { Overlap } from '../common/bible-reference';
|
||||
import { CardItem, CardIcons } from './card-state';
|
||||
import { SavedPage, Page } from './page-state';
|
||||
|
||||
export interface AppState {
|
||||
readonly currentSavedPage: SavedPage;
|
||||
@ -24,8 +23,6 @@ export interface Error {
|
||||
readonly msg: string;
|
||||
}
|
||||
|
||||
export type Data = BiblePassageResult | StrongsResult | WordLookupResult | NoteItem;
|
||||
|
||||
export interface User {
|
||||
readonly uid: string;
|
||||
readonly displayName: string | null;
|
||||
@ -33,13 +30,6 @@ export interface User {
|
||||
readonly providerId: string;
|
||||
}
|
||||
|
||||
export interface CardIcons {
|
||||
readonly words: string;
|
||||
readonly passage: string;
|
||||
readonly strongs: string;
|
||||
readonly note: string;
|
||||
}
|
||||
|
||||
export interface PageSettings {
|
||||
readonly mergeStrategy: Overlap;
|
||||
}
|
||||
@ -62,38 +52,3 @@ export interface DisplaySettings {
|
||||
|
||||
readonly syncCardsAcrossDevices: boolean;
|
||||
}
|
||||
|
||||
export type OpenData = {
|
||||
card: CardItem;
|
||||
qry: string;
|
||||
from_search_bar: boolean;
|
||||
};
|
||||
|
||||
export interface SavedPage {
|
||||
readonly queries: readonly CardItem[];
|
||||
readonly title: string;
|
||||
readonly id: string;
|
||||
}
|
||||
|
||||
export enum CardType {
|
||||
Passage,
|
||||
Note,
|
||||
Word,
|
||||
Strongs,
|
||||
Error,
|
||||
}
|
||||
|
||||
export interface CardItem {
|
||||
readonly qry: string;
|
||||
readonly data: Data;
|
||||
readonly type: CardType;
|
||||
readonly dict: string;
|
||||
}
|
||||
|
||||
export class Page {
|
||||
readonly title: string;
|
||||
// readonly component: any;
|
||||
// readonly params: any;
|
||||
readonly icon?: string;
|
||||
readonly route: string;
|
||||
}
|
||||
|
28
app/db/src/app/models/card-state.ts
Normal file
28
app/db/src/app/models/card-state.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { BiblePassageResult } from './passage-state';
|
||||
import { StrongsResult } from './strongs-state';
|
||||
import { WordLookupResult } from './words-state';
|
||||
import { NoteItem } from './note-state';
|
||||
|
||||
export type Data = BiblePassageResult | StrongsResult | WordLookupResult | NoteItem;
|
||||
|
||||
export enum CardType {
|
||||
Passage,
|
||||
Note,
|
||||
Word,
|
||||
Strongs,
|
||||
Error,
|
||||
}
|
||||
|
||||
export interface CardItem {
|
||||
readonly qry: string;
|
||||
readonly data: Data;
|
||||
readonly type: CardType;
|
||||
readonly dict: string;
|
||||
}
|
||||
|
||||
export interface CardIcons {
|
||||
readonly words: string;
|
||||
readonly passage: string;
|
||||
readonly strongs: string;
|
||||
readonly note: string;
|
||||
}
|
13
app/db/src/app/models/page-state.ts
Normal file
13
app/db/src/app/models/page-state.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { CardItem } from './card-state';
|
||||
|
||||
export interface SavedPage {
|
||||
readonly queries: readonly CardItem[];
|
||||
readonly title: string;
|
||||
readonly id: string;
|
||||
}
|
||||
|
||||
export class Page {
|
||||
readonly title: string;
|
||||
readonly icon?: string;
|
||||
readonly route: string;
|
||||
}
|
@ -41,25 +41,21 @@
|
||||
*ngIf="isPassage(item)"
|
||||
[cardItem]="item"
|
||||
(onClose)="removeCard(item)"
|
||||
(onItemClicked)="getItemsNextToCard($event)"
|
||||
></app-passage-card>
|
||||
<app-strongs-card
|
||||
*ngIf="isStrongs(item)"
|
||||
[cardItem]="item"
|
||||
(onClose)="removeCard(item)"
|
||||
(onItemClicked)="getItemsNextToCard($event)"
|
||||
></app-strongs-card>
|
||||
<app-words-card
|
||||
*ngIf="isWords(item)"
|
||||
[cardItem]="item"
|
||||
(onClose)="removeCard(item)"
|
||||
(onItemClicked)="getItemsNextToCard($event)"
|
||||
></app-words-card>
|
||||
<app-note-card
|
||||
*ngIf="isNote(item)"
|
||||
[cardItem]="item"
|
||||
(onClose)="removeCard(item)"
|
||||
(onItemClicked)="getItemsNextToCard($event)"
|
||||
></app-note-card>
|
||||
</mat-card>
|
||||
</ng-container>
|
@ -5,10 +5,10 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete';
|
||||
import { AppService } from '../../services/app.service';
|
||||
import { NavService } from '../../services/nav.service';
|
||||
import { VersePickerModalComponent } from '../components/verse-picker-modal/verse-picker-modal.component';
|
||||
import { SubscriberComponent } from '../../common/components/subscriber.component';
|
||||
import { SubscriberBase } from '../../common/subscriber-base';
|
||||
import { BibleReference } from '../../common/bible-reference';
|
||||
import { OpenData, CardItem, CardType } from '../../models/app-state';
|
||||
import { VersePickerModalComponent } from '../../components/verse-picker-modal/verse-picker-modal.component';
|
||||
import { CardItem, CardType } from 'src/app/models/card-state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-search-page',
|
||||
@ -16,7 +16,7 @@ import { OpenData, CardItem, CardType } from '../../models/app-state';
|
||||
styleUrls: ['./search.page.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class SearchPage extends SubscriberComponent implements OnInit {
|
||||
export class SearchPage extends SubscriberBase implements OnInit {
|
||||
cards$ = this.appService.select((state) => state.cards);
|
||||
suggestions$ = this.appService.select((state) => state.autocomplete);
|
||||
|
||||
@ -97,8 +97,6 @@ export class SearchPage extends SubscriberComponent implements OnInit {
|
||||
|
||||
//#region Search
|
||||
|
||||
getItemsNextToCard(data: OpenData) {}
|
||||
|
||||
removeCard(card: CardItem) {
|
||||
this.appService.removeCard(card);
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
import { SavedPage, Error, CardItem, DisplaySettings, User } from '../models/app-state';
|
||||
import { Error, DisplaySettings, User } from '../models/app-state';
|
||||
import { IStorable } from '../common/storable';
|
||||
import { NoteItem } from '../models/note-state';
|
||||
import { ListDirection } from '../common/list-direction';
|
||||
import { SavedPage } from '../models/page-state';
|
||||
import { CardItem } from '../models/card-state';
|
||||
|
||||
export class AppActionFactory {
|
||||
static newGetSavedPage(pageId: string) {
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { UUID } from 'angular2-uuid';
|
||||
|
||||
import { AppState, CardType } from '../models/app-state';
|
||||
import { AppState } from '../models/app-state';
|
||||
import { PageTitles, PageIcons } from '../constants';
|
||||
import { Overlap } from '../common/bible-reference';
|
||||
import { CardType } from '../models/card-state';
|
||||
|
||||
export const initialState: AppState = {
|
||||
user: null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { UUID } from 'angular2-uuid';
|
||||
|
||||
import { AppState, SavedPage, DisplaySettings, CardType, CardItem } from '../models/app-state';
|
||||
import { AppState, DisplaySettings } from '../models/app-state';
|
||||
import { IStorable, Storable } from '../common/storable';
|
||||
import { NoteItem } from '../models/note-state';
|
||||
|
||||
@ -8,6 +8,8 @@ import { ListDirection } from '../common/list-direction';
|
||||
|
||||
import { AppAction } from './app-state-actions';
|
||||
import { initialState } from './app-state-initial-state';
|
||||
import { SavedPage } from '../models/page-state';
|
||||
import { CardType, CardItem } from '../models/card-state';
|
||||
|
||||
function maybeMutateStorable<T>(
|
||||
state: AppState,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { SavedPage, CardItem, DisplaySettings, User, CardType } from '../models/app-state';
|
||||
import { DisplaySettings, User } from '../models/app-state';
|
||||
import { Section, BibleReference, Overlap } from '../common/bible-reference';
|
||||
import { createStateService } from '../common/state-service';
|
||||
import { StorageMap } from '@ngx-pwa/local-storage';
|
||||
@ -20,6 +20,8 @@ import { HashTable } from '../common/hashtable';
|
||||
import { ListDirection } from '../common/list-direction';
|
||||
import { reducer } from './app-state-reducer';
|
||||
import { initialState } from './app-state-initial-state';
|
||||
import { CardItem, CardType } from '../models/card-state';
|
||||
import { SavedPage } from '../models/page-state';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
@ -3,15 +3,16 @@ import { StorageMap } from '@ngx-pwa/local-storage';
|
||||
import { AngularFireDatabase, AngularFireObject } from '@angular/fire/database';
|
||||
import { IStorable } from '../common/storable';
|
||||
import { AppService } from './app.service';
|
||||
import { DisplaySettings, SavedPage, User } from '../models/app-state';
|
||||
import { DisplaySettings, User } from '../models/app-state';
|
||||
|
||||
import { SubscriberComponent } from '../common/components/subscriber.component';
|
||||
import { SubscriberBase } from '../common/subscriber-base';
|
||||
import { NoteItem } from '../models/note-state';
|
||||
import { SavedPage } from '../models/page-state';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class StorageService extends SubscriberComponent {
|
||||
export class StorageService extends SubscriberBase {
|
||||
private displaySettingsState$ = this.appService.select((state) => state.displaySettings);
|
||||
private displaySettingsPath = 'displaySettings';
|
||||
private displaySettingsRemoteObject: AngularFireObject<IStorable<DisplaySettings>>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user