فهرست منبع

removed landing page, it needs to be reworked

Warafear 11 ماه پیش
والد
کامیت
2fcea73e5f

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

@@ -8,7 +8,14 @@
     <mat-form-field appearance="outline">
       <mat-label>{{ "creator.species" | translate }}</mat-label>
       <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">{{
             "species." + species | translate
           }}</mat-option>

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

@@ -54,3 +54,12 @@
     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> {
-    console.log(this.characterName);
-
     // Creates a new entry in the character collection
     this.dataAccessor.addData('characters', { name: this.characterName });
     // 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';
 
 const routes: Routes = [
+  { path: 'characterPicker', component: CharacterPickerComponent },
   { path: 'landingPage', component: LandingPageComponent },
   { path: 'creator', component: CharacterCreatorComponent },
-  { path: '**', redirectTo: 'landingPage', pathMatch: 'full' },
+  { path: '**', redirectTo: 'characterPicker', pathMatch: 'full' },
 ];
 
 @NgModule({

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

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

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

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

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

@@ -59,22 +59,23 @@
           </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>
+          <value-box
+            [value]="spellAttackModifier"
+            [label]="'magic.spellAttackBonus'"
+          ></value-box>
         </div>
-        <value-box
-          [value]="spellAttackModifier"
-          [label]="'magic.spellAttackBonus'"
-        ></value-box>
-      </div>
+      }
     }
     @if (!kiPoints.showKiPoints && !showSpellslots) {
       <div class="empty-list">

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

@@ -55,6 +55,57 @@ export class TranslatorService {
     '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[] = [
     'barbarian',
     'bard',