diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8fa9bf9..2948efc 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -3,7 +3,7 @@ import { Component } from '@angular/core'; import { InfoBarComponent } from './editor/info-bar/info-bar.component'; import { TabsComponent } from './editor/tabs/tabs.component'; import { EditorsComponent } from './editor/editors.component'; -import { FilesModalComponent } from "./editor/modals/files-modal.component"; +import { FilesModalComponent } from "./common/components/modals/files-modal.component"; diff --git a/src/app/editor/modals/files-modal.component.css b/src/app/common/components/modals/files-modal.component.css similarity index 100% rename from src/app/editor/modals/files-modal.component.css rename to src/app/common/components/modals/files-modal.component.css diff --git a/src/app/editor/modals/files-modal.component.html b/src/app/common/components/modals/files-modal.component.html similarity index 100% rename from src/app/editor/modals/files-modal.component.html rename to src/app/common/components/modals/files-modal.component.html diff --git a/src/app/editor/modals/files-modal.component.ts b/src/app/common/components/modals/files-modal.component.ts similarity index 89% rename from src/app/editor/modals/files-modal.component.ts rename to src/app/common/components/modals/files-modal.component.ts index c154394..1973c7e 100644 --- a/src/app/editor/modals/files-modal.component.ts +++ b/src/app/common/components/modals/files-modal.component.ts @@ -5,10 +5,10 @@ import { Subject, takeUntil } from 'rxjs'; import * as bootstrap from "bootstrap"; -import { FilesModalService } from "../../common/services/editor/modals/files-modal.service"; -import { TabsService } from '../../common/services/editor/tabs/tabs.service'; +import { FilesModalService } from "../../services/editor/modals/files-modal.service"; +import { TabsService } from '../../services/editor/tabs/tabs.service'; -import { ServiceMessage } from '../../common/types/service-message.type'; +import { ServiceMessage } from '../../types/service-message.type'; diff --git a/src/app/common/services/editor/editors.service.ts b/src/app/common/services/editor/editors.service.ts index fdcbd36..2008385 100644 --- a/src/app/common/services/editor/editors.service.ts +++ b/src/app/common/services/editor/editors.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { ReplaySubject, Observable } from 'rxjs'; -import { NewtonEditorComponent } from "../../../editor/newton-editor/newton-editor.component"; +import { CodeViewComponent } from "../../../editor/code-view/view.component"; import { ServiceMessage } from '../../types/service-message.type'; import { EditorSettings } from "../../configs/editor.config"; @@ -16,7 +16,7 @@ import { NewtonFile } from '../../types/file.type'; export class EditorsService { private messageSubject: ReplaySubject = new ReplaySubject(1); - editors: Map; + editors: Map; editorSettings: typeof EditorSettings; activeEditor!: string; @@ -24,19 +24,19 @@ export class EditorsService { constructor() { this.editorSettings = EditorSettings; - this.editors = new Map(); + this.editors = new Map(); } - public getEditorsAsArray(): NewtonEditorComponent[] { + public getEditorsAsArray(): CodeViewComponent[] { return [...this.editors.values()]; } - public get(uuid: string): NewtonEditorComponent { + public get(uuid: string): CodeViewComponent { return this.editors.get(uuid); } - public set(uuid: string, component: NewtonEditorComponent) { + public set(uuid: string, component: CodeViewComponent) { this.editors.set(uuid, component); if (Object.keys(this.editors).length < 1) return; diff --git a/src/app/editor/newton-editor/newton-editor.base.ts b/src/app/editor/code-view/view.base.ts similarity index 99% rename from src/app/editor/newton-editor/newton-editor.base.ts rename to src/app/editor/code-view/view.base.ts index 3a0e306..b570cf6 100644 --- a/src/app/editor/newton-editor/newton-editor.base.ts +++ b/src/app/editor/code-view/view.base.ts @@ -15,7 +15,7 @@ import { ServiceMessage } from '../../common/types/service-message.type'; @Directive() -export class NewtonEditorBase { +export class CodeViewBase { public uuid: string = uuid.v4(); @Input() public isDefault: boolean = false; public leftSiblingUUID!: string; diff --git a/src/app/editor/newton-editor/newton-editor.component.css b/src/app/editor/code-view/view.component.css similarity index 100% rename from src/app/editor/newton-editor/newton-editor.component.css rename to src/app/editor/code-view/view.component.css diff --git a/src/app/editor/newton-editor/newton-editor.component.html b/src/app/editor/code-view/view.component.html similarity index 100% rename from src/app/editor/newton-editor/newton-editor.component.html rename to src/app/editor/code-view/view.component.html diff --git a/src/app/editor/newton-editor/newton-editor.component.ts b/src/app/editor/code-view/view.component.ts similarity index 96% rename from src/app/editor/newton-editor/newton-editor.component.ts rename to src/app/editor/code-view/view.component.ts index c3e48d0..ac30195 100644 --- a/src/app/editor/newton-editor/newton-editor.component.ts +++ b/src/app/editor/code-view/view.component.ts @@ -11,7 +11,7 @@ import "ace-builds/src-noconflict/ext-language_tools"; //import "ace-builds/src-noconflict/theme-penguins_in_space"; import "ace-builds/src-noconflict/theme-gruvbox"; -import { NewtonEditorBase } from './newton-editor.base'; +import { CodeViewBase } from './view.base'; import { NewtonFile } from '../../common/types/file.type'; import { ServiceMessage } from '../../common/types/service-message.type'; @@ -19,17 +19,17 @@ import { ServiceMessage } from '../../common/types/service-message.type'; @Component({ - selector: 'newton-editor', + selector: 'code-view', standalone: true, imports: [ ], - templateUrl: './newton-editor.component.html', - styleUrl: './newton-editor.component.css', + templateUrl: './view.component.html', + styleUrl: './view.component.css', host: { 'class': 'col' } }) -export class NewtonEditorComponent extends NewtonEditorBase { +export class CodeViewComponent extends CodeViewBase { constructor() { diff --git a/src/app/editor/editors.component.html b/src/app/editor/editors.component.html index 67d416d..e05f8aa 100644 --- a/src/app/editor/editors.component.html +++ b/src/app/editor/editors.component.html @@ -1,9 +1,9 @@
- +
- +
\ No newline at end of file diff --git a/src/app/editor/editors.component.ts b/src/app/editor/editors.component.ts index 4e4e469..0448013 100644 --- a/src/app/editor/editors.component.ts +++ b/src/app/editor/editors.component.ts @@ -5,7 +5,7 @@ import { EditorsService } from '../common/services/editor/editors.service'; import { TabsService } from '../common/services/editor/tabs/tabs.service'; import { FilesService } from '../common/services/editor/files.service'; -import { NewtonEditorComponent } from "./newton-editor/newton-editor.component"; +import { CodeViewComponent } from "./code-view/view.component"; import { DndDirective } from '../common/directives/dnd.directive'; import { PaneHandleDirective } from '../common/directives/pane-handle.directive'; @@ -20,7 +20,7 @@ import { ServiceMessage } from '../common/types/service-message.type'; imports: [ DndDirective, PaneHandleDirective, - NewtonEditorComponent + CodeViewComponent ], templateUrl: './editors.component.html', styleUrl: './editors.component.css',