Skip to content

Commit

Permalink
moved window component to shared-components
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Sep 26, 2024
1 parent ce07614 commit 7f4631c
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {TestBed} from '@angular/core/testing';
import {AppComponent} from './app.component';
import {TitleComponent } from './user-apps/title/title.component';
import {DesktopComponent} from './system-apps/desktop/desktop.component';
import {WindowComponent} from './system-apps/window/window.component'
import {WindowComponent} from './shared/system-component/window/window.component'

describe('AppComponent', () => {
beforeEach(async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { TaskBarPreviewComponent } from './system-apps/taskbarpreview/taskbarpre
import { TaskBarEntriesComponent } from './system-apps/taskbarentries/taskbarentries.component';
import { TaskBarEntryComponent } from './system-apps/taskbarentry/taskbarentry.component';
import { FileExplorerComponent } from './system-apps/fileexplorer/fileexplorer.component';
import { WindowComponent } from './system-apps/window/window.component';
import { WindowComponent } from './shared/system-component/window/window.component';
import { FileManagerComponent } from './system-apps/filemanager/filemanager.component';
import { GreetingComponent } from './user-apps/greeting/greeting.component';
import { TaskmanagerComponent } from './system-apps/taskmanager/taskmanager.component';
Expand All @@ -38,7 +38,7 @@ import { FileTreeViewComponent } from './shared/system-component/filetreeview/fi
import { SafeUrlPipe } from './shared/system-pipes/safe.resource.url.pipe';
import { TruncatePipe } from './shared/system-pipes/string.shorten.pipe';

import { HighlightDirective } from './system-apps/window/window.btn.highlight.directives';
import { HighlightDirective } from './shared/system-component/window/window.btn.highlight.directives';
import { TaskBarEntryHighlightDirective } from './system-apps/taskbarentries/taskbar.entry.highlight.directives';
import { LongPressDirective } from './system-apps/audioplayer/long.press.directive';
import { ColumnResizeDirective } from './system-apps/taskmanager/taskmanager.column-resize.directive';
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:4%;">
<span style="position: fixed; margin-top:9px; right:2%;">
<button class="btn btn-primary" (click)="onCloseDialogBox()" >
OK
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RunningProcessService } from 'src/app/shared/system-service/running.pro
import { Subscription } from 'rxjs';
import { StateManagmentService } from 'src/app/shared/system-service/state.management.service';
import { BaseState, WindowState } from 'src/app/system-files/state/state.interface';
import {openCloseAnimation, hideShowAnimation, minimizeMaximizeAnimation} from 'src/app/system-apps/window/animation/animations';
import {openCloseAnimation, hideShowAnimation, minimizeMaximizeAnimation} from 'src/app/shared/system-component/window/animation/animations';
import { StateType } from 'src/app/system-files/state/state.type';
import { SessionManagmentService } from 'src/app/shared/system-service/session.management.service';

Expand Down
5 changes: 4 additions & 1 deletion src/app/system-apps/taskbar/taskbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ProcessIDService } from 'src/app/shared/system-service/process.id.servi
import { RunningProcessService } from 'src/app/shared/system-service/running.process.service';
import { ComponentType } from 'src/app/system-files/component.types';
import { Process } from 'src/app/system-files/process';
import { Constants } from 'src/app/system-files/constants';

@Component({
selector: 'cos-taskbar',
Expand All @@ -16,10 +17,12 @@ export class TaskbarComponent implements AfterViewInit{
private _runningProcessService:RunningProcessService;
private _menuService:MenuService;
private _el: ElementRef;
private _consts:Constants = new Constants();

SECONDS_DELAY = 1000;

hasWindow = false;
icon = 'osdrive/Cheetah/System/Imageres/generic_program.png';
icon = `${this._consts.IMAGE_BASE_PATH}generic_program.png`;
name = 'taskbar';
processId = 0;
type = ComponentType.System
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TriggerProcessService } from 'src/app/shared/system-service/trigger.pro
import { ComponentType } from 'src/app/system-files/component.types';
import { FileInfo } from 'src/app/system-files/file.info';
import { Process } from 'src/app/system-files/process';
import { Constants } from 'src/app/system-files/constants';

@Component({
selector: 'cos-taskbarentries',
Expand All @@ -19,6 +20,7 @@ export class TaskBarEntriesComponent implements AfterViewInit, OnDestroy {
private _runningProcessService:RunningProcessService;
private _triggerProcessService:TriggerProcessService;
private _menuService:MenuService;
private _consts:Constants = new Constants();

private _processListChangeSub!: Subscription;
private _addIconToTaskbarSub!: Subscription;
Expand All @@ -36,7 +38,7 @@ export class TaskBarEntriesComponent implements AfterViewInit, OnDestroy {
unPinned = "unPinned";

hasWindow = false;
icon = 'osdrive/Cheetah/System/Imageres/generic_program.png';
icon = `${this._consts.IMAGE_BASE_PATH}generic_program.png`;
name = 'taskbarentry';
processId = 0;
type = ComponentType.System;
Expand Down
4 changes: 3 additions & 1 deletion src/app/system-apps/terminal/terminal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { AppState, BaseState } from 'src/app/system-files/state/state.interface'
import { StateType } from 'src/app/system-files/state/state.type';
import { StateManagmentService } from 'src/app/shared/system-service/state.management.service';
import { SessionManagmentService } from 'src/app/shared/system-service/session.management.service';
import { Constants } from 'src/app/system-files/constants';
import * as htmlToImage from 'html-to-image';
import { TaskBarPreviewImage } from '../taskbarpreview/taskbar.preview';

Expand All @@ -35,6 +36,7 @@ export class TerminalComponent implements BaseComponent, OnInit, AfterViewInit,
private _stateManagmentService:StateManagmentService;
private _sessionManagmentService: SessionManagmentService;
private _appState!:AppState;
private _consts:Constants = new Constants();

private msgPosCounter = 0;
private scrollCounter = 0
Expand Down Expand Up @@ -70,7 +72,7 @@ export class TerminalComponent implements BaseComponent, OnInit, AfterViewInit,
traversalDepth = 0;

hasWindow = true;
icon = '/osdrive/Cheetah/System/Imageres/terminal_48.png';
icon = `${this._consts.IMAGE_BASE_PATH}terminal.png`;
name = 'terminal';
processId = 0;
type = ComponentType.System;
Expand Down

0 comments on commit 7f4631c

Please sign in to comment.