Skip to content

Commit

Permalink
moved folder content around
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Sep 24, 2024
1 parent 4f0132e commit ff0e993
Show file tree
Hide file tree
Showing 429 changed files with 643,188 additions and 24 deletions.
10 changes: 5 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
"src/osdrive",
{
"glob": "**/*",
"input": "src/assets/js-dos",
"input": "src/osdrive/Program-Files/JS-DOS",
"output": "/"
},
{
"glob": "**/*",
"input": "src/assets/ruffle",
"output": "/assets/ruffle"
"input": "src/osdrive/Program-Files/Ruffle",
"output": "/osdrive/Program-Files/Ruffle"
},
{
"glob": "**/*",
"input": "src/assets/pdf",
"output": "/assets/pdf"
"input": "src/osdrive/Program-Files/PDF-JS",
"output": "/osdrive/Program-Files/PDF-JS"
},
{ "glob": "**/*",
"input": "node_modules/monaco-editor",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/app/shared/system-service/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ export class FileService{
const sc = await this.getShortCutFromB64DataUrlAsync(path, 'audio') as ShortCut;
if(sc)
this._fileInfo = this.populateFileInfo(path, fileMetaData, true, 'audioplayer', 'music_file.png', false, sc);
}else if(this._consts.PROGRAMING_LANGUAGE_FILE_EXTENSIONS.includes(extension) || extension === '.wasm'){
const img_file = (extension === '.wasm')? 'wasm_file.png' : 'code_file.png';
this._fileInfo = this.populateFileInfo(path, fileMetaData, true, 'codeeditor', img_file );
}
else if(extension == '.txt' || extension == '.properties'){
this._fileInfo = this.populateFileInfo(path, fileMetaData, true, 'texteditor', 'file.png');
Expand Down Expand Up @@ -690,7 +693,7 @@ export class FileService{
}

const isDirectory = (stats)? stats.isDirectory(): false;
const iconFile = `/osdrive/Cheetah/System/Imageres/${isDirectory ? 'folder.png' : 'unknown.png'}`
const iconFile = `${this._consts.IMAGE_BASE_PATH}${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
4 changes: 2 additions & 2 deletions src/app/system-apps/audioplayer/audioplayer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ export class AudioPlayerComponent implements BaseComponent, OnInit, OnDestroy, A
this.audioSrc = (this.audioSrc !== '')?
this.audioSrc :this.getAudioSrc(this._fileInfo.getContentPath, this._fileInfo.getCurrentPath);

this._scriptService.loadScript("howler","assets/howler/howler.min.js").then(()=>{
this._scriptService.loadScript("howler","osdrive/Program-Files/Howler/howler.min.js").then(()=>{

this._scriptService.loadScript("siriwave","assets/howler/siriwave.umd.min.js").then(()=>{
this._scriptService.loadScript("siriwave","osdrive/Program-Files/Howler/siriwave.umd.min.js").then(()=>{

this.siriWave = new SiriWave({
container: this.waveForm.nativeElement,
Expand Down
6 changes: 3 additions & 3 deletions src/app/system-apps/desktop/desktop.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class DesktopComponent implements OnInit, OnDestroy, AfterViewInit{
}

ngOnInit():void{
this._scriptService.loadScript("vanta-waves","assets/backgrounds/vanta.waves.min.js").then(() =>{
this._scriptService.loadScript("vanta-waves","osdrive/Program-Files/Backgrounds/vanta.waves.min.js").then(() =>{
this._vantaEffect = VANTA.WAVES({
el: '#vanta',
color:this.defaultColor, //this._numSequence,
Expand All @@ -188,8 +188,8 @@ export class DesktopComponent implements OnInit, OnDestroy, AfterViewInit{

loadOtherBackgrounds():void{
const names:string[] = ["rings","halo", "globe", "birds"]
const bkgrounds:string[] = [ "assets/backgrounds/vanta.rings.min.js","assets/backgrounds/vanta.halo.min.js","assets/backgrounds/vanta.globe.min.js",
"assets/backgrounds/vanta.birds.min.js"];
const bkgrounds:string[] = [ "osdrive/Program-Files/Backgrounds/vanta.rings.min.js","osdrive/Program-Files/Backgrounds/vanta.halo.min.js",
"osdrive/Program-Files/Backgrounds/vanta.globe.min.js", "osdrive/Program-Files/Backgrounds/vanta.birds.min.js"];

for(let i =0; i <= bkgrounds.length - 1; i++){
this._scriptService.loadScript(names[i], bkgrounds[i]);
Expand Down
6 changes: 4 additions & 2 deletions src/app/system-apps/texteditor/texteditor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { TriggerProcessService } from 'src/app/shared/system-service/trigger.pro
import { SessionManagmentService } from 'src/app/shared/system-service/session.management.service';
import { FileService } from 'src/app/shared/system-service/file.service';
import { ScriptService } from 'src/app/shared/system-service/script.services';
import { Constants } from "src/app/system-files/constants";

import { BaseComponent } from 'src/app/system-base/base/base.component';
import { ComponentType } from 'src/app/system-files/component.types';
Expand Down Expand Up @@ -40,6 +41,7 @@ export class TextEditorComponent implements BaseComponent, OnDestroy, AfterView
private _scriptService: ScriptService;
private _fileService:FileService;

private _consts:Constants = new Constants();
private _fileInfo!:FileInfo;
private _appState!:AppState;
private _maximizeWindowSub!: Subscription;
Expand All @@ -49,7 +51,7 @@ export class TextEditorComponent implements BaseComponent, OnDestroy, AfterView
SECONDS_DELAY = 250;

hasWindow = true;
icon = 'osdrive/Cheetah/System/Imageres/text-editor_48.png';
icon = `${this._consts.IMAGE_BASE_PATH}text-editor.png`;
name = 'texteditor';
processId = 0;
type = ComponentType.System;
Expand Down Expand Up @@ -92,7 +94,7 @@ export class TextEditorComponent implements BaseComponent, OnDestroy, AfterView
placeholder: 'Compose an epic...',
theme: 'snow'
};
this._scriptService.loadScript("quilljs","assets/quill/quill.js").then( async() =>{
this._scriptService.loadScript("quilljs","osdrive/Program-Files/Quill/quill.js").then( async() =>{

const textCntnt = await this._fileService.getFileAsync(this.fileSrc);
const index = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/app/system-apps/videoplayer/videoplayer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class VideoPlayerComponent implements BaseComponent, OnInit, OnDestroy, A

name= 'videoplayer';
hasWindow = true;
icon = '/osdrive/Cheetah/System/Imageres/videoplayer.png';
icon = `${this._consts.IMAGE_BASE_PATH}videoplayer.png`;
processId = 0;
type = ComponentType.System;
displayName = 'Video-js';
Expand Down Expand Up @@ -124,7 +124,7 @@ export class VideoPlayerComponent implements BaseComponent, OnInit, OnDestroy, A
const appData:string[] = [this.fileType, this.videoSrc];
this.storeAppState(appData);

this._scriptService.loadScript("videojs","assets/videojs/video.min.js").then(() =>{
this._scriptService.loadScript("videojs","osdrive/Program-Files/Videojs/video.min.js").then(() =>{
this.player = videojs(this.videowindow.nativeElement, options, function onPlayerReady(){
console.log('onPlayerReady:', "player is read");
});
Expand Down
14 changes: 14 additions & 0 deletions src/app/system-files/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,18 @@ export class Constants{
'.weba',
'.webm'
]

readonly PROGRAMING_LANGUAGE_FILE_EXTENSIONS = [
'.js',
'.js.map',
'.map',
'.mjs',
'.ts',
'.cs',
'.java',
'.py',
'.c',
'.cpp',
'.html'
]
}
2 changes: 1 addition & 1 deletion src/app/user-apps/jsdos/jsdos.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class JSdosComponent implements BaseComponent, OnInit, OnDestroy, AfterVi
this.gameSrc = (this.gameSrc !=='')?
this.gameSrc : this.getGamesSrc(this._fileInfo.getContentPath, this._fileInfo.getCurrentPath);

this._scriptService.loadScript("js-dos", "assets/js-dos/js-dos.js").then(async() =>{
this._scriptService.loadScript("js-dos", "osdrive/Program-Files/JS-DOS/js-dos.js").then(async() =>{

emulators.pathPrefix= '/';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class MarkDownViewerComponent implements BaseComponent, OnDestroy, After
this.fileSrc = (this.fileSrc !=='')?
this.fileSrc : this.getFileSrc(this._fileInfo.getContentPath, this._fileInfo.getCurrentPath);

this._scriptService.loadScript("markedjs","assets/marked/marked.min.js").then(async() =>{
this._scriptService.loadScript("markedjs","osdrive/Program-Files/Marked/marked.min.js").then(async() =>{
const mkd = marked.setOptions({
gfm: true,
breaks: true
Expand Down
2 changes: 1 addition & 1 deletion src/app/user-apps/ruffle/ruffle.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class RuffleComponent implements BaseComponent, OnInit, AfterViewInit {
this.gameSrc = (this.gameSrc !=='')?
this.gameSrc : this.getGamesSrc(this._fileInfo.getContentPath, this._fileInfo.getCurrentPath);

this._scriptService.loadScript("ruffle","assets/ruffle/ruffle.js").then(()=>{
this._scriptService.loadScript("ruffle","osdrive/Program-Files/Ruffle/ruffle.js").then(()=>{
this.rufflePlayer = (window as any).RufflePlayer.newest();
this.loadSWF('ruffleWindow',this.gameSrc);
this.storeAppState(this.gameSrc);
Expand Down
2 changes: 1 addition & 1 deletion src/osdrive.json

Large diffs are not rendered by default.

Binary file added src/osdrive/Cheetah/System/Imageres/code_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/osdrive/Program-Files/3D-Model-Viewer/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "standard"
}
61 changes: 61 additions & 0 deletions src/osdrive/Program-Files/3D-Model-Viewer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
8 changes: 8 additions & 0 deletions src/osdrive/Program-Files/3D-Model-Viewer/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
assets
index.html
TODO
webpack.config.js
test
dist/*.min.js
dist/*.min.js.map
Loading

0 comments on commit ff0e993

Please sign in to comment.