|
|
|
@ -48,29 +48,33 @@ class Model {
|
|
|
|
|
}
|
|
|
|
|
var tree = await this.dirList(baseDir);
|
|
|
|
|
this.dirTree = tree;
|
|
|
|
|
return tree;
|
|
|
|
|
|
|
|
|
|
await this.getGitStatusTree();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async getGitStatusTree() {
|
|
|
|
|
var dirtree = await this.getDirTree();
|
|
|
|
|
var tree = await this.dirGitStatus(dirtree);
|
|
|
|
|
|
|
|
|
|
return tree;
|
|
|
|
|
this.gitDirTreeStat = await this.dirGitStatus(this.dirTree);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async dirGitStatus(list) {
|
|
|
|
|
for (let i = 1; i < list.length; i++) {
|
|
|
|
|
let statList = [];
|
|
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
|
|
if (Array.isArray(list[i])) {
|
|
|
|
|
await this.dirGitStatus(list[i]);
|
|
|
|
|
statList[i] = await this.dirGitStatus(list[i]);
|
|
|
|
|
} else {
|
|
|
|
|
list[i] = await git.status({
|
|
|
|
|
fs,
|
|
|
|
|
dir,
|
|
|
|
|
filepath: list[0].substring(1) + list[i],
|
|
|
|
|
});
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
statList[i] = list[0];
|
|
|
|
|
} else {
|
|
|
|
|
statList[i] = await git.status({
|
|
|
|
|
fs,
|
|
|
|
|
dir,
|
|
|
|
|
filepath: list[0].substring(1) + list[i],
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
|
|
|
|
|
return statList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ================== Text Area ================== */
|
|
|
|
@ -79,8 +83,10 @@ class Model {
|
|
|
|
|
return pfs.readFile(file, "utf8");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
saveFile(cesta, obsah) {
|
|
|
|
|
async saveFile(cesta, obsah) {
|
|
|
|
|
pfs.writeFile(cesta, obsah, "utf8");
|
|
|
|
|
|
|
|
|
|
await this.getGitStatusTree();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ================== Controls ================== */
|
|
|
|
|