mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-26 04:08:21 +01:00
GitGraph: Fetch changes on a commit based on current commit and its left most parent commit
This commit is contained in:
parent
cb76136de3
commit
60639760bd
@ -449,14 +449,15 @@ namespace OS {
|
|||||||
.on("click",e => {
|
.on("click",e => {
|
||||||
if(this._on_open_diff)
|
if(this._on_open_diff)
|
||||||
{
|
{
|
||||||
|
const parent_comit = commit.hashes.parents.split(" ")[0];
|
||||||
Promise.all([
|
Promise.all([
|
||||||
this.get_file(arr[1], `${commit.hashes.commit}^`),
|
this.get_file(arr[1], `${parent_comit}`),
|
||||||
this.get_file(arr[1], commit.hashes.commit)
|
this.get_file(arr[1], commit.hashes.commit)
|
||||||
])
|
])
|
||||||
.then((values) => {
|
.then((values) => {
|
||||||
// create the file
|
// create the file
|
||||||
const files = values.map((content, index) =>{
|
const files = values.map((content, index) =>{
|
||||||
const file = `mem://${commit.hashes.commit.slice(0,8)}${index==0?"^":""}/${arr[1]}`.asFileHandle();
|
const file = `mem://${(index == 0 ?parent_comit:commit.hashes.commit).slice(0,8)}/${arr[1]}`.asFileHandle();
|
||||||
file.cache = content;
|
file.cache = content;
|
||||||
file.info.mime = "text/plain";
|
file.info.mime = "text/plain";
|
||||||
return file;
|
return file;
|
||||||
|
@ -5,15 +5,16 @@ The visualization can be easily integrated to an AntOS application, example:
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
const graph = new API.LibGitGraph({
|
const graph = new API.LibGitGraph({
|
||||||
target: this.find("git-graph")
|
target: this.find("git-graph");
|
||||||
});
|
});
|
||||||
graph.on_open_diff = (files) => {
|
graph.on_open_diff = (files) => {
|
||||||
console.log(files);
|
console.log(files);
|
||||||
}
|
}
|
||||||
graph.base_dir = "home://workspace/repo-git";
|
graph.base_dir = "home://workspace/repo-git".asFileHandle();
|
||||||
```
|
```
|
||||||
|
|
||||||
## Change logs:
|
## Change logs:
|
||||||
|
- v0.1.4-b: Fetch changes on a commit based on current commit and its left most parent commit
|
||||||
- v0.1.3-b: Support open Git repo with open with dialog
|
- v0.1.3-b: Support open Git repo with open with dialog
|
||||||
- v0.1.2-b: fix init bug
|
- v0.1.2-b: fix init bug
|
||||||
- v0.1.1-b: add class to container element
|
- v0.1.1-b: add class to container element
|
||||||
|
@ -5,15 +5,16 @@ The visualization can be easily integrated to an AntOS application, example:
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
const graph = new API.LibGitGraph({
|
const graph = new API.LibGitGraph({
|
||||||
target: this.find("git-graph")
|
target: this.find("git-graph");
|
||||||
});
|
});
|
||||||
graph.on_open_diff = (files) => {
|
graph.on_open_diff = (files) => {
|
||||||
console.log(files);
|
console.log(files);
|
||||||
}
|
}
|
||||||
graph.base_dir = "home://workspace/repo-git";
|
graph.base_dir = "home://workspace/repo-git".asFileHandle();
|
||||||
```
|
```
|
||||||
|
|
||||||
## Change logs:
|
## Change logs:
|
||||||
|
- v0.1.4-b: Fetch changes on a commit based on current commit and its left most parent commit
|
||||||
- v0.1.3-b: Support open Git repo with open with dialog
|
- v0.1.3-b: Support open Git repo with open with dialog
|
||||||
- v0.1.2-b: fix init bug
|
- v0.1.2-b: fix init bug
|
||||||
- v0.1.1-b: add class to container element
|
- v0.1.1-b: add class to container element
|
||||||
|
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@
|
|||||||
"author": "Dany LE",
|
"author": "Dany LE",
|
||||||
"email": "contact@iohub.dev"
|
"email": "contact@iohub.dev"
|
||||||
},
|
},
|
||||||
"version":"0.1.3-b",
|
"version":"0.1.4-b",
|
||||||
"category":"Development",
|
"category":"Development",
|
||||||
"iconclass":"bi bi-git",
|
"iconclass":"bi bi-git",
|
||||||
"mimes":["dir"],
|
"mimes":["dir"],
|
||||||
|
Binary file not shown.
@ -7,7 +7,7 @@
|
|||||||
"author": "Dany LE",
|
"author": "Dany LE",
|
||||||
"email": "contact@iohub.dev"
|
"email": "contact@iohub.dev"
|
||||||
},
|
},
|
||||||
"version":"0.1.3-b",
|
"version":"0.1.4-b",
|
||||||
"category":"Development",
|
"category":"Development",
|
||||||
"iconclass":"bi bi-git",
|
"iconclass":"bi bi-git",
|
||||||
"mimes":["dir"],
|
"mimes":["dir"],
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GitGraph/README.md",
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GitGraph/README.md",
|
||||||
"category": "Development",
|
"category": "Development",
|
||||||
"author": "Dany LE",
|
"author": "Dany LE",
|
||||||
"version": "0.1.3-b",
|
"version": "0.1.4-b",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GitGraph/build/release/GitGraph.zip"
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GitGraph/build/release/GitGraph.zip"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user