Browse Source

removed landing page, it needs to be reworked

Warafear 11 months ago
parent
commit
2fcea73e5f

+ 8 - 1
src/app/character/character-creator/character-creator.component.html

@@ -8,7 +8,14 @@
     <mat-form-field appearance="outline">
     <mat-form-field appearance="outline">
       <mat-label>{{ "creator.species" | translate }}</mat-label>
       <mat-label>{{ "creator.species" | translate }}</mat-label>
       <mat-select [(ngModel)]="characterSpecies" name="species">
       <mat-select [(ngModel)]="characterSpecies" name="species">
-        @for (species of translator.races; track species) {
+        <mat-optgroup [label]="'Häufige Spezies'"></mat-optgroup>
+        @for (species of translator.commonRaces; track species) {
+          <mat-option [value]="species">{{
+            "species." + species | translate
+          }}</mat-option>
+        }
+        <mat-optgroup [label]="'Andere Spezies'"></mat-optgroup>
+        @for (species of translator.otherRaces; track species) {
           <mat-option [value]="species">{{
           <mat-option [value]="species">{{
             "species." + species | translate
             "species." + species | translate
           }}</mat-option>
           }}</mat-option>

+ 9 - 0
src/app/character/character-creator/character-creator.component.scss

@@ -54,3 +54,12 @@
     scale: 1.03;
     scale: 1.03;
   }
   }
 }
 }
+
+::ng-deep .mat-mdc-optgroup-label .mdc-list-item__primary-text {
+  font-size: 0.825rem !important;
+  font-weight: 600 !important;
+}
+
+::ng-deep .mat-mdc-option .mdc-list-item__primary-text {
+  padding-left: 1rem !important;
+}

+ 0 - 2
src/app/character/character-creator/character-creator.component.ts

@@ -63,8 +63,6 @@ export class CharacterCreatorComponent {
   ) {}
   ) {}
 
 
   public async createCharacter(): Promise<void> {
   public async createCharacter(): Promise<void> {
-    console.log(this.characterName);
-
     // Creates a new entry in the character collection
     // Creates a new entry in the character collection
     this.dataAccessor.addData('characters', { name: this.characterName });
     this.dataAccessor.addData('characters', { name: this.characterName });
     // Creates a new collection with the character name
     // Creates a new collection with the character name

+ 2 - 1
src/app/character/character-routing.module.ts

@@ -5,9 +5,10 @@ import { CharacterCreatorComponent } from './character-creator/character-creator
 import { LandingPageComponent } from './landing-page/landing-page.component';
 import { LandingPageComponent } from './landing-page/landing-page.component';
 
 
 const routes: Routes = [
 const routes: Routes = [
+  { path: 'characterPicker', component: CharacterPickerComponent },
   { path: 'landingPage', component: LandingPageComponent },
   { path: 'landingPage', component: LandingPageComponent },
   { path: 'creator', component: CharacterCreatorComponent },
   { path: 'creator', component: CharacterCreatorComponent },
-  { path: '**', redirectTo: 'landingPage', pathMatch: 'full' },
+  { path: '**', redirectTo: 'characterPicker', pathMatch: 'full' },
 ];
 ];
 
 
 @NgModule({
 @NgModule({

+ 1 - 1
src/app/character/landing-page/landing-page.component.html

@@ -117,7 +117,7 @@
           >. Verwende einfach als Label <i>Featurewunsch</i>.
           >. Verwende einfach als Label <i>Featurewunsch</i>.
         </div>
         </div>
       } @else if (active === 5) {
       } @else if (active === 5) {
-        <div class="title">News</div>
+        <div class="title">Fehler melden</div>
         <div class="content">
         <div class="content">
           Wenn du inhaltliche, technische oder UI Fehler findest, kannst du
           Wenn du inhaltliche, technische oder UI Fehler findest, kannst du
           gerne ein neues Issue unter diesem
           gerne ein neues Issue unter diesem

+ 1 - 1
src/app/character/landing-page/landing-page.component.scss

@@ -68,7 +68,7 @@
 
 
 .landing-body {
 .landing-body {
   height: calc(100% - 6rem);
   height: calc(100% - 6rem);
-  background-image: url("../../../assets/images/background-dark.jpg");
+  background-image: url("../../../assets/images/background-light.jpg");
   background-size: cover;
   background-size: cover;
 
 
   .horizontal {
   .horizontal {

+ 15 - 14
src/app/journal/journal-stats/ability-panel/spellslots/spellslots.component.html

@@ -59,22 +59,23 @@
           </div>
           </div>
         }
         }
       </div>
       </div>
-
-      <div class="value-row">
-        <value-box [value]="spellSaveDC" [label]="'magic.saveAC'"></value-box>
-        <div>
-          <div class="value-box">
-            {{ "attributes." + spellcastingAttribute | translate }}
-          </div>
-          <div class="value-label t-0375">
-            {{ "magic.spellcastingAttribute" | translate }}
+      @if (spellcastingAttribute) {
+        <div class="value-row">
+          <value-box [value]="spellSaveDC" [label]="'magic.saveAC'"></value-box>
+          <div>
+            <div class="value-box">
+              {{ "attributes." + spellcastingAttribute | translate }}
+            </div>
+            <div class="value-label t-0375">
+              {{ "magic.spellcastingAttribute" | translate }}
+            </div>
           </div>
           </div>
+          <value-box
+            [value]="spellAttackModifier"
+            [label]="'magic.spellAttackBonus'"
+          ></value-box>
         </div>
         </div>
-        <value-box
-          [value]="spellAttackModifier"
-          [label]="'magic.spellAttackBonus'"
-        ></value-box>
-      </div>
+      }
     }
     }
     @if (!kiPoints.showKiPoints && !showSpellslots) {
     @if (!kiPoints.showKiPoints && !showSpellslots) {
       <div class="empty-list">
       <div class="empty-list">

+ 51 - 0
src/services/translator/translator.service.ts

@@ -55,6 +55,57 @@ export class TranslatorService {
     'yuanTi',
     'yuanTi',
   ];
   ];
 
 
+  public commonRaces: string[] = [
+    'dwarf',
+    'elf',
+    'gnome',
+    'halfElf',
+    'halfOrc',
+    'halfling',
+    'human',
+    'dragonborn',
+    'tiefling',
+  ];
+
+  public otherRaces: string[] = [
+    'aarakocra',
+    'aasimar',
+    'autognome',
+    'bugbear',
+    'centaur',
+    'changeling',
+    'duergar',
+    'drow',
+    'halfElfDetection',
+    'eladrin',
+    'fairy',
+    'firbolg',
+    'genasi',
+    'gith',
+    'goblin',
+    'goliath',
+    'hobgoblin',
+    'kalashtar',
+    'kenku',
+    'kobold',
+    'leonin',
+    'lizardfolk',
+    'locathah',
+    'loxodon',
+    'minotaur',
+    'orc',
+    'owlin',
+    'satyr',
+    'shifter',
+    'tabaxi',
+    'tortle',
+    'triton',
+    'vedalken',
+    'verdan',
+    'warforged',
+    'yuanTi',
+  ];
+
   public classes: string[] = [
   public classes: string[] = [
     'barbarian',
     'barbarian',
     'bard',
     'bard',