Ver código fonte

removed remeinings of the global tabbar

Warafear 1 ano atrás
pai
commit
f49224eddc

+ 36 - 0
.nx/cache/d/daemon.log

@@ -463148,3 +463148,39 @@ To fix this, set a unique name for each project in a project.json inside the pro
     at async processFilesAndCreateAndSerializeProjectGraph (c:\Softwareprojekte\DnD\node_modules\nx\src\daemon\server\project-graph-incremental-recomputation.js:138:17)
 [NX Daemon Server] - 2024-01-22T16:16:37.545Z - Time taken for 'hash changed files from watcher' 378.6278000175953ms
 [NX Daemon Server] - 2024-01-22T16:16:37.546Z - Done responding to the client null
+[NX Daemon Server] - 2024-01-23T06:51:41.188Z - Started listening on: \\.\pipe\nx\C:\Users\chris\AppData\Local\Temp\83d14e7134fc08a15480\d.sock
+[NX Daemon Server] - 2024-01-23T06:51:41.192Z - [WATCHER]: Subscribed to changes within: c:\Softwareprojekte\DnD (native)
+[NX Daemon Server] - 2024-01-23T06:51:41.194Z - Established a connection. Number of open connections: 1
+[NX Daemon Server] - 2024-01-23T06:51:41.196Z - Closed a connection. Number of open connections: 0
+[NX Daemon Server] - 2024-01-23T06:51:41.197Z - Established a connection. Number of open connections: 1
+[NX Daemon Server] - 2024-01-23T06:51:41.205Z - [REQUEST]: Client Request for Project Graph Received
+[NX Daemon Server] - 2024-01-23T06:51:42.906Z - Error detected when recomputing project file map: The following projects are defined in multiple locations:
+- DnDTools: 
+  - 
+  - .
+
+To fix this, set a unique name for each project in a project.json inside the project's root. If the project does not currently have a project.json, you can create one that contains only a name.
+[NX Daemon Server] - 2024-01-23T06:51:42.906Z - [REQUEST]: Responding to the client with an error. Error when preparing serialized project graph. The following projects are defined in multiple locations:
+- DnDTools: 
+  - 
+  - .
+
+To fix this, set a unique name for each project in a project.json inside the project's root. If the project does not currently have a project.json, you can create one that contains only a name.
+Error: The following projects are defined in multiple locations:
+- DnDTools: 
+  - 
+  - .
+
+To fix this, set a unique name for each project in a project.json inside the project's root. If the project does not currently have a project.json, you can create one that contains only a name.
+    at readProjectConfigurationsFromRootMap (c:\Softwareprojekte\DnD\node_modules\nx\src\project-graph\utils\project-configuration-utils.js:97:15)
+    at buildProjectsConfigurationsFromProjectPathsAndPlugins (c:\Softwareprojekte\DnD\node_modules\nx\src\project-graph\utils\project-configuration-utils.js:70:19)
+    at createProjectConfigurations (c:\Softwareprojekte\DnD\node_modules\nx\src\project-graph\utils\retrieve-workspace-files.js:131:129)
+    at WorkspaceContext.<anonymous> (c:\Softwareprojekte\DnD\node_modules\nx\src\project-graph\utils\retrieve-workspace-files.js:82:39)
+    at getProjectConfigurationsFromContext (c:\Softwareprojekte\DnD\node_modules\nx\src\utils\workspace-context.js:26:29)
+    at _retrieveProjectConfigurations (c:\Softwareprojekte\DnD\node_modules\nx\src\project-graph\utils\retrieve-workspace-files.js:81:72)
+    at retrieveProjectConfigurations (c:\Softwareprojekte\DnD\node_modules\nx\src\project-graph\utils\retrieve-workspace-files.js:58:12)
+    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
+    at async processCollectedUpdatedAndDeletedFiles (c:\Softwareprojekte\DnD\node_modules\nx\src\daemon\server\project-graph-incremental-recomputation.js:102:34)
+    at async processFilesAndCreateAndSerializeProjectGraph (c:\Softwareprojekte\DnD\node_modules\nx\src\daemon\server\project-graph-incremental-recomputation.js:138:17)
+[NX Daemon Server] - 2024-01-23T06:51:42.908Z - Time taken for 'hash changed files from watcher' 507.5174999999581ms
+[NX Daemon Server] - 2024-01-23T06:51:42.908Z - Done responding to the client null

+ 1 - 1
.nx/cache/d/server-process.json

@@ -1 +1 @@
-{"processId":19228}
+{"processId":13264}

+ 3 - 2
src/app/character/character-picker/character-picker.component.html

@@ -8,9 +8,10 @@
     (select)="selectCharacter(characters[card])"
     (delete)="open(content, card)"
   ></character-card>
-  }@else {
+  <!-- TODO: Check if there is a more elegant way -->
+  }@else if (card < 4 || (card === 4 && characters.length === 4) || card === 5
+  && (characters.length === 5 || characters.length === 4)) {
   <div class="card-placeholder" (click)="addCharacter()">
-    <!-- <icon [size]="'l'" [type]="'UI'" [icon]="'add'"></icon> -->
     <img
       src="assets/icons/UIIcons/add.svg"
       style="width: 6%"

+ 0 - 6
src/app/journal/journal-home/journal-home.component.html

@@ -1,13 +1,7 @@
 <div class="journal-container">
   <!-- Here the different pages are rendered -->
   <router-outlet></router-outlet>
-
-  <!-- <tab-bar #tabbar id="tabbar" [class]="hideTabbar() ? 'hidden' : ''"></tab-bar> -->
-
   <details-panel></details-panel>
-
-  <!-- [showAdditionalNavigation]="hideTabbar()" -->
   <navigation-panel></navigation-panel>
-
   <modal></modal>
 </div>

+ 3 - 43
src/app/journal/journal-home/journal-home.component.scss

@@ -1,46 +1,6 @@
-.journal-container{
-    overflow: hidden;
-    @media (height < 950px){
-        overflow: auto;
-    }
+.journal-container {
+    overflow: auto;
     height: 100vh;
     width: 100vw;
-    // background-image: url("../../../assets/images/background-light.jpg");
-    // background-size: cover;
-    background-color: var(--background-color);    
+    background-color: var(--background-color);
 }
-
-
-app-tabbar{
-    position: fixed;
-    bottom: 0;
-    display: flex;
-    justify-content: center;
-    width: 100%;
-}
-
-tab-bar{
-    position: fixed;
-    bottom: 0;
-    display: flex;
-    justify-content: center;
-    width: 100%;
-}
-
-.hidden{
-    display: none;
-}
-
-
-// Not used currently
-.navigation-button{
-    position: fixed;
-    top: 0;
-    left: 0;
-    height: 2.5rem;
-    width: 3rem;
-    background-color: lightgray;
-    border: none;
-    outline: none;
-    // cursor: pointer;
-}

+ 2 - 32
src/app/journal/journal-home/journal-home.component.ts

@@ -1,7 +1,5 @@
-import { Component, ViewChild } from '@angular/core';
+import { Component } from '@angular/core';
 import { NavigationPanelService } from 'src/services/navigationPanel/navigation-panel.service';
-import { Router } from '@angular/router';
-import { DataService } from 'src/services/data/data.service';
 
 @Component({
   selector: 'app-journal-home',
@@ -9,15 +7,8 @@ import { DataService } from 'src/services/data/data.service';
   styleUrls: ['./journal-home.component.scss'],
 })
 export class JournalHomeComponent {
-  public constructor(
-    public navigation: NavigationPanelService,
-    private router: Router,
-    private dataAccessor: DataService
-  ) {}
-
-  @ViewChild('tabbar') tabbar: any;
-
   private isNavigationOpen: boolean = false;
+  public constructor(public navigation: NavigationPanelService) {}
 
   ngOnInit() {
     const width = window.innerWidth;
@@ -37,25 +28,4 @@ export class JournalHomeComponent {
       }
     });
   }
-
-  // If any container is too close to the bottom of the screen, the navbar is hidden.
-  public hideTabbar(): boolean {
-    if (this.router.url === '/journal/stats') {
-      const element = document.getElementsByClassName('stats-container')[0];
-      const rect = element!.getBoundingClientRect();
-      const distanceToBottom = window.innerHeight - rect.bottom;
-      const threshhold = 4.5 * 15.5;
-      if (distanceToBottom < threshhold) {
-        return true;
-      } else {
-        return false;
-      }
-    } else {
-      return false;
-    }
-  }
-
-  public onNavigationUpdated(tab: number) {
-    this.tabbar.active = tab;
-  }
 }

+ 0 - 1
src/app/journal/journal-home/navigation-panel/navigation-panel.component.html

@@ -1,7 +1,6 @@
 <div #navigationBackdrop class="backdrop" (click)="closePanel()"></div>
 <div #navigationPanel class="panel">
   <h2 style="margin-bottom: 1.5rem">Menu</h2>
-  {{ active }}
   <ul>
     <li>
       <div

+ 0 - 42
src/app/journal/journal-home/tab-bar/tab-bar.component.html

@@ -1,42 +0,0 @@
-<div class="tab-row">
-  <button
-    class="tab-button"
-    (click)="active = 1"
-    [class]="active === 1 ? 'active' : ''"
-    [routerLink]="'./stats'"
-  >
-    Stats
-  </button>
-  <button
-    class="tab-button"
-    (click)="active = 2"
-    [class]="active === 2 ? 'active' : ''"
-    [routerLink]="'./character'"
-  >
-    Charakter
-  </button>
-  <button
-    class="tab-button"
-    (click)="active = 3"
-    [class]="active === 3 ? 'active' : ''"
-    [routerLink]="'./inventory'"
-  >
-    Inventar
-  </button>
-  <button
-    class="tab-button"
-    (click)="active = 5"
-    [class]="active === 5 ? 'active' : ''"
-    [routerLink]="'./spellcards'"
-  >
-    Zauber
-  </button>
-  <button
-    class="tab-button"
-    (click)="active = 4"
-    [class]="active === 4 ? 'active' : ''"
-    [routerLink]="'./notes'"
-  >
-    Notizen
-  </button>
-</div>

+ 0 - 68
src/app/journal/journal-home/tab-bar/tab-bar.component.scss

@@ -1,68 +0,0 @@
-.tab-button{
-    width: 8rem;
-    height: 4rem;
-    font-size: 1.5rem;
-    font-weight: 600;
-    color: black;
-    border: 1px solid var(--border-color) !important;
-    border-radius: 10px 10px 0 0;
-    transition: all 0.25s ease-in-out;
-    background-color: var(--primary-color-light);
-
-    &:hover{
-        height: 4.125rem;
-        color: black;
-        background-color: var(--primary-color);
-    }
-
-    &.active{
-        height: 4.5rem;
-        width: 9rem;
-        font-size: 1.625rem;
-        background-color: var(--primary-color) !important;
-    }
-}
-
-.tab-row{
-    display: flex;
-    align-items: flex-end;
-}
-
-
-
-
-
-
-// .li{
-//     width: 10%;
-// }
-
-// button{
-//     width: 8rem;
-//     height: 4rem;
-//     font-size: 1.5rem;
-//     font-weight: 600;
-//     color: black;
-//     border: 1px solid black !important;
-//     transition: all 0.25s ease-in-out;
-//     background-color: var(--primary-color-light);
-// }
-
-// button:hover{
-//     height: 4.125rem;
-//     color: black;
-//     background-color: var(--primary-color);
-// }
-
-// button.active{
-//     height: 4.5rem;
-//     width: 9rem;
-//     font-size: 1.625rem;
-//     background-color: var(--primary-color) !important;
-// }
-
-
-// li{
-//     display: flex;
-//     align-items: flex-end;
-// }

+ 0 - 23
src/app/journal/journal-home/tab-bar/tab-bar.component.spec.ts

@@ -1,23 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TabBarComponent } from './tab-bar.component';
-
-describe('TabBarComponent', () => {
-  let component: TabBarComponent;
-  let fixture: ComponentFixture<TabBarComponent>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [TabBarComponent]
-    })
-    .compileComponents();
-    
-    fixture = TestBed.createComponent(TabBarComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 10
src/app/journal/journal-home/tab-bar/tab-bar.component.ts

@@ -1,10 +0,0 @@
-import { Component } from '@angular/core';
-
-@Component({
-  selector: 'tab-bar',
-  templateUrl: './tab-bar.component.html',
-  styleUrl: './tab-bar.component.scss',
-})
-export class TabBarComponent {
-  public active: number = 1;
-}

+ 0 - 2
src/app/journal/journal.module.ts

@@ -83,7 +83,6 @@ import { JournalRulesetComponent } from './journal-ruleset/journal-ruleset.compo
 import { JournalSettingsComponent } from './journal-settings/journal-settings.component';
 import { SimpleItemModalComponent } from './journal-inventory/simple-item-modal/simple-item-modal.component';
 import { FoodDetailsComponent } from './journal-inventory/food-details/food-details.component';
-import { TabBarComponent } from './journal-home/tab-bar/tab-bar.component';
 import { SpellcardComponent } from './journal-spellcards/spellcard/spellcard.component';
 import { AddCardComponent } from './journal-spellcards/add-card/add-card.component';
 import { GeneralComponent } from './journal-character/general/general.component';
@@ -160,7 +159,6 @@ import { StoryComponent } from './journal-character/story/story.component';
     ModalComponent,
     SimpleItemModalComponent,
     FoodDetailsComponent,
-    TabBarComponent,
     WeaponModalComponent,
     SpellcardComponent,
     AddCardComponent,