pridan pull pri initu aplikace, pridano nastaveni, uprava interakce

This commit is contained in:
2021-01-05 23:29:28 +01:00
parent 3b6cbc143f
commit dcfaef47a6
5 changed files with 144 additions and 18 deletions

View File

@@ -90,6 +90,19 @@ class Model {
});
}
async pullRep() {
await git.pull({
fs,
http,
dir,
fastForwardOnly: true,
author: {
name: localStorage.getItem("name"),
email: localStorage.getItem("email"),
},
});
}
setRepo(repoURL) {
localStorage.setItem("repo", repoURL);
}
@@ -100,6 +113,13 @@ class Model {
}
localStorage.setItem("baseDir", baseDir);
}
async setName(name) {
localStorage.setItem("name", name);
}
async setEmail(email) {
localStorage.setItem("email", email);
}
readFile(file) {
return pfs.readFile(file, "utf8");