Skip to content

Commit

Permalink
I did some moving around of images
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Sep 18, 2024
1 parent 0bd2708 commit 408712c
Show file tree
Hide file tree
Showing 220 changed files with 164 additions and 184 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class AppComponent implements OnDestroy, AfterViewInit {
private SECONDS_DELAY:number[] =[1500, 1500];

hasWindow = false;
icon = 'osdrive/icons/generic-program.ico';
icon = 'osdrive/Cheetah/System/Imageres/generic_program.png';
name = 'system';
processId = 0;
type = ComponentType.System;
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/system-component/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="error-dialog-h1">
<div class="error-dialog-mid-section1">
<div class="error-dialog-mid-img1">
<figure class="error-dialog-figure1">
<img class="error-dialog-img1" [src]="'/osdrive/icons/red-x_50.png'"/>
<img class="error-dialog-img1" [src]="'/osdrive/Cheetah/System/Imageres/red_x.png'"/>
</figure>
</div>
<div class="error-dialog-mid-txt1">
Expand All @@ -53,7 +53,7 @@ <h1 class="error-dialog-h1">
<div class="info-dialog-mid-section1">
<div class="info-dialog-mid-img1">
<figure class="info-dialog-figure1">
<img class="info-dialog-img1" [src]="'/osdrive/icons/info_48.png'"/>
<img class="info-dialog-img1" [src]="'/osdrive/Cheetah/System/Imageres/info.png'"/>
</figure>
</div>
<div class="info-dialog-mid-txt1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</div>
</figure>
</div>
<div class="span fxtreeview-mid"><figure class="fxtreeview-figure1"><img class="fxtreeview-img1" [src]="'osdrive/icons/this_pc_94.png'"/></figure></div>
<div class="span fxtreeview-mid"><figure class="fxtreeview-figure1"><img class="fxtreeview-img1" [src]="'osdrive/Cheetah/System/Imageres/this_pc.png'"/></figure></div>
<div class="span fxtreeview-tail"><p class="fxtreeview-nested-p"> This PC</p></div>
</div>
</ng-container>
Expand All @@ -39,9 +39,14 @@
</div>
</figure>
</div>
<div class="span fxtreeview-mid"><figure class="fxtreeview-figure1"><img class="fxtreeview-img1" [src]=" node.name.toLowerCase() === 'downloads' ? 'osdrive/icons/downloads_folder.png' :
node.name.toLowerCase() === 'music'? 'osdrive/icons/music.png':
node.name.toLowerCase() === 'icons'? 'osdrive/icons/folder.ico' :'osdrive/icons/'+ node.name.toLowerCase() + '.ico'"/></figure></div>
<div class="span fxtreeview-mid"><figure class="fxtreeview-figure1"><img class="fxtreeview-img1" [src]=" node.name === '3D-Objects' && node.path === '/Users/3D-Objects' ? 'osdrive/Cheetah/System/Imageres/3d_objects_folder_small.png' :
node.name === 'Desktop' && node.path === '/Users/Desktop' ? 'osdrive/Cheetah/System/Imageres/desktop_folder_small.png' :
node.name === 'Documents' && node.path === '/Users/Documents' ? 'osdrive/Cheetah/System/Imageres/documents_folder_small.png' :
node.name === 'Downloads' && node.path === '/Users/Downloads' ? 'osdrive/Cheetah/System/Imageres/downloads_folder_small.png' :
node.name === 'Games' && node.path === '/Users/Games' ? 'osdrive/Cheetah/System/Imageres/games_folder_small.png' :
node.name === 'Music' && node.path === '/Users/Music' ? 'osdrive/Cheetah/System/Imageres/music_folder_small.png' :
node.name === 'Pictures' && node.path === '/Users/Pictures '? 'osdrive/Cheetah/System/Imageres/picture_folder_small.png':
node.name === 'Videos' && node.path === '/Users/Videos' ? 'osdrive/Cheetah/System/Imageres/videos_folder_small.png': 'osdrive/Cheetah/System/Imageres/folder_folder_small.png'"/></figure></div>
<div class="span fxtreeview-tail"><p class="fxtreeview-nested-p">{{node.name}}</p></div>
</div>

Expand All @@ -61,7 +66,7 @@
</div>
</figure>
</div>
<div class="span fxtreeview-mid"><figure class="fxtreeview-figure1"><img class="fxtreeview-img1" [src]="'osdrive/icons/empty_folder.ico'"/></figure></div>
<div class="span fxtreeview-mid"><figure class="fxtreeview-figure1"><img class="fxtreeview-img1" [src]="'osdrive/Cheetah/System/Imageres/folder_folder_small.png'"/></figure></div>
<div class="span fxtreeview-tail"><p class="fxtreeview-nested-p"> {{child.name}}</p></div>
</div>

Expand Down
45 changes: 18 additions & 27 deletions src/app/shared/system-service/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,18 @@ export class FileService{
}
}

private changeFolderIcon(fileName:string, iconPath:string):string{
private changeFolderIcon(fileName:string, iconPath:string, path:string):string{

if(fileName === 'Music'){
return '/osdrive/icons/music_folder.ico';
}else if(fileName === 'Videos'){
return '/osdrive/icons/video_folder.ico';

}else if(fileName === 'Pictures'){
return '/osdrive/icons/picture_folder.ico';
}
else if(fileName === 'Desktop'){
return '/osdrive/icons/desktop_folder.ico';
}
else if(fileName === 'Documents'){
return '/osdrive/icons/documents_folder.ico';
}
else if(fileName === 'Downloads'){
return '/osdrive/icons/downloads_folder.ico';
}
console.log('iconPath:',iconPath);

const baseUrl = '/osdrive';
const iconMaybe = `/Cheetah/System/Imageres/${fileName.toLocaleLowerCase()}_folder.png`;

if(path !== `/Users/${fileName}`)
return iconPath;

return iconPath;
return this._fileSystem.existsSync(iconMaybe) ? `${baseUrl}${iconMaybe}` : iconPath;
}

public async checkIfDirectory(path: string):Promise<boolean> {
Expand Down Expand Up @@ -357,7 +348,7 @@ export class FileService{
const sc = await this.setFolderValuesAsync(path) as ShortCut;
const fileMetaData = await this.getExtraFileMetaDataAsync(path) as FileMetaData;

this._fileInfo.setIconPath = this.changeFolderIcon(sc.geFileName,sc.getIconPath);
this._fileInfo.setIconPath = this.changeFolderIcon(sc.geFileName,sc.getIconPath, path);
this._fileInfo.setCurrentPath = path;
this._fileInfo.setFileType = sc.getFileType;
this._fileInfo.setFileName = sc.geFileName;
Expand Down Expand Up @@ -397,7 +388,7 @@ export class FileService{
}
else if(this._consts.VIDEO_FILE_EXTENSIONS.includes(extension)){
const sc = await this.getShortCutFromB64DataUrlAsync(path, 'video');
this._fileInfo.setIconPath = '/osdrive/icons/video_file.ico';
this._fileInfo.setIconPath = '/osdrive/Cheetah/System/Imageres/video_file.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setContentPath = sc.getContentPath;
this._fileInfo.setFileType = extension;
Expand All @@ -408,7 +399,7 @@ export class FileService{
this._fileInfo.setMode = fileMetaData.getMode;
}else if(this._consts.AUDIO_FILE_EXTENSIONS.includes(extension)){
const sc = await this.getShortCutFromB64DataUrlAsync(path, 'audio');
this._fileInfo.setIconPath = '/osdrive/icons/music_file.ico';
this._fileInfo.setIconPath = '/osdrive/Cheetah/System/Imageres/music_file.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setContentPath = sc.getContentPath;
this._fileInfo.setFileType = extension;
Expand All @@ -418,7 +409,7 @@ export class FileService{
this._fileInfo.setSize = fileMetaData.getSize;
this._fileInfo.setMode = fileMetaData.getMode;
}else if(extension == '.txt' || extension == '.properties'){
this._fileInfo.setIconPath = '/osdrive/icons/file.ico';
this._fileInfo.setIconPath = '/osdrive/Cheetah/System/Imageres/file.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setFileType = extname(path);
this._fileInfo.setFileName = basename(path, extname(path));
Expand All @@ -427,7 +418,7 @@ export class FileService{
this._fileInfo.setSize = fileMetaData.getSize;
this._fileInfo.setMode = fileMetaData.getMode;
}else if(extension == '.md'){
this._fileInfo.setIconPath = '/osdrive/icons/markdown-file_50.png';
this._fileInfo.setIconPath = '/osdrive/Cheetah/System/Imageres/markdown-file_50.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setFileType = extname(path);
this._fileInfo.setFileName = basename(path, extname(path));
Expand All @@ -436,7 +427,7 @@ export class FileService{
this._fileInfo.setSize = fileMetaData.getSize;
this._fileInfo.setMode = fileMetaData.getMode;
}else if(extension == '.jsdos'){
this._fileInfo.setIconPath = '/osdrive/icons/emulator-2.png';
this._fileInfo.setIconPath = '/osdrive/Cheetah/System/Imageres/emulator_2.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setFileType = extname(path);
this._fileInfo.setFileName = basename(path, extname(path));
Expand All @@ -446,7 +437,7 @@ export class FileService{
this._fileInfo.setMode = fileMetaData.getMode;
}
else if(extension == '.swf'){
this._fileInfo.setIconPath = '/osdrive/icons/flash_67.png';
this._fileInfo.setIconPath = '/osdrive/Cheetah/System/Imageres/lightning_flash.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setFileType = extname(path);
this._fileInfo.setFileName = basename(path, extname(path));
Expand All @@ -456,7 +447,7 @@ export class FileService{
this._fileInfo.setMode = fileMetaData.getMode;
}
else{
this._fileInfo.setIconPath='/osdrive/icons/unknown.ico';
this._fileInfo.setIconPath='/osdrive/Cheetah/System/Imageres/unknown.png';
this._fileInfo.setCurrentPath = path;
this._fileInfo.setFileName = basename(path, extname(path));
this._fileInfo.setDateModified = fileMetaData.getModifiedDate;
Expand Down Expand Up @@ -750,7 +741,7 @@ export class FileService{
}

const isDirectory = (stats)? stats.isDirectory(): false;
const iconFile = `/osdrive/icons/${isDirectory ? 'folder.ico' : 'unknown.ico'}`
const iconFile = `/osdrive/Cheetah/System/Imageres/${isDirectory ? 'folder.png' : 'unknown.png'}`
const fileType = 'folder';
const opensWith ='fileexplorer'
resolve(new ShortCut(iconFile, basename(path, extname(path)),fileType,basename(path, extname(path)) ,opensWith ));
Expand Down
2 changes: 1 addition & 1 deletion src/app/system-apps/audioplayer/audioplayer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class AudioPlayerComponent implements BaseComponent, OnInit, OnDestroy, A

name= 'audioplayer';
hasWindow = true;
icon = '/osdrive/icons/audioplayer.png';
icon = '/osdrive/Cheetah/System/Imageres/audioplayer.png';
processId = 0;
type = ComponentType.User;
displayName = 'Howlerjs';
Expand Down
2 changes: 1 addition & 1 deletion src/app/system-apps/clock/clock.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ClockComponent implements AfterViewInit,OnDestroy {

hasWindow = false;
hover = false;
icon = 'osdrive/icons/generic-program.ico';
icon = 'osdrive/Cheetah/System/Imageres/generic_program.png';
name = 'clock';
processId = 0;
type = ComponentType.System
Expand Down
Loading

0 comments on commit 408712c

Please sign in to comment.