REFACTORING: ScriptEditor (#560)

This commit is contained in:
Aleksei Bezrodnov
2023-06-03 19:55:25 +02:00
committed by GitHub
parent 886f402a43
commit 99954ebd1e
11 changed files with 695 additions and 491 deletions
+24
View File
@@ -0,0 +1,24 @@
import * as monaco from "monaco-editor";
import { ContentFilePath } from "src/Paths/ContentFile";
type ITextModel = monaco.editor.ITextModel;
// Holds all the data for a open script
export class OpenScript {
path: ContentFilePath;
code: string;
hostname: string;
lastPosition: monaco.Position;
model: ITextModel;
isTxt: boolean;
constructor(path: ContentFilePath, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {
this.path = path;
this.code = code;
this.hostname = hostname;
this.lastPosition = lastPosition;
this.model = model;
this.isTxt = path.endsWith(".txt");
}
}