diff --git a/src/app/system-apps/desktop/desktop.component.ts b/src/app/system-apps/desktop/desktop.component.ts index dbae35d..015bc7c 100644 --- a/src/app/system-apps/desktop/desktop.component.ts +++ b/src/app/system-apps/desktop/desktop.component.ts @@ -365,7 +365,7 @@ export class DesktopComponent implements OnInit, OnDestroy, AfterViewInit{ } async createFolder():Promise{ - const folderName = 'New Folder'; + const folderName = this._consts.NEW_FOLDER; const result = await this._fileService.createFolderAsync(this.directory, folderName); if(result){ this._fileService.addEventOriginator('filemanager'); diff --git a/src/app/system-apps/fileexplorer/fileexplorer.component.ts b/src/app/system-apps/fileexplorer/fileexplorer.component.ts index 8b31909..506c543 100644 --- a/src/app/system-apps/fileexplorer/fileexplorer.component.ts +++ b/src/app/system-apps/fileexplorer/fileexplorer.component.ts @@ -258,8 +258,14 @@ export class FileExplorerComponent implements BaseComponent, OnInit, AfterViewIn if(this._fileInfo){ // is this a URL or and Actual Folder - if(this._fileInfo.getOpensWith === 'fileexplorer' && !this._fileInfo.getIsFile) //Actual Folder - this.directory = this._fileInfo.getCurrentPath; + if(this._fileInfo.getOpensWith === 'fileexplorer' && !this._fileInfo.getIsFile){ //Actual Folder + this.directory = this._fileInfo.getCurrentPath; + const fileName = (this._fileInfo.getFileName === this._consts.EMPTY_STRING)? this._consts.NEW_FOLDER : this._fileInfo.getFileName; + + this.populateHopsList(); + this.setNavPathIcon(fileName, this._fileInfo.getCurrentPath); + this.storeAppState(this._fileInfo.getCurrentPath); + } } this.renameForm = this._formBuilder.nonNullable.group({ diff --git a/src/app/system-apps/filemanager/filemanager.component.ts b/src/app/system-apps/filemanager/filemanager.component.ts index f5a8b68..e27d7a2 100644 --- a/src/app/system-apps/filemanager/filemanager.component.ts +++ b/src/app/system-apps/filemanager/filemanager.component.ts @@ -200,7 +200,7 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni }, this.SECONDS_DELAY[1]); } - async runProcess(file:FileInfo):Promise{ + runProcess(file:FileInfo):void{ console.log('filemanager-runProcess:',file) this._triggerProcessService.startApplication(file); diff --git a/src/app/system-apps/startmenu/startmenu.component.html b/src/app/system-apps/startmenu/startmenu.component.html index 12593b2..a200b85 100644 --- a/src/app/system-apps/startmenu/startmenu.component.html +++ b/src/app/system-apps/startmenu/startmenu.component.html @@ -3,7 +3,7 @@
-
+
@@ -16,40 +16,40 @@
-
+
-

Documents

+

{{Documents}}

-
+
-

Pictures

+

{{Pictures}}

-
+
-

Music

+

{{Music}}

-
+
diff --git a/src/app/system-apps/startmenu/startmenu.component.ts b/src/app/system-apps/startmenu/startmenu.component.ts index 2e453ca..a9cdbac 100644 --- a/src/app/system-apps/startmenu/startmenu.component.ts +++ b/src/app/system-apps/startmenu/startmenu.component.ts @@ -28,6 +28,10 @@ export class StartMenuComponent implements OnInit, AfterViewInit { private SECONDS_DELAY = 250; + Documents= 'Documents'; + Pictures = 'Pictures' + Music = 'Music'; + delayStartMenuOverlayHideTimeoutId!: NodeJS.Timeout; delayStartMenuOverlayShowTimeoutId!: NodeJS.Timeout; @@ -190,10 +194,26 @@ export class StartMenuComponent implements OnInit, AfterViewInit { } } - async runProcess(file:FileInfo):Promise{ + runProcess(file:FileInfo):void{ console.log('startmanager-runProcess:',file) this._triggerProcessService.startApplication(file); + } + + + openFolderPath(folderName:string):void{ + const path = `/Users/${folderName}`; + + const file = new FileInfo(); + file.setFileName = folderName; + file.setOpensWith = 'fileexplorer'; + file.setIsFile = false; + file.setCurrentPath = path; + + this.runProcess(file); + } + power():void{ + location.reload(); } diff --git a/src/app/system-files/constants.ts b/src/app/system-files/constants.ts index 8d7829c..528fa3b 100644 --- a/src/app/system-files/constants.ts +++ b/src/app/system-files/constants.ts @@ -9,6 +9,7 @@ export class Constants{ readonly SHORTCUT = 'Shortcut'; readonly BASE = 'osdrive'; readonly IMAGE_BASE_PATH = 'osdrive/Cheetah/System/Imageres/'; + readonly NEW_FOLDER = 'New Folder'; readonly DEFAULT_MENU_ORDER = 'DefaultMenuOrder'; readonly DEFAULT_FILE_MENU_ORDER = 'DefaultFileMenuOrder';