Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Sep 26, 2024
1 parent 7f4631c commit 854cab2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class AppComponent implements OnDestroy, AfterViewInit {
this.restorePriorSession(sessionKeys);
}, this.SECONDS_DELAY[0]);

this.showPropertiesWindow();
//this.showPropertiesWindow();
}

async loadApps(appName:string):Promise<void>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
outline: 1px hsl(0deg 0% 20%/70%);
z-index: 2;
width: 325px;
height: 460px;
height: 455px;
}


Expand Down Expand Up @@ -49,6 +49,8 @@
.properties-img{
height: 18px;
width: 18px;
position: relative;
left: -5px;
margin: 0 6px 0 8px;
image-rendering: optimizeQuality;
}
Expand Down Expand Up @@ -244,9 +246,8 @@

.properties-footer-container{
width: 100%;
height: 40px;
height: 35px;
background-color: #f0f0f0;

}

/* Custom styles for .btn.btn-primary */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h1 class="properties-h1">
</div>
</div>
<div class="properties-footer-container">
<span style="position: fixed; margin-top:9px; right:2%;">
<span style="position: fixed; margin-top:6px; right:2%;">
<button class="btn btn-primary" (click)="onCloseDialogBox()" >
OK
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {ChangeDetectorRef, Component, Input, OnChanges, SimpleChanges} from '@angular/core';
import { ComponentType } from 'src/app/system-files/component.types';
import { FileInfo } from 'src/app/system-files/file.info';
@Component({
selector: 'cos-properties',
templateUrl: './properties.component.html',
styleUrl: './properties.component.css'
})

export class PropertiesComponent implements OnChanges {

@Input() inputMsg = '';
@Input() fileInput!:FileInfo;

propertiesId = 0;
type = ComponentType.System;
displayMgs = 'Test Test Properties';
name = 'Test Test';
displayMgs = '';
name = '';

constructor(private changeDetectorRef: ChangeDetectorRef){
this.propertiesId = this.generatePropertyId();
Expand All @@ -22,7 +22,8 @@ export class PropertiesComponent implements OnChanges {

ngOnChanges(changes: SimpleChanges):void{
//console.log('DIALOG onCHANGES:',changes);
this.displayMgs = this.inputMsg;
this.displayMgs = `${this.fileInput.getFileName} Properties`;
this.name = this.fileInput.getFileName;
}


Expand Down
8 changes: 7 additions & 1 deletion src/app/system-apps/filemanager/filemanager.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@
</div>
</div>

<cos-menu [generalMenu]="menuData" *ngIf="showCntxtMenu" [style]="iconCntxtMenuStyle" [menuType]="fileExplrMngrMenuOption" [menuOrder]="menuOrder"> </cos-menu>
<ng-container *ngIf="showCntxtMenu">
<cos-menu [generalMenu]="menuData" [style]="iconCntxtMenuStyle" [menuType]="fileExplrMngrMenuOption" [menuOrder]="menuOrder"> </cos-menu>
</ng-container>

<ng-container *ngIf="showPropertiesView">
<cos-properties [fileInput]="propertiesViewFile"></cos-properties>
</ng-container>
</ol>
10 changes: 9 additions & 1 deletion src/app/system-apps/filemanager/filemanager.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,14 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni
private btnClickCnt = 0;
private renameFileTriggerCnt = 0;

propertiesViewFile!:FileInfo

iconCntxtMenuStyle:Record<string, unknown> = {};
iconSizeStyle:Record<string, unknown> = {};
btnStyle:Record<string, unknown> = {};

showCntxtMenu = false;
showPropertiesView = false;
gridSize = 90; //column size of grid = 90px
SECONDS_DELAY = 6000;
renameForm!: FormGroup;
Expand All @@ -88,7 +91,7 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni
{icon:'', label: 'Create shortcut', action: this.doNothing.bind(this)},
{icon:'', label: 'Delete', action: this.onDeleteFile.bind(this) },
{icon:'', label: 'Rename', action: this.onRenameFileTxtBoxShow.bind(this) },
{icon:'', label: 'Properties', action: this.doNothing.bind(this) }
{icon:'', label: 'Properties', action: this.showPropertiesWindow.bind(this) }
];

menuData:GeneralMenu[] =[];
Expand Down Expand Up @@ -218,6 +221,7 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni

this.adjustContextMenuData(file);
this.selectedFile = file;
this.propertiesViewFile = file;
this.showCntxtMenu = !this.showCntxtMenu;

// show IconContexMenu is still a btn click, just a different type
Expand All @@ -232,6 +236,10 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni
evt.preventDefault();
}

showPropertiesWindow():void{
this.showPropertiesView = true;
}

adjustContextMenuData(file:FileInfo):void{
this.menuData = [];

Expand Down

0 comments on commit 854cab2

Please sign in to comment.