Browse Source

Merge branch 'release/0.10.5'

Warafear 9 months ago
parent
commit
61df00f935
40 changed files with 352 additions and 23 deletions
  1. 1 1
      package.json
  2. 10 1
      src/app/journal/journal-home/journal-home.component.ts
  3. 2 0
      src/app/journal/journal-spellcards/journal-spellcards.component.ts
  4. 4 1
      src/app/journal/journal-stats/weapons-container/spell-table/spell-table.component.ts
  5. 24 1
      src/app/shared-components/full-spellcard/full-spellcard.component.html
  6. 62 1
      src/app/shared-components/full-spellcard/full-spellcard.component.scss
  7. 7 8
      src/app/shared-components/full-spellcard/full-spellcard.component.ts
  8. 4 1
      src/app/shared-components/ui-button/ui-button.component.html
  9. 5 0
      src/app/shared-components/ui-button/ui-button.component.scss
  10. 3 0
      src/app/shared-components/ui-button/ui-button.component.ts
  11. BIN
      src/assets/fonts/Bookinsanity/Bookinsanity Bold Italic.otf
  12. BIN
      src/assets/fonts/Bookinsanity/Bookinsanity Bold.otf
  13. BIN
      src/assets/fonts/Bookinsanity/Bookinsanity Italic.otf
  14. BIN
      src/assets/fonts/Bookinsanity/Bookinsanity.otf
  15. BIN
      src/assets/fonts/Dungeon Drop Case/Dungeon Drop Case.otf
  16. BIN
      src/assets/fonts/Mr Eaves/Mr Eaves Small Caps.otf
  17. BIN
      src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Bold-Italic.otf
  18. BIN
      src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Bold.otf
  19. BIN
      src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Italic.otf
  20. BIN
      src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed.otf
  21. BIN
      src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps Bold Italic.otf
  22. BIN
      src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps Bold.otf
  23. BIN
      src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps Italic.otf
  24. BIN
      src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps.otf
  25. BIN
      src/assets/fonts/Scaly Sans/Scaly Sans Bold Italic.otf
  26. BIN
      src/assets/fonts/Scaly Sans/Scaly Sans Bold.otf
  27. BIN
      src/assets/fonts/Scaly Sans/Scaly Sans Italic.otf
  28. BIN
      src/assets/fonts/Scaly Sans/Scaly Sans.otf
  29. BIN
      src/assets/fonts/Solbera Imitation/Solbera Imitation.otf
  30. BIN
      src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection Bold Italic.otf
  31. BIN
      src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection Bold.otf
  32. BIN
      src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection Italic.otf
  33. BIN
      src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection.otf
  34. 5 2
      src/assets/i18n/de.json
  35. 1 1
      src/assets/i18n/en.json
  36. BIN
      src/assets/images/bg.jpg
  37. 212 0
      src/fonts.scss
  38. 3 1
      src/services/data/data.service.ts
  39. 8 2
      src/services/modal/modal.service.ts
  40. 1 3
      src/styles.scss

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "dndtools",
   "name": "dndtools",
-  "version": "0.10.4",
+  "version": "0.10.5",
   "scripts": {
   "scripts": {
     "ng": "ng",
     "ng": "ng",
     "start": "nx serve",
     "start": "nx serve",

+ 10 - 1
src/app/journal/journal-home/journal-home.component.ts

@@ -1,5 +1,6 @@
 import { Component, Renderer2, ElementRef } from '@angular/core';
 import { Component, Renderer2, ElementRef } from '@angular/core';
 import { NavigationPanelService } from 'src/services/navigationPanel/navigation-panel.service';
 import { NavigationPanelService } from 'src/services/navigationPanel/navigation-panel.service';
+import { ModalService } from 'src/services/modal/modal.service';
 
 
 @Component({
 @Component({
   selector: 'app-journal-home',
   selector: 'app-journal-home',
@@ -13,6 +14,7 @@ export class JournalHomeComponent {
     public navigation: NavigationPanelService,
     public navigation: NavigationPanelService,
     private renderer: Renderer2,
     private renderer: Renderer2,
     private el: ElementRef,
     private el: ElementRef,
+    public modalService: ModalService,
   ) {}
   ) {}
 
 
   ngOnInit() {
   ngOnInit() {
@@ -22,7 +24,14 @@ export class JournalHomeComponent {
     });
     });
 
 
     window.addEventListener('mousemove', (event) => {
     window.addEventListener('mousemove', (event) => {
-      if (event.clientX < 10 && !this.isNavigationOpen) {
+      if (event.clientX < 10) {
+        console.log(this.isNavigationOpen);
+      }
+      if (
+        event.clientX < 10 &&
+        !this.isNavigationOpen &&
+        !this.modalService.isModalOpen
+      ) {
         this.navigation.openNavigation();
         this.navigation.openNavigation();
       }
       }
     });
     });

+ 2 - 0
src/app/journal/journal-spellcards/journal-spellcards.component.ts

@@ -96,6 +96,8 @@ export class JournalSpellcardsComponent {
           }, 100);
           }, 100);
         } else if (result.state === 'add') {
         } else if (result.state === 'add') {
           this.dataAccessor.addFavoriteSpell(spell);
           this.dataAccessor.addFavoriteSpell(spell);
+        } else if (result.state === 'removeFromFavorites') {
+          this.dataAccessor.removeFavoriteSpell(spell);
         }
         }
       },
       },
     );
     );

+ 4 - 1
src/app/journal/journal-stats/weapons-container/spell-table/spell-table.component.ts

@@ -33,8 +33,9 @@ export class SpellTableComponent {
   }
   }
 
 
   public showFullSpellcard(spellIndex: number): void {
   public showFullSpellcard(spellIndex: number): void {
+    const spell = this.spells[spellIndex];
     this.modalAccessor.openModal(FullSpellcardComponent, {
     this.modalAccessor.openModal(FullSpellcardComponent, {
-      spell: this.spells[spellIndex],
+      spell: spell,
       isFromDashboard: true,
       isFromDashboard: true,
     });
     });
     const resultSubscription = this.modalAccessor.result$.subscribe(
     const resultSubscription = this.modalAccessor.result$.subscribe(
@@ -43,6 +44,8 @@ export class SpellTableComponent {
         if (result.state === 'remove') {
         if (result.state === 'remove') {
           this.spells.splice(spellIndex, 1);
           this.spells.splice(spellIndex, 1);
           this.updateSpellsInDatabase();
           this.updateSpellsInDatabase();
+        } else if (result.state === 'removeFromFavorites') {
+          this.dataAccessor.removeFavoriteSpell(spell);
         }
         }
       },
       },
     );
     );

+ 24 - 1
src/app/shared-components/full-spellcard/full-spellcard.component.html

@@ -107,7 +107,9 @@
           } @else if (spell.needsAttackRoll) {
           } @else if (spell.needsAttackRoll) {
             <div class="name">{{ "fullSpellcards.attack" | translate }}</div>
             <div class="name">{{ "fullSpellcards.attack" | translate }}</div>
           } @else {
           } @else {
-            <div class="name">{{ "fullSpellcards.modifier" | translate }}</div>
+            <div class="name">
+              {{ "fullSpellcards.modifier" | translate }}
+            </div>
           }
           }
         </div>
         </div>
         <div class="value">
         <div class="value">
@@ -241,4 +243,25 @@
       'var(--' + spell.school.toLowerCase() + '-border-large)'
       'var(--' + spell.school.toLowerCase() + '-border-large)'
     "
     "
   ></div>
   ></div>
+  <div class="button-container">
+    @if (spell.isCustom && !isFromDashboard) {
+      <button class="green" (click)="update()">Bearbeiten</button>
+    }
+    <button
+      [class]="alreadyInFavorites ? 'red' : 'green'"
+      (click)="alreadyInFavorites ? removeFromFavorites() : addToFavorites()"
+    >
+      @if (alreadyInFavorites) {
+        Aus Favoriten entfernen
+      } @else {
+        Zu Favoriten hinzufügen
+      }
+    </button>
+    @if (!isFromDashboard) {
+      <button class="red" (click)="remove()">Entfernen</button>
+      @if (spell.isCustom) {
+        <button class="red" (click)="delete()">Endgültig löschen</button>
+      }
+    }
+  </div>
 </div>
 </div>

+ 62 - 1
src/app/shared-components/full-spellcard/full-spellcard.component.scss

@@ -12,6 +12,12 @@
   z-index: 1;
   z-index: 1;
 }
 }
 
 
+// .spellmodal-container {
+//   display: flex;
+//   justify-content: center;
+//   align-items: center;
+// }
+
 .card-container {
 .card-container {
   width: 38rem;
   width: 38rem;
   height: 50rem;
   height: 50rem;
@@ -118,7 +124,6 @@
     flex-direction: column;
     flex-direction: column;
     justify-content: space-evenly;
     justify-content: space-evenly;
     .stats-row {
     .stats-row {
-      //   margin-top: 0.8rem;
       display: flex;
       display: flex;
       align-items: center;
       align-items: center;
       width: 14.5rem;
       width: 14.5rem;
@@ -193,3 +198,59 @@
   margin: 0 auto;
   margin: 0 auto;
   padding: 1rem;
   padding: 1rem;
 }
 }
+
+.button-container {
+  position: absolute;
+  left: 38rem;
+  top: 2rem;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  gap: 1.5rem;
+  margin-left: 1.5rem;
+
+  button {
+    display: block;
+    font-size: 1.25rem;
+    font-weight: 600;
+    height: 4rem;
+    width: 10rem;
+    border-radius: 10px;
+    cursor: pointer;
+    box-shadow: var(--shadow);
+    transition: background-color 0.25s ease-in-out;
+  }
+
+  .disabled {
+    cursor: not-allowed;
+    filter: grayscale(50%);
+  }
+
+  .green {
+    background-color: var(--accept);
+    &:hover {
+      background-color: var(--accept-hover);
+    }
+  }
+
+  .red {
+    background-color: var(--delete);
+    &:hover {
+      background-color: var(--delete-hover);
+    }
+  }
+
+  .blue {
+    background-color: var(--edit);
+    &:hover {
+      background-color: var(--edit-hover);
+    }
+  }
+
+  .neutral {
+    background-color: var(--neutral);
+    &:hover {
+      background-color: var(--neutral-hover);
+    }
+  }
+}

+ 7 - 8
src/app/shared-components/full-spellcard/full-spellcard.component.ts

@@ -12,10 +12,7 @@ import { TranslateService } from '@ngx-translate/core';
 export class FullSpellcardComponent {
 export class FullSpellcardComponent {
   @Input() public spell!: Spell;
   @Input() public spell!: Spell;
   @Input() public isFromDashboard!: boolean;
   @Input() public isFromDashboard!: boolean;
-  @Input() public alreadyInFavorites!: boolean;
-
-  public saveDC: number = 0;
-  public attackBonus: string = '+3';
+  @Input() public alreadyInFavorites: boolean = true;
 
 
   public constructor(
   public constructor(
     private modalAccessor: ModalService,
     private modalAccessor: ModalService,
@@ -23,10 +20,6 @@ export class FullSpellcardComponent {
     public translate: TranslateService,
     public translate: TranslateService,
   ) {}
   ) {}
 
 
-  // ngOnInit(): void {
-  //   console.log('Der zauber: ', this.spell);
-  // }
-
   public setBackupImage(event: any): void {
   public setBackupImage(event: any): void {
     event.target.src = 'assets/images/spells/backup.jpg';
     event.target.src = 'assets/images/spells/backup.jpg';
   }
   }
@@ -46,4 +39,10 @@ export class FullSpellcardComponent {
   public addToFavorites(): void {
   public addToFavorites(): void {
     this.modalAccessor.handleModalClosing('add', undefined);
     this.modalAccessor.handleModalClosing('add', undefined);
   }
   }
+
+  public removeFromFavorites(): void {
+    console.log('removeFromFavorites');
+
+    this.modalAccessor.handleModalClosing('removeFromFavorites', undefined);
+  }
 }
 }

+ 4 - 1
src/app/shared-components/ui-button/ui-button.component.html

@@ -1,4 +1,7 @@
-<button [class]="width + ' ' + color">
+<button
+  [disabled]="disabled"
+  [class]="disabled ? width + ' ' + color + '' + disabled : width + ' ' + color"
+>
   <!-- <ng-content></ng-content> -->
   <!-- <ng-content></ng-content> -->
   {{ "buttons." + type | translate }}
   {{ "buttons." + type | translate }}
 </button>
 </button>

+ 5 - 0
src/app/shared-components/ui-button/ui-button.component.scss

@@ -12,6 +12,11 @@ button {
   width: 100%;
   width: 100%;
 }
 }
 
 
+.disabled {
+  cursor: not-allowed;
+  filter: grayscale(50%);
+}
+
 .green {
 .green {
   background-color: var(--accept);
   background-color: var(--accept);
   &:hover {
   &:hover {

+ 3 - 0
src/app/shared-components/ui-button/ui-button.component.ts

@@ -6,6 +6,9 @@ import { Component, Input } from '@angular/core';
   styleUrls: ['./ui-button.component.scss'],
   styleUrls: ['./ui-button.component.scss'],
 })
 })
 export class UiButtonComponent {
 export class UiButtonComponent {
+  /** Defines if the ui-button is disabled */
+  @Input() disabled: boolean = false;
+
   /** Available colors: green | red | blue | neutral */
   /** Available colors: green | red | blue | neutral */
   @Input() type: string = 'default';
   @Input() type: string = 'default';
 
 

BIN
src/assets/fonts/Bookinsanity/Bookinsanity Bold Italic.otf


BIN
src/assets/fonts/Bookinsanity/Bookinsanity Bold.otf


BIN
src/assets/fonts/Bookinsanity/Bookinsanity Italic.otf


BIN
src/assets/fonts/Bookinsanity/Bookinsanity.otf


BIN
src/assets/fonts/Dungeon Drop Case/Dungeon Drop Case.otf


BIN
src/assets/fonts/Mr Eaves/Mr Eaves Small Caps.otf


BIN
src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Bold-Italic.otf


BIN
src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Bold.otf


BIN
src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Italic.otf


BIN
src/assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed.otf


BIN
src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps Bold Italic.otf


BIN
src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps Bold.otf


BIN
src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps Italic.otf


BIN
src/assets/fonts/Scaly Sans Caps/Scaly Sans Caps.otf


BIN
src/assets/fonts/Scaly Sans/Scaly Sans Bold Italic.otf


BIN
src/assets/fonts/Scaly Sans/Scaly Sans Bold.otf


BIN
src/assets/fonts/Scaly Sans/Scaly Sans Italic.otf


BIN
src/assets/fonts/Scaly Sans/Scaly Sans.otf


BIN
src/assets/fonts/Solbera Imitation/Solbera Imitation.otf


BIN
src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection Bold Italic.otf


BIN
src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection Bold.otf


BIN
src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection Italic.otf


BIN
src/assets/fonts/Zatanna Misdirection/Zatanna Misdirection.otf


+ 5 - 2
src/assets/i18n/de.json

@@ -70,7 +70,10 @@
     "close": "Schließen",
     "close": "Schließen",
     "discard": "Verwerfen",
     "discard": "Verwerfen",
     "export": "Exportieren",
     "export": "Exportieren",
-    "deleteSelected": "Ausgewählte löschen"
+    "deleteSelected": "Ausgewählte löschen",
+    "addToFavorites": "Zu Favoriten hinzufügen",
+    "alradyInFavorites": "Bereits in Favoriten",
+    "finalDelete": "Endgültig löschen?"
   },
   },
   "time": {
   "time": {
     "action": "Aktion",
     "action": "Aktion",
@@ -788,7 +791,7 @@
     "hint": "Die App befindet sich immer noch in einem Entwicklungsstadium und es können Fehler auftreten",
     "hint": "Die App befindet sich immer noch in einem Entwicklungsstadium und es können Fehler auftreten",
     "issues": "<p>Fehler und Anmerkungen bitte auf dem <a href='https://gogs.koljastrohm-games.com/Warafear/DNDTools/issues'>Git-Server in Issues</a> vermerken.<p>",
     "issues": "<p>Fehler und Anmerkungen bitte auf dem <a href='https://gogs.koljastrohm-games.com/Warafear/DNDTools/issues'>Git-Server in Issues</a> vermerken.<p>",
     "okay": "Verstanden",
     "okay": "Verstanden",
-    "version": "0.10.4",
+    "version": "0.10.5",
     "test": "Test"
     "test": "Test"
   }
   }
 }
 }

+ 1 - 1
src/assets/i18n/en.json

@@ -785,7 +785,7 @@
     "hint": "The app is still in a development stage and errors may occur",
     "hint": "The app is still in a development stage and errors may occur",
     "issues": "<p>Please note errors and comments on the <a href='https://gogs.koljastrohm-games.com/Warafear/DNDTools/issues'>Git server in Issues</a>.<p>",
     "issues": "<p>Please note errors and comments on the <a href='https://gogs.koljastrohm-games.com/Warafear/DNDTools/issues'>Git server in Issues</a>.<p>",
     "okay": "Understood",
     "okay": "Understood",
-    "version": "0.10.4",
+    "version": "0.10.5",
     "test": "Test"
     "test": "Test"
   }
   }
 }
 }

BIN
src/assets/images/bg.jpg


+ 212 - 0
src/fonts.scss

@@ -0,0 +1,212 @@
+@font-face {
+  font-family: "Bookinsanity";
+  src:
+    local("Bookinsanity Remake"),
+    local("Bookinsanity"),
+    url("assets/fonts/Bookinsanity/Bookinsanity.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Bookinsanity/Bookinsanity.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "Bookinsanity";
+  src:
+    local("Bookinsanity Remake"),
+    local("Bookinsanity"),
+    url("assets/fonts/Bookinsanity/Bookinsanity Bold Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Bookinsanity/Bookinsanity%20Bold%20Italic.otf")
+      format("opentype");
+  font-weight: bold;
+  font-style: italic;
+}
+@font-face {
+  font-family: "Bookinsanity";
+  src:
+    local("Bookinsanity Remake"),
+    local("Bookinsanity"),
+    url("assets/fonts/Bookinsanity/Bookinsanity Bold.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Bookinsanity/Bookinsanity%20Bold.otf")
+      format("opentype");
+  font-weight: bold;
+}
+@font-face {
+  font-family: "Bookinsanity";
+  src:
+    local("Bookinsanity Remake"),
+    local("Bookinsanity"),
+    url("assets/fonts/Bookinsanity/Bookinsanity Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Bookinsanity/Bookinsanity%20Italic.otf")
+      format("opentype");
+  font-style: italic;
+}
+@font-face {
+  font-family: "Zatanna Misdirection";
+  src:
+    local("Zatanna Misdirection Remake"),
+    local("Zatanna Misdirection"),
+    url("assets/fonts/Zatanna Misdirection/Zatanna Misdirection.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Zatanna%20Misdirection/Zatanna%20Misdirection.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "Zatanna Misdirection";
+  src:
+    local("Zatanna Misdirection Remake"),
+    local("Zatanna Misdirection"),
+    url("assets/fonts/Zatanna Misdirection/Zatanna Misdirection Bold Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Zatanna%20Misdirection/Zatanna%20Misdirection%20Bold%20Italic.otf")
+      format("opentype");
+  font-weight: bold;
+  font-style: italic;
+}
+@font-face {
+  font-family: "Zatanna Misdirection";
+  src:
+    local("Zatanna Misdirection Remake"),
+    local("Zatanna Misdirection"),
+    url("assets/fonts/Zatanna Misdirection/Zatanna Misdirection Bold.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Zatanna%20Misdirection/Zatanna%20Misdirection%20Bold.otf")
+      format("opentype");
+  font-weight: bold;
+}
+@font-face {
+  font-family: "Zatanna Misdirection";
+  src:
+    local("Zatanna Misdirection Remake"),
+    local("Zatanna Misdirection"),
+    url("assets/fonts/Zatanna Misdirection/Zatanna Misdirection Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Zatanna%20Misdirection/Zatanna%20Misdirection%20Italic.otf")
+      format("opentype");
+  font-style: italic;
+}
+@font-face {
+  font-family: "NodestoCapsCondensed";
+  src:
+    local("NodestoCapsCondensed"),
+    url("assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Nodesto%20Caps%20Condensed/Nodesto%20Caps%20Condensed.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "NodestoCapsCondensed";
+  src:
+    local("NodestoCapsCondensed"),
+    url("assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Bold-Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Nodesto%20Caps%20Condensed/Nodesto%20Caps%20Condensed%20Bold%20Italic.otf")
+      format("opentype");
+  font-weight: bold;
+  font-style: italic;
+}
+@font-face {
+  font-family: "NodestoCapsCondensed";
+  src:
+    local("NodestoCapsCondensed"),
+    url("assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Bold.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Nodesto%20Caps%20Condensed/Nodesto%20Caps%20Condensed%20Bold.otf")
+      format("opentype");
+  font-weight: bold;
+}
+@font-face {
+  font-family: "NodestoCapsCondensed";
+  src:
+    local("NodestoCapsCondensed"),
+    url("assets/fonts/NodestoCapsCondensed/NodestoCapsCondensed-Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Nodesto%20Caps%20Condensed/Nodesto%20Caps%20Condensed%20Italic.otf")
+      format("opentype");
+  font-style: italic;
+}
+@font-face {
+  font-family: "Mr Eaves Small Caps";
+  src:
+    local("Mr Eaves Small Caps"),
+    url("assets/fonts/Mr Eaves/Mr Eaves Small Caps.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Mr%20Eaves/Mr%20Eaves%20Small%20Caps.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "Scaly Sans";
+  src:
+    local("Scaly Sans"),
+    url("assets/fonts/Scaly Sans/Scaly Sans.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans/Scaly%20Sans.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "Scaly Sans";
+  src:
+    local("Scaly Sans"),
+    url("assets/fonts/Scaly Sans/Scaly Sans Bold Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans/Scaly%20Sans%20Bold%20Italic.otf")
+      format("opentype");
+  font-weight: bold;
+  font-style: italic;
+}
+@font-face {
+  font-family: "Scaly Sans";
+  src:
+    local("Scaly Sans"),
+    url("assets/fonts/Scaly Sans/Scaly Sans Bold.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans/Scaly%20Sans%20Bold.otf")
+      format("opentype");
+  font-weight: bold;
+}
+@font-face {
+  font-family: "Scaly Sans";
+  src:
+    local("Scaly Sans"),
+    url("assets/fonts/Scaly Sans/Scaly Sans Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans/Scaly%20Sans%20Italic.otf")
+      format("opentype");
+  font-style: italic;
+}
+@font-face {
+  font-family: "Scaly Sans Caps";
+  src:
+    local("Scaly Sans Caps"),
+    url("assets/fonts/Scaly Sans Caps/Scaly Sans Caps.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans%20Caps/Scaly%20Sans%20Caps.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "Scaly Sans Caps";
+  src:
+    local("Scaly Sans Caps"),
+    url("assets/fonts/Scaly Sans Caps/Scaly Sans Caps Bold Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans%20Caps/Scaly%20Sans%20Caps%20Bold%20Italic.otf")
+      format("opentype");
+  font-weight: bold;
+  font-style: italic;
+}
+@font-face {
+  font-family: "Scaly Sans Caps";
+  src:
+    local("Scaly Sans Caps"),
+    url("assets/fonts/Scaly Sans Caps/Scaly Sans Caps Bold.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans%20Caps/Scaly%20Sans%20Caps%20Bold.otf")
+      format("opentype");
+  font-weight: bold;
+}
+@font-face {
+  font-family: "Scaly Sans Caps";
+  src:
+    local("Scaly Sans Caps"),
+    url("assets/fonts/Scaly Sans Caps/Scaly Sans Caps Italic.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Scaly%20Sans%20Caps/Scaly%20Sans%20Caps%20Italic.otf")
+      format("opentype");
+  font-style: italic;
+}
+@font-face {
+  font-family: "Solbera Imitation";
+  src:
+    local("Solbera Imitation"),
+    url("assets/fonts/Solbera Imitation/Solbera Imitation.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Solbera%20Imitation/Solbera%20Imitation.otf")
+      format("opentype");
+}
+@font-face {
+  font-family: "Dungeon Drop Case";
+  src:
+    local("Dungeon Drop Case"),
+    url("assets/fonts/Dungeon Drop Case/Dungeon Drop Case.otf"),
+    url("https://raw.githubusercontent.com/jonathonf/solbera-dnd-fonts/master/Dungeon%20Drop%20Case/Dungeon%20Drop%20Case.otf")
+      format("opentype");
+}

+ 3 - 1
src/services/data/data.service.ts

@@ -237,7 +237,9 @@ export class DataService {
   }
   }
 
 
   public removeFavoriteSpell(spell: Spell): void {
   public removeFavoriteSpell(spell: Spell): void {
-    const index = this._favoriteSpells.indexOf(spell);
+    const index = this._favoriteSpells.findIndex(
+      (favorite) => favorite.id === spell.id,
+    );
     if (index > -1) {
     if (index > -1) {
       this._favoriteSpells.splice(index, 1);
       this._favoriteSpells.splice(index, 1);
       this.setData('favoriteSpells', { spells: this._favoriteSpells });
       this.setData('favoriteSpells', { spells: this._favoriteSpells });

+ 8 - 2
src/services/modal/modal.service.ts

@@ -14,13 +14,18 @@ export class ModalService {
   private _resultSubject = new Subject<any>();
   private _resultSubject = new Subject<any>();
   result$ = this._resultSubject.asObservable();
   result$ = this._resultSubject.asObservable();
 
 
+  private _isModalOpen = false;
+  public get isModalOpen(): boolean {
+    return this._isModalOpen;
+  }
+
   /**
   /**
    * Opens the modal with the specified component and provides the data as input for the component.
    * Opens the modal with the specified component and provides the data as input for the component.
    * @param component The component to open in the modal.
    * @param component The component to open in the modal.
    * @param data The data for the input of the component.
    * @param data The data for the input of the component.
    */
    */
   public openModal(component: any, data: any) {
   public openModal(component: any, data: any) {
-    console.log('ModalService: openModal');
+    this._isModalOpen = true;
     this._modalSubject.next({ component, data });
     this._modalSubject.next({ component, data });
   }
   }
 
 
@@ -30,8 +35,9 @@ export class ModalService {
    * @param data The oprional data object that eg contains a new or modifed weapon object.
    * @param data The oprional data object that eg contains a new or modifed weapon object.
    */
    */
   public handleModalClosing(result: any, data?: any) {
   public handleModalClosing(result: any, data?: any) {
-    //The host components subscribe to the result$ Observable to get the result of the modal
+    //The host components subscribes to the result$ Observable to get the result of the modal
     this._resultSubject.next({ state: result, data: data });
     this._resultSubject.next({ state: result, data: data });
     this._closeModalSubject.next('close');
     this._closeModalSubject.next('close');
+    this._isModalOpen = false;
   }
   }
 }
 }

+ 1 - 3
src/styles.scss

@@ -6,12 +6,10 @@
 @import url("./helpers.scss");
 @import url("./helpers.scss");
 @import url("./button-styles.scss");
 @import url("./button-styles.scss");
 @import url("./colors.scss");
 @import url("./colors.scss");
-// @import url("./responsive.scss");
-
 @import "responsive";
 @import "responsive";
+@import "fonts";
 
 
 // LISTS
 // LISTS
-
 .item-list {
 .item-list {
   width: 100%;
   width: 100%;
   overflow: auto;
   overflow: auto;