fix(merge_component): 🐛 fix unsavable after accept
This commit is contained in:
parent
2afdc1e10d
commit
ef9cf48fc1
4 changed files with 42 additions and 57 deletions
|
|
@ -516,13 +516,15 @@ export class MergeComponent
|
|||
this.selectedCommit + '_diff3'
|
||||
] as Array<any>;
|
||||
// get value from the right side
|
||||
let diff_recipe = this.anotherTargetRecipe[pd];
|
||||
if(updateIdxList != undefined || updateIdxList != null){
|
||||
let diff_recipe = this.anotherTargetRecipe[pd];
|
||||
|
||||
updateIdxList.forEach((idx) => {
|
||||
this.getCommitAttr(this.selectedCommit, 'contents').recipes[idx] =
|
||||
diff_recipe.recipes[idx];
|
||||
// TODO: add topping sync, if is topping slot, set topping too!
|
||||
});
|
||||
updateIdxList.forEach((idx) => {
|
||||
this.getCommitAttr(this.selectedCommit, 'contents').recipes[idx] =
|
||||
diff_recipe.recipes[idx];
|
||||
// TODO: add topping sync, if is topping slot, set topping too!
|
||||
});
|
||||
}
|
||||
|
||||
this.recipeFromMachine = this.getCommitAttr(
|
||||
this.selectedCommit,
|
||||
|
|
@ -534,14 +536,16 @@ export class MergeComponent
|
|||
this.selectedCommit + '_commit'
|
||||
] as Array<any>;
|
||||
// get value from the left side
|
||||
let commit_recipe = this.getCommitAttr(
|
||||
this.selectedCommit,
|
||||
'contents'
|
||||
).recipes;
|
||||
updateIdxList.forEach((idx) => {
|
||||
this.anotherTargetRecipe[pd].recipes[idx] = commit_recipe[idx];
|
||||
// TODO: add topping sync, if is topping slot, set topping too!
|
||||
});
|
||||
if(updateIdxList != undefined || updateIdxList != null){
|
||||
let commit_recipe = this.getCommitAttr(
|
||||
this.selectedCommit,
|
||||
'contents'
|
||||
).recipes;
|
||||
updateIdxList.forEach((idx) => {
|
||||
this.anotherTargetRecipe[pd].recipes[idx] = commit_recipe[idx];
|
||||
// TODO: add topping sync, if is topping slot, set topping too!
|
||||
});
|
||||
}
|
||||
this.recipeFromMachine = this.anotherTargetRecipe[pd];
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,45 +5,6 @@
|
|||
<button class="btn w-1/2" (click)="addRow()">Add</button>
|
||||
<button class="btn w-1/2" (click)="removeRow()">Remove</button>
|
||||
</div>
|
||||
<details class="hidden">
|
||||
<summary>Console</summary>
|
||||
<div class="m-2 p-2 !rounded-md bg-gray-400">
|
||||
<!-- other -->
|
||||
<div class="p-2 bg-gray-200 space-x-2" id="command">
|
||||
<div class="flex flex-row p-2 space-x-2">
|
||||
<input type="checkbox" id="command-enable" />
|
||||
<p>Command</p>
|
||||
</div>
|
||||
|
||||
<!-- <input class="w-56" type="text"> -->
|
||||
<div class="flex flex-row">
|
||||
<div class="mockup-code">
|
||||
<code class="">
|
||||
<textarea
|
||||
class="p-2 resize-none bg-black text-white text-sm textarea-xs"
|
||||
id="command-code"
|
||||
cols="100"
|
||||
rows="10"
|
||||
>
|
||||
//"!tb help" for more info.</textarea
|
||||
>
|
||||
<div class="divider divider-vertical"></div>
|
||||
<textarea
|
||||
class="p-2 bg-black text-green-600 text-sm textarea-xs resize-none"
|
||||
id="command-output"
|
||||
cols="100"
|
||||
rows="10"
|
||||
disabled
|
||||
></textarea>
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button class="m-2 btn btn-warning right-2" (click)="eval()">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
<table class="table table-xs" [formGroup]="recipeListForm">
|
||||
<thead>
|
||||
<tr class="bg-gray-200">
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
// <p>Command</p>
|
||||
// </div>
|
||||
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
|
||||
// <!-- <input class="w-56" type="text"> -->
|
||||
// <div class="flex flex-row gap-2">
|
||||
// <code class="">
|
||||
|
|
@ -33,6 +35,7 @@ export class Debugger {
|
|||
"!tb vars - view all stored variables",
|
||||
"!tb var::<name> - get variable value by stored name",
|
||||
"!tb get::<name> - get value of variable in angular",
|
||||
"!tb get::<name> -> <var_name> - get value in angular and immidiately apply to new varible",
|
||||
"!tb fn::<name> <...args> - execute the function with args",
|
||||
];
|
||||
|
||||
|
|
@ -110,6 +113,12 @@ export class Debugger {
|
|||
case "help":
|
||||
this.output.push(this.commandList.join("\n"));
|
||||
break;
|
||||
case "server_refresh":
|
||||
this.output.push("sending signal to server...");
|
||||
// let client: HttpClient = new HttpClient({
|
||||
// handle:
|
||||
// });
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue