Переглянути джерело

improved controll flow in full-spellcards

Warafear 10 місяців тому
батько
коміт
b02103545a

+ 3 - 6
src/app/shared-components/full-spellcard/full-spellcard.component.html

@@ -244,12 +244,11 @@
     "
   ></div>
   <div class="button-container">
-    @if (spell.isCustom) {
+    @if (spell.isCustom && !isFromDashboard) {
       <button class="green" (click)="update()">Bearbeiten</button>
     }
     <button
       [class]="alreadyInFavorites ? 'red' : 'green'"
-      style="height: 4rem"
       (click)="alreadyInFavorites ? removeFromFavorites() : addToFavorites()"
     >
       @if (alreadyInFavorites) {
@@ -259,12 +258,10 @@
       }
     </button>
     @if (!isFromDashboard) {
+      <button class="red" (click)="remove()">Entfernen</button>
       @if (spell.isCustom) {
-        <button class="red" style="height: 4rem" (click)="delete()">
-          Endgültig löschen
-        </button>
+        <button class="red" (click)="delete()">Endgültig löschen</button>
       }
-      <button class="red" (click)="remove()">Entfernen</button>
     }
   </div>
 </div>

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

@@ -213,7 +213,7 @@
     display: block;
     font-size: 1.25rem;
     font-weight: 600;
-    height: 3rem;
+    height: 4rem;
     width: 10rem;
     border-radius: 10px;
     cursor: pointer;