|
1 | 1 | <div> |
2 | 2 | <h3>Comparison</h3> |
3 | | - <div *ngIf="!loading"> |
4 | | - <div class="toolbar"> |
5 | | - <div class="pull-left"> |
6 | | - <div class="custom-control custom-checkbox"> |
7 | | - <input type="checkbox" |
8 | | - class="custom-control-input" |
9 | | - id="showDiffs" |
10 | | - [ngModel]="showLinesDiffs" |
11 | | - (ngModelChange)="showLinesDiffsChange($event)" |
12 | | - > |
13 | | - <label class="custom-control-label" for="showDiffs">Show Lines with Diffs ({{diffs}})</label> |
14 | | - </div> |
15 | | - </div> |
16 | | - <div class="pull-right"> |
17 | | - <div class="btn-group btn-group-toggle" data-toggle="buttons"> |
18 | | - <label class="btn btn-outline-dark btn-sm" *ngFor="let option of formatOptions" |
19 | | - [ngClass]="{'active': format === option.value, 'disabled': !!option.disabled}"> |
20 | | - <input type="radio" |
21 | | - [name]="option.name" |
22 | | - [id]="option.id" |
23 | | - [disabled]="!!option.disabled" |
24 | | - autocomplete="off" |
25 | | - (click)="setDiffTableFormat(option.value)" |
26 | | - [checked]="format === option.value" |
27 | | - ><i class="la {{option.icon}}"></i> {{option.label}} |
28 | | - </label> |
29 | | - </div> |
30 | | - </div> |
| 3 | + <div class="td-wrapper"> |
| 4 | + <div class="td-toolbar-show-diff"> |
| 5 | + <input type="checkbox" |
| 6 | + class="" |
| 7 | + id="showDiffs" |
| 8 | + [ngModel]="showLinesDiffs" |
| 9 | + (ngModelChange)="showLinesDiffsChange($event)" |
| 10 | + > |
| 11 | + <label class="" for="showDiffs">Show Lines with Diffs ({{diffs}})</label> |
31 | 12 | </div> |
32 | | - <div class="side-by-side table-responsive" *ngIf="format === 'SideBySide'"> |
33 | | - <table class="table"> |
34 | | - <tbody> |
35 | | - <tr *ngFor="let row of filteredLeftRightRows"> |
36 | | - <td scope="row" class="fit-column line-number-col" |
37 | | - [ngClass]="{'delete-row' : row.prefix === '-', 'empty-row': !row.content}">{{(row.lineNumberLeft !== -1) ? |
38 | | - row.lineNumberLeft : ' '}} |
39 | | - </td> |
40 | | - <td class="fit-column prefix-col" [ngClass]="{'delete-row' : row.prefix === '-', 'empty-row': !row.content}"> |
41 | | - <pre>{{row.prefix || ' '}}</pre> |
42 | | - </td> |
43 | | - <td class="content-col" [ngClass]="{'delete-row' : row.prefix === '-', 'empty-row': !row.content}"> |
44 | | - <pre>{{row.content || ' '}}</pre> |
45 | | - </td> |
46 | | - <td scope="row" class="fit-column line-number-col" |
47 | | - [ngClass]="{'insert-row' : row.prefixRight === '+', 'empty-row': !row.contentRight}"> |
48 | | - {{(row.lineNumberRight !== -1) ? row.lineNumberRight : ' '}} |
49 | | - </td> |
50 | | - <td class="fit-column prefix-col" |
51 | | - [ngClass]="{'insert-row' : row.prefixRight === '+', 'empty-row': !row.contentRight}"> |
52 | | - <pre>{{row.prefixRight || ' '}}</pre> |
53 | | - </td> |
54 | | - <td class="content-col" [ngClass]="{'insert-row' : row.prefixRight === '+', 'empty-row': !row.contentRight}"> |
55 | | - <pre>{{row.contentRight || ' '}}</pre> |
56 | | - </td> |
57 | | - <tr> |
58 | | - </tr> |
59 | | - </tbody> |
60 | | - </table> |
61 | | - </div> |
62 | | - <div class="line-by-line table-responsive" *ngIf="format === 'LineByLine'"> |
63 | | - <table class="table"> |
64 | | - <tbody> |
65 | | - <tr *ngFor="let row of filteredRows"> |
66 | | - <td scope="row" class="fit-column line-number-col-left">{{row.lineNumberLeft}}</td> |
67 | | - <td scope="row" class="fit-column line-number-col">{{row.lineNumberRight}}</td> |
68 | | - <td class="fit-column prefix-col" |
69 | | - [ngClass]="{'delete-row' : row.prefix === '-', 'insert-row' : row.prefix === '+'}"> |
70 | | - <pre>{{row.prefix || ' '}}</pre> |
71 | | - </td> |
72 | | - <td class="content-col" [ngClass]="{'delete-row' : row.prefix === '-', 'insert-row' : row.prefix === '+'}"> |
73 | | - <pre>{{row.content || ' '}}</pre> |
74 | | - </td> |
75 | | - </tr> |
76 | | - </tbody> |
77 | | - </table> |
| 13 | + <div class="td-toolbar-select-format"> |
| 14 | + <div class="td-btn-group td-btn-group-toggle" data-toggle="buttons"> |
| 15 | + <button *ngFor="let option of formatOptions" |
| 16 | + [ngClass]="{'active': format === option.value, 'disabled': !!option.disabled}" |
| 17 | + [name]="option.name" |
| 18 | + [id]="option.id" |
| 19 | + [disabled]="!!option.disabled" |
| 20 | + (click)="setDiffTableFormat(option.value)" |
| 21 | + >{{option.label}} |
| 22 | + </button> |
| 23 | + </div> |
78 | 24 | </div> |
79 | | - <app-diff-codemirror-merge [left]="left" [right]="right" *ngIf="format === 'MergeView'"></app-diff-codemirror-merge> |
| 25 | + <table class="td-table td-table-container side-by-side" *ngIf="format === 'SideBySide'"> |
| 26 | + <tbody> |
| 27 | + <tr *ngFor="let row of filteredLeftRightRows"> |
| 28 | + <td scope="row" class="fit-column line-number-col" |
| 29 | + [ngClass]="{'delete-row' : row.prefix === '-', 'empty-row': !row.content}">{{(row.lineNumberLeft !== -1) ? |
| 30 | + row.lineNumberLeft : ' '}} |
| 31 | + </td> |
| 32 | + <td class="fit-column prefix-col" [ngClass]="{'delete-row' : row.prefix === '-', 'empty-row': !row.content}"> |
| 33 | + <pre>{{row.prefix || ' '}}</pre> |
| 34 | + </td> |
| 35 | + <td class="content-col" [ngClass]="{'delete-row' : row.prefix === '-', 'empty-row': !row.content}"> |
| 36 | + <pre>{{row.content || ' '}}</pre> |
| 37 | + </td> |
| 38 | + <td scope="row" class="fit-column line-number-col" |
| 39 | + [ngClass]="{'insert-row' : row.prefixRight === '+', 'empty-row': !row.contentRight}"> |
| 40 | + {{(row.lineNumberRight !== -1) ? row.lineNumberRight : ' '}} |
| 41 | + </td> |
| 42 | + <td class="fit-column prefix-col" |
| 43 | + [ngClass]="{'insert-row' : row.prefixRight === '+', 'empty-row': !row.contentRight}"> |
| 44 | + <pre>{{row.prefixRight || ' '}}</pre> |
| 45 | + </td> |
| 46 | + <td class="content-col" [ngClass]="{'insert-row' : row.prefixRight === '+', 'empty-row': !row.contentRight}"> |
| 47 | + <pre>{{row.contentRight || ' '}}</pre> |
| 48 | + </td> |
| 49 | + <tr> |
| 50 | + </tr> |
| 51 | + </tbody> |
| 52 | + </table> |
| 53 | + <table class="td-table td-table-container line-by-line" *ngIf="format === 'LineByLine'"> |
| 54 | + <tbody> |
| 55 | + <tr *ngFor="let row of filteredRows"> |
| 56 | + <td scope="row" class="fit-column line-number-col-left">{{row.lineNumberLeft}}</td> |
| 57 | + <td scope="row" class="fit-column line-number-col">{{row.lineNumberRight}}</td> |
| 58 | + <td class="fit-column prefix-col" |
| 59 | + [ngClass]="{'delete-row' : row.prefix === '-', 'insert-row' : row.prefix === '+'}"> |
| 60 | + <pre>{{row.prefix || ' '}}</pre> |
| 61 | + </td> |
| 62 | + <td class="content-col" [ngClass]="{'delete-row' : row.prefix === '-', 'insert-row' : row.prefix === '+'}"> |
| 63 | + <pre>{{row.content || ' '}}</pre> |
| 64 | + </td> |
| 65 | + </tr> |
| 66 | + </tbody> |
| 67 | + </table> |
80 | 68 | </div> |
81 | 69 | </div> |
0 commit comments