Merge b46e8c113e6ca1da6e02aee22255c67f8729c736 into cc7ba64ee52412f41c3ce5207bac7e47b9f01f30
26 files · +1484 -886
M docs/merge-requests.md +14 -0
| @@ -104,3 +104,17 @@ report whether more exist; ancestry, rather than the bounded list, detects a | |||
| 104 | 104 | rewrite. Merge-request details include at most `ports.MaxMergeRequestCommits` | |
| 105 | 105 | (100) commits. These history queries remain on the merge-request service | |
| 106 | 106 | because it owns the merge-git port. | |
| 107 | + | ||
| 108 | + | ### Review page panels | |
| 109 | + | ||
| 110 | + | The main request card ends with a collapsed Commits / Checks footer. With | |
| 111 | + | scripts, arrow keys (and Home / End) switch its tabs; without scripts, opening | |
| 112 | + | the footer shows both sections. The checks summary above the diff opens the | |
| 113 | + | Checks tab and continues to update live. Commit totals use `N+` when the branch | |
| 114 | + | list is capped: the reader's existing count operation counts all reachable | |
| 115 | + | ancestors, not the source-minus-target range. | |
| 116 | + | ||
| 117 | + | The rail keeps Files (including its `g f` shortcut) and Verdicts. Merge settings | |
| 118 | + | are read-only information in the More (⋯) menu, available to every viewer. | |
| 119 | + | Signing-key information is also there when a merge box offers signed modes; | |
| 120 | + | merge actions remain restricted to their existing permissions. | |
| @@ -104,3 +104,17 @@ report whether more exist; ancestry, rather than the bounded list, detects a | |||||
| 104 | rewrite. Merge-request details include at most `ports.MaxMergeRequestCommits` | 104 | rewrite. Merge-request details include at most `ports.MaxMergeRequestCommits` | ||
| 105 | (100) commits. These history queries remain on the merge-request service | 105 | (100) commits. These history queries remain on the merge-request service | ||
| 106 | because it owns the merge-git port. | 106 | because it owns the merge-git port. | ||
| 107 | + | ||||
| 108 | + | ### Review page panels | |||
| 109 | + | ||||
| 110 | + | The main request card ends with a collapsed Commits / Checks footer. With | |||
| 111 | + | scripts, arrow keys (and Home / End) switch its tabs; without scripts, opening | |||
| 112 | + | the footer shows both sections. The checks summary above the diff opens the | |||
| 113 | + | Checks tab and continues to update live. Commit totals use `N+` when the branch | |||
| 114 | + | list is capped: the reader's existing count operation counts all reachable | |||
| 115 | + | ancestors, not the source-minus-target range. | |||
| 116 | + | ||||
| 117 | + | The rail keeps Files (including its `g f` shortcut) and Verdicts. Merge settings | |||
| 118 | + | are read-only information in the More (⋯) menu, available to every viewer. | |||
| 119 | + | Signing-key information is also there when a merge box offers signed modes; | |||
| 120 | + | merge actions remain restricted to their existing permissions. | |||
M internal/adapters/web/actions.templ +2 -2
| @@ -434,7 +434,7 @@ templ CommitChecks(c ChecksSummary) { | |||
| 434 | 434 | } | |
| 435 | 435 | ||
| 436 | 436 | // MRChecksSum is the state of the checks of a merge request in the bar above | |
| 437 | - | // the diff, a link to the checks of the rail. The event stream replaces it | |
| 437 | + | // the diff, a link to the checks of the card footer. The event stream replaces it | |
| 438 | 438 | // with the checks section (same event, fragments.go). | |
| 439 | 439 | templ MRChecksSum(c ChecksSummary) { | |
| 440 | 440 | <a class="ck-sum mr-ck" id="mr-ck" href="#mr-checks" title={ c.Title }> | |
| @@ -447,7 +447,7 @@ templ MRChecksSum(c ChecksSummary) { | |||
| 447 | 447 | </a> | |
| 448 | 448 | } | |
| 449 | 449 | ||
| 450 | - | // MRChecks is the checks section of the rail of a merge request. | |
| 450 | + | // MRChecks is the checks section of the footer of a merge request. | |
| 451 | 451 | templ MRChecks(c ChecksSection) { | |
| 452 | 452 | <section aria-labelledby="r-checks" id="mr-checks"> | |
| 453 | 453 | <h2 id="r-checks">Checks <span class="count">{ itoa(len(c.Rows)) }</span></h2> | |
| @@ -434,7 +434,7 @@ templ CommitChecks(c ChecksSummary) { | |||||
| 434 | } | 434 | } | ||
| 435 | 435 | ||||
| 436 | // MRChecksSum is the state of the checks of a merge request in the bar above | 436 | // MRChecksSum is the state of the checks of a merge request in the bar above | ||
| 437 | - | // the diff, a link to the checks of the rail. The event stream replaces it | 437 | + | // the diff, a link to the checks of the card footer. The event stream replaces it |
| 438 | // with the checks section (same event, fragments.go). | 438 | // with the checks section (same event, fragments.go). | ||
| 439 | templ MRChecksSum(c ChecksSummary) { | 439 | templ MRChecksSum(c ChecksSummary) { | ||
| 440 | <a class="ck-sum mr-ck" id="mr-ck" href="#mr-checks" title={ c.Title }> | 440 | <a class="ck-sum mr-ck" id="mr-ck" href="#mr-checks" title={ c.Title }> | ||
| @@ -447,7 +447,7 @@ templ MRChecksSum(c ChecksSummary) { | |||||
| 447 | </a> | 447 | </a> | ||
| 448 | } | 448 | } | ||
| 449 | 449 | ||||
| 450 | - | // MRChecks is the checks section of the rail of a merge request. | 450 | + | // MRChecks is the checks section of the footer of a merge request. |
| 451 | templ MRChecks(c ChecksSection) { | 451 | templ MRChecks(c ChecksSection) { | ||
| 452 | <section aria-labelledby="r-checks" id="mr-checks"> | 452 | <section aria-labelledby="r-checks" id="mr-checks"> | ||
| 453 | <h2 id="r-checks">Checks <span class="count">{ itoa(len(c.Rows)) }</span></h2> | 453 | <h2 id="r-checks">Checks <span class="count">{ itoa(len(c.Rows)) }</span></h2> | ||
M internal/adapters/web/actions_templ.go +2 -2 generated file: collapsed
M internal/adapters/web/checks.go +1 -1
| @@ -81,7 +81,7 @@ func checksSummary(repo domain.RepoName, sha string, checks []ports.CheckView) C | |||
| 81 | 81 | return sum | |
| 82 | 82 | } | |
| 83 | 83 | ||
| 84 | - | // checksSection is the checks of the rail of a merge request, with the rule of | |
| 84 | + | // checksSection is the checks of the footer of a merge request, with the rule of | |
| 85 | 85 | // the repository that applies to them. | |
| 86 | 86 | func checksSection(repo domain.Repo, checks []ports.CheckView) ChecksSection { | |
| 87 | 87 | sec := ChecksSection{} | |
| @@ -81,7 +81,7 @@ func checksSummary(repo domain.RepoName, sha string, checks []ports.CheckView) C | |||||
| 81 | return sum | 81 | return sum | ||
| 82 | } | 82 | } | ||
| 83 | 83 | ||||
| 84 | - | // checksSection is the checks of the rail of a merge request, with the rule of | 84 | + | // checksSection is the checks of the footer of a merge request, with the rule of |
| 85 | // the repository that applies to them. | 85 | // the repository that applies to them. | ||
| 86 | func checksSection(repo domain.Repo, checks []ports.CheckView) ChecksSection { | 86 | func checksSection(repo domain.Repo, checks []ports.CheckView) ChecksSection { | ||
| 87 | sec := ChecksSection{} | 87 | sec := ChecksSection{} | ||
M internal/adapters/web/diff.templ +6 -2
| @@ -117,7 +117,7 @@ templ diffViewMenu(p DiffView) { | |||
| 117 | 117 | <details class="menu vmenu"> | |
| 118 | 118 | <summary class="btn" aria-label="Diff view"> | |
| 119 | 119 | if p.Both { | |
| 120 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">{ viewLabel(p.View) }</span> | |
| 120 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">{ viewLabel(p.View) }</span> | |
| 121 | 121 | } else { | |
| 122 | 122 | { viewLabel(p.View) } | |
| 123 | 123 | } | |
| @@ -139,12 +139,16 @@ templ viewLink(p DiffView, view, label, key, href string) { | |||
| 139 | 139 | class="btn vbtn" | |
| 140 | 140 | data-view={ view } | |
| 141 | 141 | aria-keyshortcuts={ key } | |
| 142 | + | if view == "split" { | |
| 143 | + | :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" | |
| 144 | + | :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" | |
| 145 | + | } | |
| 142 | 146 | if p.View == view { | |
| 143 | 147 | aria-current="true" | |
| 144 | 148 | } | |
| 145 | 149 | if p.Both { | |
| 146 | 150 | data-fire={ view } | |
| 147 | - | :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false" | |
| 151 | + | :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false" | |
| 148 | 152 | } | |
| 149 | 153 | >{ label }<kbd aria-hidden="true">{ key }</kbd></a> | |
| 150 | 154 | } | |
| @@ -117,7 +117,7 @@ templ diffViewMenu(p DiffView) { | |||||
| 117 | <details class="menu vmenu"> | 117 | <details class="menu vmenu"> | ||
| 118 | <summary class="btn" aria-label="Diff view"> | 118 | <summary class="btn" aria-label="Diff view"> | ||
| 119 | if p.Both { | 119 | if p.Both { | ||
| 120 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">{ viewLabel(p.View) }</span> | 120 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">{ viewLabel(p.View) }</span> |
| 121 | } else { | 121 | } else { | ||
| 122 | { viewLabel(p.View) } | 122 | { viewLabel(p.View) } | ||
| 123 | } | 123 | } | ||
| @@ -139,12 +139,16 @@ templ viewLink(p DiffView, view, label, key, href string) { | |||||
| 139 | class="btn vbtn" | 139 | class="btn vbtn" | ||
| 140 | data-view={ view } | 140 | data-view={ view } | ||
| 141 | aria-keyshortcuts={ key } | 141 | aria-keyshortcuts={ key } | ||
| 142 | + | if view == "split" { | |||
| 143 | + | :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" | |||
| 144 | + | :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" | |||
| 145 | + | } | |||
| 142 | if p.View == view { | 146 | if p.View == view { | ||
| 143 | aria-current="true" | 147 | aria-current="true" | ||
| 144 | } | 148 | } | ||
| 145 | if p.Both { | 149 | if p.Both { | ||
| 146 | data-fire={ view } | 150 | data-fire={ view } | ||
| 147 | - | :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false" | 151 | + | :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false" |
| 148 | } | 152 | } | ||
| 149 | >{ label }<kbd aria-hidden="true">{ key }</kbd></a> | 153 | >{ label }<kbd aria-hidden="true">{ key }</kbd></a> | ||
| 150 | } | 154 | } | ||
M internal/adapters/web/diff_templ.go +190 -184
| @@ -530,14 +530,14 @@ func diffViewMenu(p DiffView) templ.Component { | |||
| 530 | 530 | return templ_7745c5c3_Err | |
| 531 | 531 | } | |
| 532 | 532 | if p.Both { | |
| 533 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span hx-live=\"this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'\">") | |
| 533 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span hx-live=\"this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'\">") | |
| 534 | 534 | if templ_7745c5c3_Err != nil { | |
| 535 | 535 | return templ_7745c5c3_Err | |
| 536 | 536 | } | |
| 537 | 537 | var templ_7745c5c3_Var22 string | |
| 538 | 538 | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(viewLabel(p.View)) | |
| 539 | 539 | if templ_7745c5c3_Err != nil { | |
| 540 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 120, Col: 122} | |
| 540 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 120, Col: 168} | |
| 541 | 541 | } | |
| 542 | 542 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | |
| 543 | 543 | if templ_7745c5c3_Err != nil { | |
| @@ -649,58 +649,64 @@ func viewLink(p DiffView, view, label, key, href string) templ.Component { | |||
| 649 | 649 | if templ_7745c5c3_Err != nil { | |
| 650 | 650 | return templ_7745c5c3_Err | |
| 651 | 651 | } | |
| 652 | + | if view == "split" { | |
| 653 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " :aria-disabled=\"q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false\" :title=\"q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'\"") | |
| 654 | + | if templ_7745c5c3_Err != nil { | |
| 655 | + | return templ_7745c5c3_Err | |
| 656 | + | } | |
| 657 | + | } | |
| 652 | 658 | if p.View == view { | |
| 653 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " aria-current=\"true\"") | |
| 659 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " aria-current=\"true\"") | |
| 654 | 660 | if templ_7745c5c3_Err != nil { | |
| 655 | 661 | return templ_7745c5c3_Err | |
| 656 | 662 | } | |
| 657 | 663 | } | |
| 658 | 664 | if p.Both { | |
| 659 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " data-fire=\"") | |
| 665 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " data-fire=\"") | |
| 660 | 666 | if templ_7745c5c3_Err != nil { | |
| 661 | 667 | return templ_7745c5c3_Err | |
| 662 | 668 | } | |
| 663 | 669 | var templ_7745c5c3_Var28 string | |
| 664 | 670 | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(view) | |
| 665 | 671 | if templ_7745c5c3_Err != nil { | |
| 666 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 146, Col: 19} | |
| 672 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 150, Col: 19} | |
| 667 | 673 | } | |
| 668 | 674 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28) | |
| 669 | 675 | if templ_7745c5c3_Err != nil { | |
| 670 | 676 | return templ_7745c5c3_Err | |
| 671 | 677 | } | |
| 672 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\" :aria-current=\"q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false\"") | |
| 678 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\" :aria-current=\"(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false\"") | |
| 673 | 679 | if templ_7745c5c3_Err != nil { | |
| 674 | 680 | return templ_7745c5c3_Err | |
| 675 | 681 | } | |
| 676 | 682 | } | |
| 677 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, ">") | |
| 683 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, ">") | |
| 678 | 684 | if templ_7745c5c3_Err != nil { | |
| 679 | 685 | return templ_7745c5c3_Err | |
| 680 | 686 | } | |
| 681 | 687 | var templ_7745c5c3_Var29 string | |
| 682 | 688 | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(label) | |
| 683 | 689 | if templ_7745c5c3_Err != nil { | |
| 684 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 149, Col: 9} | |
| 690 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 153, Col: 9} | |
| 685 | 691 | } | |
| 686 | 692 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | |
| 687 | 693 | if templ_7745c5c3_Err != nil { | |
| 688 | 694 | return templ_7745c5c3_Err | |
| 689 | 695 | } | |
| 690 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<kbd aria-hidden=\"true\">") | |
| 696 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<kbd aria-hidden=\"true\">") | |
| 691 | 697 | if templ_7745c5c3_Err != nil { | |
| 692 | 698 | return templ_7745c5c3_Err | |
| 693 | 699 | } | |
| 694 | 700 | var templ_7745c5c3_Var30 string | |
| 695 | 701 | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(key) | |
| 696 | 702 | if templ_7745c5c3_Err != nil { | |
| 697 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 149, Col: 40} | |
| 703 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 153, Col: 40} | |
| 698 | 704 | } | |
| 699 | 705 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | |
| 700 | 706 | if templ_7745c5c3_Err != nil { | |
| 701 | 707 | return templ_7745c5c3_Err | |
| 702 | 708 | } | |
| 703 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</kbd></a>") | |
| 709 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</kbd></a>") | |
| 704 | 710 | if templ_7745c5c3_Err != nil { | |
| 705 | 711 | return templ_7745c5c3_Err | |
| 706 | 712 | } | |
| @@ -731,7 +737,7 @@ func collapseButton() templ.Component { | |||
| 731 | 737 | templ_7745c5c3_Var31 = templ.NopComponent | |
| 732 | 738 | } | |
| 733 | 739 | ctx = templ.ClearChildren(ctx) | |
| 734 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<button type=\"button\" aria-keyshortcuts=\"x\" data-js data-fire=\"collapse\" class=\"btn\"><span hx-live=\"this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'\">Collapse all</span><kbd aria-hidden=\"true\">x</kbd></button>") | |
| 740 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<button type=\"button\" aria-keyshortcuts=\"x\" data-js data-fire=\"collapse\" class=\"btn\"><span hx-live=\"this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'\">Collapse all</span><kbd aria-hidden=\"true\">x</kbd></button>") | |
| 735 | 741 | if templ_7745c5c3_Err != nil { | |
| 736 | 742 | return templ_7745c5c3_Err | |
| 737 | 743 | } | |
| @@ -763,13 +769,13 @@ func personView(pr Person) templ.Component { | |||
| 763 | 769 | var templ_7745c5c3_Var33 string | |
| 764 | 770 | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Name) | |
| 765 | 771 | if templ_7745c5c3_Err != nil { | |
| 766 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 161, Col: 10} | |
| 772 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 165, Col: 10} | |
| 767 | 773 | } | |
| 768 | 774 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | |
| 769 | 775 | if templ_7745c5c3_Err != nil { | |
| 770 | 776 | return templ_7745c5c3_Err | |
| 771 | 777 | } | |
| 772 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, " ") | |
| 778 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, " ") | |
| 773 | 779 | if templ_7745c5c3_Err != nil { | |
| 774 | 780 | return templ_7745c5c3_Err | |
| 775 | 781 | } | |
| @@ -777,59 +783,59 @@ func personView(pr Person) templ.Component { | |||
| 777 | 783 | var templ_7745c5c3_Var34 string | |
| 778 | 784 | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") | |
| 779 | 785 | if templ_7745c5c3_Err != nil { | |
| 780 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 10} | |
| 786 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 10} | |
| 781 | 787 | } | |
| 782 | 788 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | |
| 783 | 789 | if templ_7745c5c3_Err != nil { | |
| 784 | 790 | return templ_7745c5c3_Err | |
| 785 | 791 | } | |
| 786 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<time datetime=\"") | |
| 792 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "<time datetime=\"") | |
| 787 | 793 | if templ_7745c5c3_Err != nil { | |
| 788 | 794 | return templ_7745c5c3_Err | |
| 789 | 795 | } | |
| 790 | 796 | var templ_7745c5c3_Var35 string | |
| 791 | 797 | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(pr.WhenAt) | |
| 792 | 798 | if templ_7745c5c3_Err != nil { | |
| 793 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 38} | |
| 799 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 38} | |
| 794 | 800 | } | |
| 795 | 801 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35) | |
| 796 | 802 | if templ_7745c5c3_Err != nil { | |
| 797 | 803 | return templ_7745c5c3_Err | |
| 798 | 804 | } | |
| 799 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\" title=\"") | |
| 805 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\" title=\"") | |
| 800 | 806 | if templ_7745c5c3_Err != nil { | |
| 801 | 807 | return templ_7745c5c3_Err | |
| 802 | 808 | } | |
| 803 | 809 | var templ_7745c5c3_Var36 string | |
| 804 | 810 | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(pr.Abs) | |
| 805 | 811 | if templ_7745c5c3_Err != nil { | |
| 806 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 55} | |
| 812 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 55} | |
| 807 | 813 | } | |
| 808 | 814 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36) | |
| 809 | 815 | if templ_7745c5c3_Err != nil { | |
| 810 | 816 | return templ_7745c5c3_Err | |
| 811 | 817 | } | |
| 812 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\">") | |
| 818 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "\">") | |
| 813 | 819 | if templ_7745c5c3_Err != nil { | |
| 814 | 820 | return templ_7745c5c3_Err | |
| 815 | 821 | } | |
| 816 | 822 | var templ_7745c5c3_Var37 string | |
| 817 | 823 | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(pr.When) | |
| 818 | 824 | if templ_7745c5c3_Err != nil { | |
| 819 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 67} | |
| 825 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 67} | |
| 820 | 826 | } | |
| 821 | 827 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | |
| 822 | 828 | if templ_7745c5c3_Err != nil { | |
| 823 | 829 | return templ_7745c5c3_Err | |
| 824 | 830 | } | |
| 825 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</time>") | |
| 831 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</time>") | |
| 826 | 832 | if templ_7745c5c3_Err != nil { | |
| 827 | 833 | return templ_7745c5c3_Err | |
| 828 | 834 | } | |
| 829 | 835 | var templ_7745c5c3_Var38 string | |
| 830 | 836 | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + pr.Abs) | |
| 831 | 837 | if templ_7745c5c3_Err != nil { | |
| 832 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 93} | |
| 838 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 93} | |
| 833 | 839 | } | |
| 834 | 840 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | |
| 835 | 841 | if templ_7745c5c3_Err != nil { | |
| @@ -861,20 +867,20 @@ func commitRail(p CommitPage) templ.Component { | |||
| 861 | 867 | templ_7745c5c3_Var39 = templ.NopComponent | |
| 862 | 868 | } | |
| 863 | 869 | ctx = templ.ClearChildren(ctx) | |
| 864 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") | |
| 870 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") | |
| 865 | 871 | if templ_7745c5c3_Err != nil { | |
| 866 | 872 | return templ_7745c5c3_Err | |
| 867 | 873 | } | |
| 868 | 874 | var templ_7745c5c3_Var40 string | |
| 869 | 875 | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) | |
| 870 | 876 | if templ_7745c5c3_Err != nil { | |
| 871 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 169, Col: 65} | |
| 877 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 173, Col: 65} | |
| 872 | 878 | } | |
| 873 | 879 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | |
| 874 | 880 | if templ_7745c5c3_Err != nil { | |
| 875 | 881 | return templ_7745c5c3_Err | |
| 876 | 882 | } | |
| 877 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span></h2>") | |
| 883 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span></h2>") | |
| 878 | 884 | if templ_7745c5c3_Err != nil { | |
| 879 | 885 | return templ_7745c5c3_Err | |
| 880 | 886 | } | |
| @@ -882,7 +888,7 @@ func commitRail(p CommitPage) templ.Component { | |||
| 882 | 888 | if templ_7745c5c3_Err != nil { | |
| 883 | 889 | return templ_7745c5c3_Err | |
| 884 | 890 | } | |
| 885 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</section>") | |
| 891 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</section>") | |
| 886 | 892 | if templ_7745c5c3_Err != nil { | |
| 887 | 893 | return templ_7745c5c3_Err | |
| 888 | 894 | } | |
| @@ -914,230 +920,230 @@ func FileList(files []DiffFile) templ.Component { | |||
| 914 | 920 | } | |
| 915 | 921 | ctx = templ.ClearChildren(ctx) | |
| 916 | 922 | if len(files) > fileFilterMin { | |
| 917 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<div class=\"ffilter\"><label for=\"files-filter\" class=\"sr\">filter the changed files</label> <input id=\"files-filter\" type=\"search\" placeholder=\"Filter files…\" autocomplete=\"off\" data-pick=\".files > li\" hx-on:input=\"ermite.filter(this)\"></div>") | |
| 923 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<div class=\"ffilter\"><label for=\"files-filter\" class=\"sr\">filter the changed files</label> <input id=\"files-filter\" type=\"search\" placeholder=\"Filter files…\" autocomplete=\"off\" data-pick=\".files > li\" hx-on:input=\"ermite.filter(this)\"></div>") | |
| 918 | 924 | if templ_7745c5c3_Err != nil { | |
| 919 | 925 | return templ_7745c5c3_Err | |
| 920 | 926 | } | |
| 921 | 927 | } | |
| 922 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<ol class=\"files\" aria-label=\"Changed files\">") | |
| 928 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<ol class=\"files\" aria-label=\"Changed files\">") | |
| 923 | 929 | if templ_7745c5c3_Err != nil { | |
| 924 | 930 | return templ_7745c5c3_Err | |
| 925 | 931 | } | |
| 926 | 932 | for _, f := range files { | |
| 927 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<li><a href=\"") | |
| 933 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<li><a href=\"") | |
| 928 | 934 | if templ_7745c5c3_Err != nil { | |
| 929 | 935 | return templ_7745c5c3_Err | |
| 930 | 936 | } | |
| 931 | 937 | var templ_7745c5c3_Var42 templ.SafeURL | |
| 932 | 938 | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("#" + f.ID)) | |
| 933 | 939 | if templ_7745c5c3_Err != nil { | |
| 934 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 194, Col: 37} | |
| 940 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 37} | |
| 935 | 941 | } | |
| 936 | 942 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) | |
| 937 | 943 | if templ_7745c5c3_Err != nil { | |
| 938 | 944 | return templ_7745c5c3_Err | |
| 939 | 945 | } | |
| 940 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "\" title=\"") | |
| 946 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "\" title=\"") | |
| 941 | 947 | if templ_7745c5c3_Err != nil { | |
| 942 | 948 | return templ_7745c5c3_Err | |
| 943 | 949 | } | |
| 944 | 950 | var templ_7745c5c3_Var43 string | |
| 945 | 951 | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path) | |
| 946 | 952 | if templ_7745c5c3_Err != nil { | |
| 947 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 195, Col: 19} | |
| 953 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 19} | |
| 948 | 954 | } | |
| 949 | 955 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43) | |
| 950 | 956 | if templ_7745c5c3_Err != nil { | |
| 951 | 957 | return templ_7745c5c3_Err | |
| 952 | 958 | } | |
| 953 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "\" hx-on:click=\"(window.ermiteMR?.openFile || ermite.openFile)(this.hash.slice(1))\"><span class=\"st\" data-st=\"") | |
| 959 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\" hx-on:click=\"(window.ermiteMR?.openFile || ermite.openFile)(this.hash.slice(1))\"><span class=\"st\" data-st=\"") | |
| 954 | 960 | if templ_7745c5c3_Err != nil { | |
| 955 | 961 | return templ_7745c5c3_Err | |
| 956 | 962 | } | |
| 957 | 963 | var templ_7745c5c3_Var44 string | |
| 958 | 964 | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Status) | |
| 959 | 965 | if templ_7745c5c3_Err != nil { | |
| 960 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 40} | |
| 966 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 202, Col: 40} | |
| 961 | 967 | } | |
| 962 | 968 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44) | |
| 963 | 969 | if templ_7745c5c3_Err != nil { | |
| 964 | 970 | return templ_7745c5c3_Err | |
| 965 | 971 | } | |
| 966 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\" title=\"") | |
| 972 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\" title=\"") | |
| 967 | 973 | if templ_7745c5c3_Err != nil { | |
| 968 | 974 | return templ_7745c5c3_Err | |
| 969 | 975 | } | |
| 970 | 976 | var templ_7745c5c3_Var45 string | |
| 971 | 977 | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(statusName(f.Status)) | |
| 972 | 978 | if templ_7745c5c3_Err != nil { | |
| 973 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 71} | |
| 979 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 202, Col: 71} | |
| 974 | 980 | } | |
| 975 | 981 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45) | |
| 976 | 982 | if templ_7745c5c3_Err != nil { | |
| 977 | 983 | return templ_7745c5c3_Err | |
| 978 | 984 | } | |
| 979 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\">") | |
| 985 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "\">") | |
| 980 | 986 | if templ_7745c5c3_Err != nil { | |
| 981 | 987 | return templ_7745c5c3_Err | |
| 982 | 988 | } | |
| 983 | 989 | var templ_7745c5c3_Var46 string | |
| 984 | 990 | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(f.Status) | |
| 985 | 991 | if templ_7745c5c3_Err != nil { | |
| 986 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 84} | |
| 992 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 202, Col: 84} | |
| 987 | 993 | } | |
| 988 | 994 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | |
| 989 | 995 | if templ_7745c5c3_Err != nil { | |
| 990 | 996 | return templ_7745c5c3_Err | |
| 991 | 997 | } | |
| 992 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</span> <span class=\"nm\"><span class=\"p\">") | |
| 998 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</span> <span class=\"nm\"><span class=\"p\">") | |
| 993 | 999 | if templ_7745c5c3_Err != nil { | |
| 994 | 1000 | return templ_7745c5c3_Err | |
| 995 | 1001 | } | |
| 996 | 1002 | var templ_7745c5c3_Var47 string | |
| 997 | 1003 | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) | |
| 998 | 1004 | if templ_7745c5c3_Err != nil { | |
| 999 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 46} | |
| 1005 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 46} | |
| 1000 | 1006 | } | |
| 1001 | 1007 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | |
| 1002 | 1008 | if templ_7745c5c3_Err != nil { | |
| 1003 | 1009 | return templ_7745c5c3_Err | |
| 1004 | 1010 | } | |
| 1005 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</span>") | |
| 1011 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</span>") | |
| 1006 | 1012 | if templ_7745c5c3_Err != nil { | |
| 1007 | 1013 | return templ_7745c5c3_Err | |
| 1008 | 1014 | } | |
| 1009 | 1015 | var templ_7745c5c3_Var48 string | |
| 1010 | 1016 | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 1011 | 1017 | if templ_7745c5c3_Err != nil { | |
| 1012 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 60} | |
| 1018 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 60} | |
| 1013 | 1019 | } | |
| 1014 | 1020 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) | |
| 1015 | 1021 | if templ_7745c5c3_Err != nil { | |
| 1016 | 1022 | return templ_7745c5c3_Err | |
| 1017 | 1023 | } | |
| 1018 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "<span class=\"d\"><bdi>") | |
| 1024 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<span class=\"d\"><bdi>") | |
| 1019 | 1025 | if templ_7745c5c3_Err != nil { | |
| 1020 | 1026 | return templ_7745c5c3_Err | |
| 1021 | 1027 | } | |
| 1022 | 1028 | var templ_7745c5c3_Var49 string | |
| 1023 | 1029 | templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(f.Dir) | |
| 1024 | 1030 | if templ_7745c5c3_Err != nil { | |
| 1025 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 90} | |
| 1031 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 90} | |
| 1026 | 1032 | } | |
| 1027 | 1033 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49)) | |
| 1028 | 1034 | if templ_7745c5c3_Err != nil { | |
| 1029 | 1035 | return templ_7745c5c3_Err | |
| 1030 | 1036 | } | |
| 1031 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</bdi></span></span> ") | |
| 1037 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "</bdi></span></span> ") | |
| 1032 | 1038 | if templ_7745c5c3_Err != nil { | |
| 1033 | 1039 | return templ_7745c5c3_Err | |
| 1034 | 1040 | } | |
| 1035 | 1041 | if f.OpenNotes > 0 { | |
| 1036 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<span class=\"cn\" title=\"") | |
| 1042 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "<span class=\"cn\" title=\"") | |
| 1037 | 1043 | if templ_7745c5c3_Err != nil { | |
| 1038 | 1044 | return templ_7745c5c3_Err | |
| 1039 | 1045 | } | |
| 1040 | 1046 | var templ_7745c5c3_Var50 string | |
| 1041 | 1047 | templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.ResolveAttributeValue(plural(f.OpenNotes, "open comment", "open comments")) | |
| 1042 | 1048 | if templ_7745c5c3_Err != nil { | |
| 1043 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 201, Col: 83} | |
| 1049 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 205, Col: 83} | |
| 1044 | 1050 | } | |
| 1045 | 1051 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var50) | |
| 1046 | 1052 | if templ_7745c5c3_Err != nil { | |
| 1047 | 1053 | return templ_7745c5c3_Err | |
| 1048 | 1054 | } | |
| 1049 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\">") | |
| 1055 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "\">") | |
| 1050 | 1056 | if templ_7745c5c3_Err != nil { | |
| 1051 | 1057 | return templ_7745c5c3_Err | |
| 1052 | 1058 | } | |
| 1053 | 1059 | var templ_7745c5c3_Var51 string | |
| 1054 | 1060 | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.OpenNotes)) | |
| 1055 | 1061 | if templ_7745c5c3_Err != nil { | |
| 1056 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 201, Col: 105} | |
| 1062 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 205, Col: 105} | |
| 1057 | 1063 | } | |
| 1058 | 1064 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) | |
| 1059 | 1065 | if templ_7745c5c3_Err != nil { | |
| 1060 | 1066 | return templ_7745c5c3_Err | |
| 1061 | 1067 | } | |
| 1062 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</span> ") | |
| 1068 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</span> ") | |
| 1063 | 1069 | if templ_7745c5c3_Err != nil { | |
| 1064 | 1070 | return templ_7745c5c3_Err | |
| 1065 | 1071 | } | |
| 1066 | 1072 | } else if f.Notes > 0 { | |
| 1067 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<span class=\"cn done\" title=\"") | |
| 1073 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "<span class=\"cn done\" title=\"") | |
| 1068 | 1074 | if templ_7745c5c3_Err != nil { | |
| 1069 | 1075 | return templ_7745c5c3_Err | |
| 1070 | 1076 | } | |
| 1071 | 1077 | var templ_7745c5c3_Var52 string | |
| 1072 | 1078 | templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.ResolveAttributeValue(plural(f.Notes, "resolved comment", "resolved comments")) | |
| 1073 | 1079 | if templ_7745c5c3_Err != nil { | |
| 1074 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 92} | |
| 1080 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 207, Col: 92} | |
| 1075 | 1081 | } | |
| 1076 | 1082 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var52) | |
| 1077 | 1083 | if templ_7745c5c3_Err != nil { | |
| 1078 | 1084 | return templ_7745c5c3_Err | |
| 1079 | 1085 | } | |
| 1080 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "\">") | |
| 1086 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "\">") | |
| 1081 | 1087 | if templ_7745c5c3_Err != nil { | |
| 1082 | 1088 | return templ_7745c5c3_Err | |
| 1083 | 1089 | } | |
| 1084 | 1090 | var templ_7745c5c3_Var53 string | |
| 1085 | 1091 | templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Notes)) | |
| 1086 | 1092 | if templ_7745c5c3_Err != nil { | |
| 1087 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 110} | |
| 1093 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 207, Col: 110} | |
| 1088 | 1094 | } | |
| 1089 | 1095 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) | |
| 1090 | 1096 | if templ_7745c5c3_Err != nil { | |
| 1091 | 1097 | return templ_7745c5c3_Err | |
| 1092 | 1098 | } | |
| 1093 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "</span> ") | |
| 1099 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "</span> ") | |
| 1094 | 1100 | if templ_7745c5c3_Err != nil { | |
| 1095 | 1101 | return templ_7745c5c3_Err | |
| 1096 | 1102 | } | |
| 1097 | 1103 | } | |
| 1098 | 1104 | if f.Bin { | |
| 1099 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<span class=\"n mute\">bin</span>") | |
| 1105 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<span class=\"n mute\">bin</span>") | |
| 1100 | 1106 | if templ_7745c5c3_Err != nil { | |
| 1101 | 1107 | return templ_7745c5c3_Err | |
| 1102 | 1108 | } | |
| 1103 | 1109 | } else { | |
| 1104 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<span class=\"n\"><span class=\"plus\">+") | |
| 1110 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<span class=\"n\"><span class=\"plus\">+") | |
| 1105 | 1111 | if templ_7745c5c3_Err != nil { | |
| 1106 | 1112 | return templ_7745c5c3_Err | |
| 1107 | 1113 | } | |
| 1108 | 1114 | var templ_7745c5c3_Var54 string | |
| 1109 | 1115 | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Add)) | |
| 1110 | 1116 | if templ_7745c5c3_Err != nil { | |
| 1111 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 208, Col: 55} | |
| 1117 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 212, Col: 55} | |
| 1112 | 1118 | } | |
| 1113 | 1119 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) | |
| 1114 | 1120 | if templ_7745c5c3_Err != nil { | |
| 1115 | 1121 | return templ_7745c5c3_Err | |
| 1116 | 1122 | } | |
| 1117 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</span> <span class=\"minus\">-") | |
| 1123 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</span> <span class=\"minus\">-") | |
| 1118 | 1124 | if templ_7745c5c3_Err != nil { | |
| 1119 | 1125 | return templ_7745c5c3_Err | |
| 1120 | 1126 | } | |
| 1121 | 1127 | var templ_7745c5c3_Var55 string | |
| 1122 | 1128 | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Del)) | |
| 1123 | 1129 | if templ_7745c5c3_Err != nil { | |
| 1124 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 208, Col: 99} | |
| 1130 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 212, Col: 99} | |
| 1125 | 1131 | } | |
| 1126 | 1132 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) | |
| 1127 | 1133 | if templ_7745c5c3_Err != nil { | |
| 1128 | 1134 | return templ_7745c5c3_Err | |
| 1129 | 1135 | } | |
| 1130 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</span></span>") | |
| 1136 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "</span></span>") | |
| 1131 | 1137 | if templ_7745c5c3_Err != nil { | |
| 1132 | 1138 | return templ_7745c5c3_Err | |
| 1133 | 1139 | } | |
| 1134 | 1140 | } | |
| 1135 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "</a></li>") | |
| 1141 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "</a></li>") | |
| 1136 | 1142 | if templ_7745c5c3_Err != nil { | |
| 1137 | 1143 | return templ_7745c5c3_Err | |
| 1138 | 1144 | } | |
| 1139 | 1145 | } | |
| 1140 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "</ol>") | |
| 1146 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "</ol>") | |
| 1141 | 1147 | if templ_7745c5c3_Err != nil { | |
| 1142 | 1148 | return templ_7745c5c3_Err | |
| 1143 | 1149 | } | |
| @@ -1175,7 +1181,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1175 | 1181 | if templ_7745c5c3_Err != nil { | |
| 1176 | 1182 | return templ_7745c5c3_Err | |
| 1177 | 1183 | } | |
| 1178 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "<details class=\"") | |
| 1184 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "<details class=\"") | |
| 1179 | 1185 | if templ_7745c5c3_Err != nil { | |
| 1180 | 1186 | return templ_7745c5c3_Err | |
| 1181 | 1187 | } | |
| @@ -1188,134 +1194,134 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1188 | 1194 | if templ_7745c5c3_Err != nil { | |
| 1189 | 1195 | return templ_7745c5c3_Err | |
| 1190 | 1196 | } | |
| 1191 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "\" id=\"") | |
| 1197 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\" id=\"") | |
| 1192 | 1198 | if templ_7745c5c3_Err != nil { | |
| 1193 | 1199 | return templ_7745c5c3_Err | |
| 1194 | 1200 | } | |
| 1195 | 1201 | var templ_7745c5c3_Var59 string | |
| 1196 | 1202 | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.ID) | |
| 1197 | 1203 | if templ_7745c5c3_Err != nil { | |
| 1198 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 223, Col: 11} | |
| 1204 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 227, Col: 11} | |
| 1199 | 1205 | } | |
| 1200 | 1206 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var59) | |
| 1201 | 1207 | if templ_7745c5c3_Err != nil { | |
| 1202 | 1208 | return templ_7745c5c3_Err | |
| 1203 | 1209 | } | |
| 1204 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\" data-file=\"") | |
| 1210 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\" data-file=\"") | |
| 1205 | 1211 | if templ_7745c5c3_Err != nil { | |
| 1206 | 1212 | return templ_7745c5c3_Err | |
| 1207 | 1213 | } | |
| 1208 | 1214 | var templ_7745c5c3_Var60 string | |
| 1209 | 1215 | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Key) | |
| 1210 | 1216 | if templ_7745c5c3_Err != nil { | |
| 1211 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 224, Col: 19} | |
| 1217 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 228, Col: 19} | |
| 1212 | 1218 | } | |
| 1213 | 1219 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60) | |
| 1214 | 1220 | if templ_7745c5c3_Err != nil { | |
| 1215 | 1221 | return templ_7745c5c3_Err | |
| 1216 | 1222 | } | |
| 1217 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\"") | |
| 1223 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "\"") | |
| 1218 | 1224 | if templ_7745c5c3_Err != nil { | |
| 1219 | 1225 | return templ_7745c5c3_Err | |
| 1220 | 1226 | } | |
| 1221 | 1227 | if f.Open { | |
| 1222 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, " open") | |
| 1228 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, " open") | |
| 1223 | 1229 | if templ_7745c5c3_Err != nil { | |
| 1224 | 1230 | return templ_7745c5c3_Err | |
| 1225 | 1231 | } | |
| 1226 | 1232 | } | |
| 1227 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "><summary><span class=\"st\">") | |
| 1233 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "><summary><span class=\"st\">") | |
| 1228 | 1234 | if templ_7745c5c3_Err != nil { | |
| 1229 | 1235 | return templ_7745c5c3_Err | |
| 1230 | 1236 | } | |
| 1231 | 1237 | var templ_7745c5c3_Var61 string | |
| 1232 | 1238 | templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.JoinStringErrs(f.Status) | |
| 1233 | 1239 | if templ_7745c5c3_Err != nil { | |
| 1234 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 30} | |
| 1240 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 30} | |
| 1235 | 1241 | } | |
| 1236 | 1242 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var61)) | |
| 1237 | 1243 | if templ_7745c5c3_Err != nil { | |
| 1238 | 1244 | return templ_7745c5c3_Err | |
| 1239 | 1245 | } | |
| 1240 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "</span>") | |
| 1246 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "</span>") | |
| 1241 | 1247 | if templ_7745c5c3_Err != nil { | |
| 1242 | 1248 | return templ_7745c5c3_Err | |
| 1243 | 1249 | } | |
| 1244 | 1250 | var templ_7745c5c3_Var62 string | |
| 1245 | 1251 | templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 1246 | 1252 | if templ_7745c5c3_Err != nil { | |
| 1247 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 44} | |
| 1253 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 44} | |
| 1248 | 1254 | } | |
| 1249 | 1255 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62)) | |
| 1250 | 1256 | if templ_7745c5c3_Err != nil { | |
| 1251 | 1257 | return templ_7745c5c3_Err | |
| 1252 | 1258 | } | |
| 1253 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "<span class=\"p\">") | |
| 1259 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "<span class=\"p\">") | |
| 1254 | 1260 | if templ_7745c5c3_Err != nil { | |
| 1255 | 1261 | return templ_7745c5c3_Err | |
| 1256 | 1262 | } | |
| 1257 | 1263 | var templ_7745c5c3_Var63 string | |
| 1258 | 1264 | templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(f.Path) | |
| 1259 | 1265 | if templ_7745c5c3_Err != nil { | |
| 1260 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 70} | |
| 1266 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 70} | |
| 1261 | 1267 | } | |
| 1262 | 1268 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) | |
| 1263 | 1269 | if templ_7745c5c3_Err != nil { | |
| 1264 | 1270 | return templ_7745c5c3_Err | |
| 1265 | 1271 | } | |
| 1266 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "</span>") | |
| 1272 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "</span>") | |
| 1267 | 1273 | if templ_7745c5c3_Err != nil { | |
| 1268 | 1274 | return templ_7745c5c3_Err | |
| 1269 | 1275 | } | |
| 1270 | 1276 | var templ_7745c5c3_Var64 string | |
| 1271 | 1277 | templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 1272 | 1278 | if templ_7745c5c3_Err != nil { | |
| 1273 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 84} | |
| 1279 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 84} | |
| 1274 | 1280 | } | |
| 1275 | 1281 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64)) | |
| 1276 | 1282 | if templ_7745c5c3_Err != nil { | |
| 1277 | 1283 | return templ_7745c5c3_Err | |
| 1278 | 1284 | } | |
| 1279 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "<span class=\"plus\">+") | |
| 1285 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "<span class=\"plus\">+") | |
| 1280 | 1286 | if templ_7745c5c3_Err != nil { | |
| 1281 | 1287 | return templ_7745c5c3_Err | |
| 1282 | 1288 | } | |
| 1283 | 1289 | var templ_7745c5c3_Var65 string | |
| 1284 | 1290 | templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Add)) | |
| 1285 | 1291 | if templ_7745c5c3_Err != nil { | |
| 1286 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 119} | |
| 1292 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 119} | |
| 1287 | 1293 | } | |
| 1288 | 1294 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) | |
| 1289 | 1295 | if templ_7745c5c3_Err != nil { | |
| 1290 | 1296 | return templ_7745c5c3_Err | |
| 1291 | 1297 | } | |
| 1292 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "</span>") | |
| 1298 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "</span>") | |
| 1293 | 1299 | if templ_7745c5c3_Err != nil { | |
| 1294 | 1300 | return templ_7745c5c3_Err | |
| 1295 | 1301 | } | |
| 1296 | 1302 | var templ_7745c5c3_Var66 string | |
| 1297 | 1303 | templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 1298 | 1304 | if templ_7745c5c3_Err != nil { | |
| 1299 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 133} | |
| 1305 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 133} | |
| 1300 | 1306 | } | |
| 1301 | 1307 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) | |
| 1302 | 1308 | if templ_7745c5c3_Err != nil { | |
| 1303 | 1309 | return templ_7745c5c3_Err | |
| 1304 | 1310 | } | |
| 1305 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "<span class=\"minus\">-") | |
| 1311 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "<span class=\"minus\">-") | |
| 1306 | 1312 | if templ_7745c5c3_Err != nil { | |
| 1307 | 1313 | return templ_7745c5c3_Err | |
| 1308 | 1314 | } | |
| 1309 | 1315 | var templ_7745c5c3_Var67 string | |
| 1310 | 1316 | templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Del)) | |
| 1311 | 1317 | if templ_7745c5c3_Err != nil { | |
| 1312 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 169} | |
| 1318 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 169} | |
| 1313 | 1319 | } | |
| 1314 | 1320 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) | |
| 1315 | 1321 | if templ_7745c5c3_Err != nil { | |
| 1316 | 1322 | return templ_7745c5c3_Err | |
| 1317 | 1323 | } | |
| 1318 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "</span> ") | |
| 1324 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "</span> ") | |
| 1319 | 1325 | if templ_7745c5c3_Err != nil { | |
| 1320 | 1326 | return templ_7745c5c3_Err | |
| 1321 | 1327 | } | |
| @@ -1323,36 +1329,36 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1323 | 1329 | var templ_7745c5c3_Var68 string | |
| 1324 | 1330 | templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | |
| 1325 | 1331 | if templ_7745c5c3_Err != nil { | |
| 1326 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 232, Col: 9} | |
| 1332 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 236, Col: 9} | |
| 1327 | 1333 | } | |
| 1328 | 1334 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) | |
| 1329 | 1335 | if templ_7745c5c3_Err != nil { | |
| 1330 | 1336 | return templ_7745c5c3_Err | |
| 1331 | 1337 | } | |
| 1332 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "<span class=\"note\">") | |
| 1338 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "<span class=\"note\">") | |
| 1333 | 1339 | if templ_7745c5c3_Err != nil { | |
| 1334 | 1340 | return templ_7745c5c3_Err | |
| 1335 | 1341 | } | |
| 1336 | 1342 | var templ_7745c5c3_Var69 string | |
| 1337 | 1343 | templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note) | |
| 1338 | 1344 | if templ_7745c5c3_Err != nil { | |
| 1339 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 232, Col: 38} | |
| 1345 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 236, Col: 38} | |
| 1340 | 1346 | } | |
| 1341 | 1347 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) | |
| 1342 | 1348 | if templ_7745c5c3_Err != nil { | |
| 1343 | 1349 | return templ_7745c5c3_Err | |
| 1344 | 1350 | } | |
| 1345 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "</span>") | |
| 1351 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "</span>") | |
| 1346 | 1352 | if templ_7745c5c3_Err != nil { | |
| 1347 | 1353 | return templ_7745c5c3_Err | |
| 1348 | 1354 | } | |
| 1349 | 1355 | } | |
| 1350 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "</summary> ") | |
| 1356 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "</summary> ") | |
| 1351 | 1357 | if templ_7745c5c3_Err != nil { | |
| 1352 | 1358 | return templ_7745c5c3_Err | |
| 1353 | 1359 | } | |
| 1354 | 1360 | if f.Lazy { | |
| 1355 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, " ") | |
| 1361 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, " ") | |
| 1356 | 1362 | if templ_7745c5c3_Err != nil { | |
| 1357 | 1363 | return templ_7745c5c3_Err | |
| 1358 | 1364 | } | |
| @@ -1361,7 +1367,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1361 | 1367 | if templ_7745c5c3_Err != nil { | |
| 1362 | 1368 | return templ_7745c5c3_Err | |
| 1363 | 1369 | } | |
| 1364 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, "<div class=\"") | |
| 1370 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "<div class=\"") | |
| 1365 | 1371 | if templ_7745c5c3_Err != nil { | |
| 1366 | 1372 | return templ_7745c5c3_Err | |
| 1367 | 1373 | } | |
| @@ -1374,74 +1380,74 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1374 | 1380 | if templ_7745c5c3_Err != nil { | |
| 1375 | 1381 | return templ_7745c5c3_Err | |
| 1376 | 1382 | } | |
| 1377 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "\" data-src=\"") | |
| 1383 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "\" data-src=\"") | |
| 1378 | 1384 | if templ_7745c5c3_Err != nil { | |
| 1379 | 1385 | return templ_7745c5c3_Err | |
| 1380 | 1386 | } | |
| 1381 | 1387 | var templ_7745c5c3_Var72 string | |
| 1382 | 1388 | templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Src) | |
| 1383 | 1389 | if templ_7745c5c3_Err != nil { | |
| 1384 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 239, Col: 69} | |
| 1390 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 243, Col: 69} | |
| 1385 | 1391 | } | |
| 1386 | 1392 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var72) | |
| 1387 | 1393 | if templ_7745c5c3_Err != nil { | |
| 1388 | 1394 | return templ_7745c5c3_Err | |
| 1389 | 1395 | } | |
| 1390 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "\" data-notes=\"") | |
| 1396 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "\" data-notes=\"") | |
| 1391 | 1397 | if templ_7745c5c3_Err != nil { | |
| 1392 | 1398 | return templ_7745c5c3_Err | |
| 1393 | 1399 | } | |
| 1394 | 1400 | var templ_7745c5c3_Var73 string | |
| 1395 | 1401 | templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Comments) | |
| 1396 | 1402 | if templ_7745c5c3_Err != nil { | |
| 1397 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 239, Col: 95} | |
| 1403 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 243, Col: 95} | |
| 1398 | 1404 | } | |
| 1399 | 1405 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var73) | |
| 1400 | 1406 | if templ_7745c5c3_Err != nil { | |
| 1401 | 1407 | return templ_7745c5c3_Err | |
| 1402 | 1408 | } | |
| 1403 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "\"><a href=\"") | |
| 1409 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "\"><a href=\"") | |
| 1404 | 1410 | if templ_7745c5c3_Err != nil { | |
| 1405 | 1411 | return templ_7745c5c3_Err | |
| 1406 | 1412 | } | |
| 1407 | 1413 | var templ_7745c5c3_Var74 templ.SafeURL | |
| 1408 | 1414 | templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("?from=" + itoa(f.From) + "#" + f.ID)) | |
| 1409 | 1415 | if templ_7745c5c3_Err != nil { | |
| 1410 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 240, Col: 65} | |
| 1416 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 244, Col: 65} | |
| 1411 | 1417 | } | |
| 1412 | 1418 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) | |
| 1413 | 1419 | if templ_7745c5c3_Err != nil { | |
| 1414 | 1420 | return templ_7745c5c3_Err | |
| 1415 | 1421 | } | |
| 1416 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "\">show this file</a></div>") | |
| 1422 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "\">show this file</a></div>") | |
| 1417 | 1423 | if templ_7745c5c3_Err != nil { | |
| 1418 | 1424 | return templ_7745c5c3_Err | |
| 1419 | 1425 | } | |
| 1420 | 1426 | } else if len(f.Hunks) > 0 { | |
| 1421 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "<div class=\"dscroll\">") | |
| 1427 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "<div class=\"dscroll\">") | |
| 1422 | 1428 | if templ_7745c5c3_Err != nil { | |
| 1423 | 1429 | return templ_7745c5c3_Err | |
| 1424 | 1430 | } | |
| 1425 | 1431 | if p.ShowUnified { | |
| 1426 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "<table class=\"dt uni\" aria-label=\"") | |
| 1432 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "<table class=\"dt uni\" aria-label=\"") | |
| 1427 | 1433 | if templ_7745c5c3_Err != nil { | |
| 1428 | 1434 | return templ_7745c5c3_Err | |
| 1429 | 1435 | } | |
| 1430 | 1436 | var templ_7745c5c3_Var75 string | |
| 1431 | 1437 | templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path + ", unified") | |
| 1432 | 1438 | if templ_7745c5c3_Err != nil { | |
| 1433 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 245, Col: 60} | |
| 1439 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 249, Col: 60} | |
| 1434 | 1440 | } | |
| 1435 | 1441 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var75) | |
| 1436 | 1442 | if templ_7745c5c3_Err != nil { | |
| 1437 | 1443 | return templ_7745c5c3_Err | |
| 1438 | 1444 | } | |
| 1439 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "\">") | |
| 1445 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "\">") | |
| 1440 | 1446 | if templ_7745c5c3_Err != nil { | |
| 1441 | 1447 | return templ_7745c5c3_Err | |
| 1442 | 1448 | } | |
| 1443 | 1449 | for _, h := range f.Hunks { | |
| 1444 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "<tbody>") | |
| 1450 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "<tbody>") | |
| 1445 | 1451 | if templ_7745c5c3_Err != nil { | |
| 1446 | 1452 | return templ_7745c5c3_Err | |
| 1447 | 1453 | } | |
| @@ -1451,20 +1457,20 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1451 | 1457 | return templ_7745c5c3_Err | |
| 1452 | 1458 | } | |
| 1453 | 1459 | } | |
| 1454 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "<tr class=\"hunk\"><td colspan=\"4\">") | |
| 1460 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "<tr class=\"hunk\"><td colspan=\"4\">") | |
| 1455 | 1461 | if templ_7745c5c3_Err != nil { | |
| 1456 | 1462 | return templ_7745c5c3_Err | |
| 1457 | 1463 | } | |
| 1458 | 1464 | var templ_7745c5c3_Var76 string | |
| 1459 | 1465 | templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header) | |
| 1460 | 1466 | if templ_7745c5c3_Err != nil { | |
| 1461 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 251, Col: 51} | |
| 1467 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 255, Col: 51} | |
| 1462 | 1468 | } | |
| 1463 | 1469 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) | |
| 1464 | 1470 | if templ_7745c5c3_Err != nil { | |
| 1465 | 1471 | return templ_7745c5c3_Err | |
| 1466 | 1472 | } | |
| 1467 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "</td></tr>") | |
| 1473 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "</td></tr>") | |
| 1468 | 1474 | if templ_7745c5c3_Err != nil { | |
| 1469 | 1475 | return templ_7745c5c3_Err | |
| 1470 | 1476 | } | |
| @@ -1474,7 +1480,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1474 | 1480 | if templ_7745c5c3_Err != nil { | |
| 1475 | 1481 | return templ_7745c5c3_Err | |
| 1476 | 1482 | } | |
| 1477 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "<tr class=\"") | |
| 1483 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "<tr class=\"") | |
| 1478 | 1484 | if templ_7745c5c3_Err != nil { | |
| 1479 | 1485 | return templ_7745c5c3_Err | |
| 1480 | 1486 | } | |
| @@ -1487,7 +1493,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1487 | 1493 | if templ_7745c5c3_Err != nil { | |
| 1488 | 1494 | return templ_7745c5c3_Err | |
| 1489 | 1495 | } | |
| 1490 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "\"><td class=\"ln\">") | |
| 1496 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "\"><td class=\"ln\">") | |
| 1491 | 1497 | if templ_7745c5c3_Err != nil { | |
| 1492 | 1498 | return templ_7745c5c3_Err | |
| 1493 | 1499 | } | |
| @@ -1495,7 +1501,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1495 | 1501 | if templ_7745c5c3_Err != nil { | |
| 1496 | 1502 | return templ_7745c5c3_Err | |
| 1497 | 1503 | } | |
| 1498 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "</td><td class=\"ln\">") | |
| 1504 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "</td><td class=\"ln\">") | |
| 1499 | 1505 | if templ_7745c5c3_Err != nil { | |
| 1500 | 1506 | return templ_7745c5c3_Err | |
| 1501 | 1507 | } | |
| @@ -1503,20 +1509,20 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1503 | 1509 | if templ_7745c5c3_Err != nil { | |
| 1504 | 1510 | return templ_7745c5c3_Err | |
| 1505 | 1511 | } | |
| 1506 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "</td><td class=\"m\">") | |
| 1512 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "</td><td class=\"m\">") | |
| 1507 | 1513 | if templ_7745c5c3_Err != nil { | |
| 1508 | 1514 | return templ_7745c5c3_Err | |
| 1509 | 1515 | } | |
| 1510 | 1516 | var templ_7745c5c3_Var79 string | |
| 1511 | 1517 | templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | |
| 1512 | 1518 | if templ_7745c5c3_Err != nil { | |
| 1513 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 256, Col: 33} | |
| 1519 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 260, Col: 33} | |
| 1514 | 1520 | } | |
| 1515 | 1521 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) | |
| 1516 | 1522 | if templ_7745c5c3_Err != nil { | |
| 1517 | 1523 | return templ_7745c5c3_Err | |
| 1518 | 1524 | } | |
| 1519 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "</td><td class=\"tx chroma\">") | |
| 1525 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "</td><td class=\"tx chroma\">") | |
| 1520 | 1526 | if templ_7745c5c3_Err != nil { | |
| 1521 | 1527 | return templ_7745c5c3_Err | |
| 1522 | 1528 | } | |
| @@ -1524,12 +1530,12 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1524 | 1530 | if templ_7745c5c3_Err != nil { | |
| 1525 | 1531 | return templ_7745c5c3_Err | |
| 1526 | 1532 | } | |
| 1527 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "</td></tr>") | |
| 1533 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "</td></tr>") | |
| 1528 | 1534 | if templ_7745c5c3_Err != nil { | |
| 1529 | 1535 | return templ_7745c5c3_Err | |
| 1530 | 1536 | } | |
| 1531 | 1537 | if len(ln.Notes) > 0 || ln.Form != nil { | |
| 1532 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "<tr class=\"fnote\"><td colspan=\"3\"></td><td>") | |
| 1538 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "<tr class=\"fnote\"><td colspan=\"3\"></td><td>") | |
| 1533 | 1539 | if templ_7745c5c3_Err != nil { | |
| 1534 | 1540 | return templ_7745c5c3_Err | |
| 1535 | 1541 | } | |
| @@ -1537,19 +1543,19 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1537 | 1543 | if templ_7745c5c3_Err != nil { | |
| 1538 | 1544 | return templ_7745c5c3_Err | |
| 1539 | 1545 | } | |
| 1540 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "</td></tr>") | |
| 1546 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "</td></tr>") | |
| 1541 | 1547 | if templ_7745c5c3_Err != nil { | |
| 1542 | 1548 | return templ_7745c5c3_Err | |
| 1543 | 1549 | } | |
| 1544 | 1550 | } | |
| 1545 | 1551 | } | |
| 1546 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "</tbody> ") | |
| 1552 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "</tbody> ") | |
| 1547 | 1553 | if templ_7745c5c3_Err != nil { | |
| 1548 | 1554 | return templ_7745c5c3_Err | |
| 1549 | 1555 | } | |
| 1550 | 1556 | } | |
| 1551 | 1557 | if f.Tail != nil { | |
| 1552 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "<tbody>") | |
| 1558 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "<tbody>") | |
| 1553 | 1559 | if templ_7745c5c3_Err != nil { | |
| 1554 | 1560 | return templ_7745c5c3_Err | |
| 1555 | 1561 | } | |
| @@ -1557,36 +1563,36 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1557 | 1563 | if templ_7745c5c3_Err != nil { | |
| 1558 | 1564 | return templ_7745c5c3_Err | |
| 1559 | 1565 | } | |
| 1560 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "</tbody>") | |
| 1566 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "</tbody>") | |
| 1561 | 1567 | if templ_7745c5c3_Err != nil { | |
| 1562 | 1568 | return templ_7745c5c3_Err | |
| 1563 | 1569 | } | |
| 1564 | 1570 | } | |
| 1565 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "</table>") | |
| 1571 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "</table>") | |
| 1566 | 1572 | if templ_7745c5c3_Err != nil { | |
| 1567 | 1573 | return templ_7745c5c3_Err | |
| 1568 | 1574 | } | |
| 1569 | 1575 | } | |
| 1570 | 1576 | if p.ShowSplit { | |
| 1571 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "<table class=\"dt spl\" aria-label=\"") | |
| 1577 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "<table class=\"dt spl\" aria-label=\"") | |
| 1572 | 1578 | if templ_7745c5c3_Err != nil { | |
| 1573 | 1579 | return templ_7745c5c3_Err | |
| 1574 | 1580 | } | |
| 1575 | 1581 | var templ_7745c5c3_Var80 string | |
| 1576 | 1582 | templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path + ", split") | |
| 1577 | 1583 | if templ_7745c5c3_Err != nil { | |
| 1578 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 276, Col: 58} | |
| 1584 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 280, Col: 58} | |
| 1579 | 1585 | } | |
| 1580 | 1586 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var80) | |
| 1581 | 1587 | if templ_7745c5c3_Err != nil { | |
| 1582 | 1588 | return templ_7745c5c3_Err | |
| 1583 | 1589 | } | |
| 1584 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "\"><colgroup><col class=\"c-ln\"><col class=\"c-m\"><col><col class=\"c-ln\"><col class=\"c-m\"><col></colgroup> ") | |
| 1590 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "\"><colgroup><col class=\"c-ln\"><col class=\"c-m\"><col><col class=\"c-ln\"><col class=\"c-m\"><col></colgroup> ") | |
| 1585 | 1591 | if templ_7745c5c3_Err != nil { | |
| 1586 | 1592 | return templ_7745c5c3_Err | |
| 1587 | 1593 | } | |
| 1588 | 1594 | for _, h := range f.Hunks { | |
| 1589 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "<tbody>") | |
| 1595 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "<tbody>") | |
| 1590 | 1596 | if templ_7745c5c3_Err != nil { | |
| 1591 | 1597 | return templ_7745c5c3_Err | |
| 1592 | 1598 | } | |
| @@ -1596,25 +1602,25 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1596 | 1602 | return templ_7745c5c3_Err | |
| 1597 | 1603 | } | |
| 1598 | 1604 | } | |
| 1599 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "<tr class=\"hunk\"><td colspan=\"6\">") | |
| 1605 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "<tr class=\"hunk\"><td colspan=\"6\">") | |
| 1600 | 1606 | if templ_7745c5c3_Err != nil { | |
| 1601 | 1607 | return templ_7745c5c3_Err | |
| 1602 | 1608 | } | |
| 1603 | 1609 | var templ_7745c5c3_Var81 string | |
| 1604 | 1610 | templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header) | |
| 1605 | 1611 | if templ_7745c5c3_Err != nil { | |
| 1606 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 283, Col: 51} | |
| 1612 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 287, Col: 51} | |
| 1607 | 1613 | } | |
| 1608 | 1614 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) | |
| 1609 | 1615 | if templ_7745c5c3_Err != nil { | |
| 1610 | 1616 | return templ_7745c5c3_Err | |
| 1611 | 1617 | } | |
| 1612 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "</td></tr>") | |
| 1618 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "</td></tr>") | |
| 1613 | 1619 | if templ_7745c5c3_Err != nil { | |
| 1614 | 1620 | return templ_7745c5c3_Err | |
| 1615 | 1621 | } | |
| 1616 | 1622 | for _, row := range h.Split { | |
| 1617 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "<tr>") | |
| 1623 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "<tr>") | |
| 1618 | 1624 | if templ_7745c5c3_Err != nil { | |
| 1619 | 1625 | return templ_7745c5c3_Err | |
| 1620 | 1626 | } | |
| @@ -1626,12 +1632,12 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1626 | 1632 | if templ_7745c5c3_Err != nil { | |
| 1627 | 1633 | return templ_7745c5c3_Err | |
| 1628 | 1634 | } | |
| 1629 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "</tr>") | |
| 1635 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "</tr>") | |
| 1630 | 1636 | if templ_7745c5c3_Err != nil { | |
| 1631 | 1637 | return templ_7745c5c3_Err | |
| 1632 | 1638 | } | |
| 1633 | 1639 | if notes, form := row.Notes(), row.Form(); len(notes) > 0 || form != nil { | |
| 1634 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "<tr class=\"fnote\"><td colspan=\"6\">") | |
| 1640 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "<tr class=\"fnote\"><td colspan=\"6\">") | |
| 1635 | 1641 | if templ_7745c5c3_Err != nil { | |
| 1636 | 1642 | return templ_7745c5c3_Err | |
| 1637 | 1643 | } | |
| @@ -1639,19 +1645,19 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1639 | 1645 | if templ_7745c5c3_Err != nil { | |
| 1640 | 1646 | return templ_7745c5c3_Err | |
| 1641 | 1647 | } | |
| 1642 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "</td></tr>") | |
| 1648 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "</td></tr>") | |
| 1643 | 1649 | if templ_7745c5c3_Err != nil { | |
| 1644 | 1650 | return templ_7745c5c3_Err | |
| 1645 | 1651 | } | |
| 1646 | 1652 | } | |
| 1647 | 1653 | } | |
| 1648 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "</tbody> ") | |
| 1654 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "</tbody> ") | |
| 1649 | 1655 | if templ_7745c5c3_Err != nil { | |
| 1650 | 1656 | return templ_7745c5c3_Err | |
| 1651 | 1657 | } | |
| 1652 | 1658 | } | |
| 1653 | 1659 | if f.Tail != nil { | |
| 1654 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "<tbody>") | |
| 1660 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "<tbody>") | |
| 1655 | 1661 | if templ_7745c5c3_Err != nil { | |
| 1656 | 1662 | return templ_7745c5c3_Err | |
| 1657 | 1663 | } | |
| @@ -1659,22 +1665,22 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1659 | 1665 | if templ_7745c5c3_Err != nil { | |
| 1660 | 1666 | return templ_7745c5c3_Err | |
| 1661 | 1667 | } | |
| 1662 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "</tbody>") | |
| 1668 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "</tbody>") | |
| 1663 | 1669 | if templ_7745c5c3_Err != nil { | |
| 1664 | 1670 | return templ_7745c5c3_Err | |
| 1665 | 1671 | } | |
| 1666 | 1672 | } | |
| 1667 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "</table>") | |
| 1673 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "</table>") | |
| 1668 | 1674 | if templ_7745c5c3_Err != nil { | |
| 1669 | 1675 | return templ_7745c5c3_Err | |
| 1670 | 1676 | } | |
| 1671 | 1677 | } | |
| 1672 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "</div>") | |
| 1678 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "</div>") | |
| 1673 | 1679 | if templ_7745c5c3_Err != nil { | |
| 1674 | 1680 | return templ_7745c5c3_Err | |
| 1675 | 1681 | } | |
| 1676 | 1682 | } else { | |
| 1677 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "<p class=\"note pad\">") | |
| 1683 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "<p class=\"note pad\">") | |
| 1678 | 1684 | if templ_7745c5c3_Err != nil { | |
| 1679 | 1685 | return templ_7745c5c3_Err | |
| 1680 | 1686 | } | |
| @@ -1682,25 +1688,25 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1682 | 1688 | var templ_7745c5c3_Var82 string | |
| 1683 | 1689 | templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note) | |
| 1684 | 1690 | if templ_7745c5c3_Err != nil { | |
| 1685 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 308, Col: 13} | |
| 1691 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 312, Col: 13} | |
| 1686 | 1692 | } | |
| 1687 | 1693 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) | |
| 1688 | 1694 | if templ_7745c5c3_Err != nil { | |
| 1689 | 1695 | return templ_7745c5c3_Err | |
| 1690 | 1696 | } | |
| 1691 | 1697 | } else { | |
| 1692 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "no textual change.") | |
| 1698 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "no textual change.") | |
| 1693 | 1699 | if templ_7745c5c3_Err != nil { | |
| 1694 | 1700 | return templ_7745c5c3_Err | |
| 1695 | 1701 | } | |
| 1696 | 1702 | } | |
| 1697 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "</p>") | |
| 1703 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "</p>") | |
| 1698 | 1704 | if templ_7745c5c3_Err != nil { | |
| 1699 | 1705 | return templ_7745c5c3_Err | |
| 1700 | 1706 | } | |
| 1701 | 1707 | } | |
| 1702 | 1708 | if len(f.Loose) > 0 { | |
| 1703 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "<div class=\"dloose\">") | |
| 1709 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "<div class=\"dloose\">") | |
| 1704 | 1710 | if templ_7745c5c3_Err != nil { | |
| 1705 | 1711 | return templ_7745c5c3_Err | |
| 1706 | 1712 | } | |
| @@ -1710,12 +1716,12 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||
| 1710 | 1716 | return templ_7745c5c3_Err | |
| 1711 | 1717 | } | |
| 1712 | 1718 | } | |
| 1713 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "</div>") | |
| 1719 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "</div>") | |
| 1714 | 1720 | if templ_7745c5c3_Err != nil { | |
| 1715 | 1721 | return templ_7745c5c3_Err | |
| 1716 | 1722 | } | |
| 1717 | 1723 | } | |
| 1718 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "</details>") | |
| 1724 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "</details>") | |
| 1719 | 1725 | if templ_7745c5c3_Err != nil { | |
| 1720 | 1726 | return templ_7745c5c3_Err | |
| 1721 | 1727 | } | |
| @@ -1779,7 +1785,7 @@ func MRFilesMoved() templ.Component { | |||
| 1779 | 1785 | templ_7745c5c3_Var84 = templ.NopComponent | |
| 1780 | 1786 | } | |
| 1781 | 1787 | ctx = templ.ClearChildren(ctx) | |
| 1782 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "<p class=\"notice\" data-moved>this merge request changed since the page was loaded — <a href=\"\">reload</a></p>") | |
| 1788 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "<p class=\"notice\" data-moved>this merge request changed since the page was loaded — <a href=\"\">reload</a></p>") | |
| 1783 | 1789 | if templ_7745c5c3_Err != nil { | |
| 1784 | 1790 | return templ_7745c5c3_Err | |
| 1785 | 1791 | } | |
| @@ -1811,59 +1817,59 @@ func gapRow(g DiffGap, cols int) templ.Component { | |||
| 1811 | 1817 | templ_7745c5c3_Var85 = templ.NopComponent | |
| 1812 | 1818 | } | |
| 1813 | 1819 | ctx = templ.ClearChildren(ctx) | |
| 1814 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "<tr class=\"gap\" data-js data-gap=\"") | |
| 1820 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "<tr class=\"gap\" data-js data-gap=\"") | |
| 1815 | 1821 | if templ_7745c5c3_Err != nil { | |
| 1816 | 1822 | return templ_7745c5c3_Err | |
| 1817 | 1823 | } | |
| 1818 | 1824 | var templ_7745c5c3_Var86 string | |
| 1819 | 1825 | templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.ResolveAttributeValue(g.Key) | |
| 1820 | 1826 | if templ_7745c5c3_Err != nil { | |
| 1821 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 342, Col: 41} | |
| 1827 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 346, Col: 41} | |
| 1822 | 1828 | } | |
| 1823 | 1829 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var86) | |
| 1824 | 1830 | if templ_7745c5c3_Err != nil { | |
| 1825 | 1831 | return templ_7745c5c3_Err | |
| 1826 | 1832 | } | |
| 1827 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "\"><td colspan=\"") | |
| 1833 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "\"><td colspan=\"") | |
| 1828 | 1834 | if templ_7745c5c3_Err != nil { | |
| 1829 | 1835 | return templ_7745c5c3_Err | |
| 1830 | 1836 | } | |
| 1831 | 1837 | var templ_7745c5c3_Var87 string | |
| 1832 | 1838 | templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa(cols)) | |
| 1833 | 1839 | if templ_7745c5c3_Err != nil { | |
| 1834 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 343, Col: 26} | |
| 1840 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 347, Col: 26} | |
| 1835 | 1841 | } | |
| 1836 | 1842 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var87) | |
| 1837 | 1843 | if templ_7745c5c3_Err != nil { | |
| 1838 | 1844 | return templ_7745c5c3_Err | |
| 1839 | 1845 | } | |
| 1840 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "\"><button type=\"button\" data-src=\"") | |
| 1846 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "\"><button type=\"button\" data-src=\"") | |
| 1841 | 1847 | if templ_7745c5c3_Err != nil { | |
| 1842 | 1848 | return templ_7745c5c3_Err | |
| 1843 | 1849 | } | |
| 1844 | 1850 | var templ_7745c5c3_Var88 string | |
| 1845 | 1851 | templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.ResolveAttributeValue(g.Src) | |
| 1846 | 1852 | if templ_7745c5c3_Err != nil { | |
| 1847 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 344, Col: 41} | |
| 1853 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 348, Col: 41} | |
| 1848 | 1854 | } | |
| 1849 | 1855 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var88) | |
| 1850 | 1856 | if templ_7745c5c3_Err != nil { | |
| 1851 | 1857 | return templ_7745c5c3_Err | |
| 1852 | 1858 | } | |
| 1853 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "\"><span aria-hidden=\"true\">⋯</span> ") | |
| 1859 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "\"><span aria-hidden=\"true\">⋯</span> ") | |
| 1854 | 1860 | if templ_7745c5c3_Err != nil { | |
| 1855 | 1861 | return templ_7745c5c3_Err | |
| 1856 | 1862 | } | |
| 1857 | 1863 | var templ_7745c5c3_Var89 string | |
| 1858 | 1864 | templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(g.Label()) | |
| 1859 | 1865 | if templ_7745c5c3_Err != nil { | |
| 1860 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 345, Col: 51} | |
| 1866 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 349, Col: 51} | |
| 1861 | 1867 | } | |
| 1862 | 1868 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) | |
| 1863 | 1869 | if templ_7745c5c3_Err != nil { | |
| 1864 | 1870 | return templ_7745c5c3_Err | |
| 1865 | 1871 | } | |
| 1866 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "</button></td></tr>") | |
| 1872 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "</button></td></tr>") | |
| 1867 | 1873 | if templ_7745c5c3_Err != nil { | |
| 1868 | 1874 | return templ_7745c5c3_Err | |
| 1869 | 1875 | } | |
| @@ -1894,51 +1900,51 @@ func DiffContext(c ContextRows) templ.Component { | |||
| 1894 | 1900 | templ_7745c5c3_Var90 = templ.NopComponent | |
| 1895 | 1901 | } | |
| 1896 | 1902 | ctx = templ.ClearChildren(ctx) | |
| 1897 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "<table><tbody data-for=\"uni\">") | |
| 1903 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "<table><tbody data-for=\"uni\">") | |
| 1898 | 1904 | if templ_7745c5c3_Err != nil { | |
| 1899 | 1905 | return templ_7745c5c3_Err | |
| 1900 | 1906 | } | |
| 1901 | 1907 | for _, ln := range c.Lines { | |
| 1902 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "<tr class=\"ctx\"><td class=\"ln\">") | |
| 1908 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "<tr class=\"ctx\"><td class=\"ln\">") | |
| 1903 | 1909 | if templ_7745c5c3_Err != nil { | |
| 1904 | 1910 | return templ_7745c5c3_Err | |
| 1905 | 1911 | } | |
| 1906 | 1912 | var templ_7745c5c3_Var91 string | |
| 1907 | 1913 | templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Old) | |
| 1908 | 1914 | if templ_7745c5c3_Err != nil { | |
| 1909 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 358, Col: 28} | |
| 1915 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 362, Col: 28} | |
| 1910 | 1916 | } | |
| 1911 | 1917 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91)) | |
| 1912 | 1918 | if templ_7745c5c3_Err != nil { | |
| 1913 | 1919 | return templ_7745c5c3_Err | |
| 1914 | 1920 | } | |
| 1915 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "</td><td class=\"ln\">") | |
| 1921 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "</td><td class=\"ln\">") | |
| 1916 | 1922 | if templ_7745c5c3_Err != nil { | |
| 1917 | 1923 | return templ_7745c5c3_Err | |
| 1918 | 1924 | } | |
| 1919 | 1925 | var templ_7745c5c3_Var92 string | |
| 1920 | 1926 | templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(ln.New) | |
| 1921 | 1927 | if templ_7745c5c3_Err != nil { | |
| 1922 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 359, Col: 28} | |
| 1928 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 363, Col: 28} | |
| 1923 | 1929 | } | |
| 1924 | 1930 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92)) | |
| 1925 | 1931 | if templ_7745c5c3_Err != nil { | |
| 1926 | 1932 | return templ_7745c5c3_Err | |
| 1927 | 1933 | } | |
| 1928 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "</td><td class=\"m\">") | |
| 1934 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "</td><td class=\"m\">") | |
| 1929 | 1935 | if templ_7745c5c3_Err != nil { | |
| 1930 | 1936 | return templ_7745c5c3_Err | |
| 1931 | 1937 | } | |
| 1932 | 1938 | var templ_7745c5c3_Var93 string | |
| 1933 | 1939 | templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | |
| 1934 | 1940 | if templ_7745c5c3_Err != nil { | |
| 1935 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 360, Col: 28} | |
| 1941 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 364, Col: 28} | |
| 1936 | 1942 | } | |
| 1937 | 1943 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93)) | |
| 1938 | 1944 | if templ_7745c5c3_Err != nil { | |
| 1939 | 1945 | return templ_7745c5c3_Err | |
| 1940 | 1946 | } | |
| 1941 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "</td><td class=\"tx chroma\">") | |
| 1947 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "</td><td class=\"tx chroma\">") | |
| 1942 | 1948 | if templ_7745c5c3_Err != nil { | |
| 1943 | 1949 | return templ_7745c5c3_Err | |
| 1944 | 1950 | } | |
| @@ -1946,7 +1952,7 @@ func DiffContext(c ContextRows) templ.Component { | |||
| 1946 | 1952 | if templ_7745c5c3_Err != nil { | |
| 1947 | 1953 | return templ_7745c5c3_Err | |
| 1948 | 1954 | } | |
| 1949 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "</td></tr>") | |
| 1955 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "</td></tr>") | |
| 1950 | 1956 | if templ_7745c5c3_Err != nil { | |
| 1951 | 1957 | return templ_7745c5c3_Err | |
| 1952 | 1958 | } | |
| @@ -1957,12 +1963,12 @@ func DiffContext(c ContextRows) templ.Component { | |||
| 1957 | 1963 | return templ_7745c5c3_Err | |
| 1958 | 1964 | } | |
| 1959 | 1965 | } | |
| 1960 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "</tbody> <tbody data-for=\"spl\">") | |
| 1966 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "</tbody> <tbody data-for=\"spl\">") | |
| 1961 | 1967 | if templ_7745c5c3_Err != nil { | |
| 1962 | 1968 | return templ_7745c5c3_Err | |
| 1963 | 1969 | } | |
| 1964 | 1970 | for i := range c.Lines { | |
| 1965 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "<tr>") | |
| 1971 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "<tr>") | |
| 1966 | 1972 | if templ_7745c5c3_Err != nil { | |
| 1967 | 1973 | return templ_7745c5c3_Err | |
| 1968 | 1974 | } | |
| @@ -1974,7 +1980,7 @@ func DiffContext(c ContextRows) templ.Component { | |||
| 1974 | 1980 | if templ_7745c5c3_Err != nil { | |
| 1975 | 1981 | return templ_7745c5c3_Err | |
| 1976 | 1982 | } | |
| 1977 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "</tr>") | |
| 1983 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "</tr>") | |
| 1978 | 1984 | if templ_7745c5c3_Err != nil { | |
| 1979 | 1985 | return templ_7745c5c3_Err | |
| 1980 | 1986 | } | |
| @@ -1985,7 +1991,7 @@ func DiffContext(c ContextRows) templ.Component { | |||
| 1985 | 1991 | return templ_7745c5c3_Err | |
| 1986 | 1992 | } | |
| 1987 | 1993 | } | |
| 1988 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "</tbody></table>") | |
| 1994 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "</tbody></table>") | |
| 1989 | 1995 | if templ_7745c5c3_Err != nil { | |
| 1990 | 1996 | return templ_7745c5c3_Err | |
| 1991 | 1997 | } | |
| @@ -2017,7 +2023,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2017 | 2023 | } | |
| 2018 | 2024 | ctx = templ.ClearChildren(ctx) | |
| 2019 | 2025 | if ln == nil { | |
| 2020 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "<td class=\"ln none\"></td><td class=\"m none\"></td><td class=\"tx none\"></td>") | |
| 2026 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "<td class=\"ln none\"></td><td class=\"m none\"></td><td class=\"tx none\"></td>") | |
| 2021 | 2027 | if templ_7745c5c3_Err != nil { | |
| 2022 | 2028 | return templ_7745c5c3_Err | |
| 2023 | 2029 | } | |
| @@ -2027,7 +2033,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2027 | 2033 | if templ_7745c5c3_Err != nil { | |
| 2028 | 2034 | return templ_7745c5c3_Err | |
| 2029 | 2035 | } | |
| 2030 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "<td class=\"") | |
| 2036 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "<td class=\"") | |
| 2031 | 2037 | if templ_7745c5c3_Err != nil { | |
| 2032 | 2038 | return templ_7745c5c3_Err | |
| 2033 | 2039 | } | |
| @@ -2040,7 +2046,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2040 | 2046 | if templ_7745c5c3_Err != nil { | |
| 2041 | 2047 | return templ_7745c5c3_Err | |
| 2042 | 2048 | } | |
| 2043 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "\">") | |
| 2049 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "\">") | |
| 2044 | 2050 | if templ_7745c5c3_Err != nil { | |
| 2045 | 2051 | return templ_7745c5c3_Err | |
| 2046 | 2052 | } | |
| @@ -2055,7 +2061,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2055 | 2061 | return templ_7745c5c3_Err | |
| 2056 | 2062 | } | |
| 2057 | 2063 | } | |
| 2058 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "</td>") | |
| 2064 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "</td>") | |
| 2059 | 2065 | if templ_7745c5c3_Err != nil { | |
| 2060 | 2066 | return templ_7745c5c3_Err | |
| 2061 | 2067 | } | |
| @@ -2064,7 +2070,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2064 | 2070 | if templ_7745c5c3_Err != nil { | |
| 2065 | 2071 | return templ_7745c5c3_Err | |
| 2066 | 2072 | } | |
| 2067 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "<td class=\"") | |
| 2073 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "<td class=\"") | |
| 2068 | 2074 | if templ_7745c5c3_Err != nil { | |
| 2069 | 2075 | return templ_7745c5c3_Err | |
| 2070 | 2076 | } | |
| @@ -2077,20 +2083,20 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2077 | 2083 | if templ_7745c5c3_Err != nil { | |
| 2078 | 2084 | return templ_7745c5c3_Err | |
| 2079 | 2085 | } | |
| 2080 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "\">") | |
| 2086 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "\">") | |
| 2081 | 2087 | if templ_7745c5c3_Err != nil { | |
| 2082 | 2088 | return templ_7745c5c3_Err | |
| 2083 | 2089 | } | |
| 2084 | 2090 | var templ_7745c5c3_Var99 string | |
| 2085 | 2091 | templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | |
| 2086 | 2092 | if templ_7745c5c3_Err != nil { | |
| 2087 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 397, Col: 68} | |
| 2093 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 401, Col: 68} | |
| 2088 | 2094 | } | |
| 2089 | 2095 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) | |
| 2090 | 2096 | if templ_7745c5c3_Err != nil { | |
| 2091 | 2097 | return templ_7745c5c3_Err | |
| 2092 | 2098 | } | |
| 2093 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "</td>") | |
| 2099 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "</td>") | |
| 2094 | 2100 | if templ_7745c5c3_Err != nil { | |
| 2095 | 2101 | return templ_7745c5c3_Err | |
| 2096 | 2102 | } | |
| @@ -2099,7 +2105,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2099 | 2105 | if templ_7745c5c3_Err != nil { | |
| 2100 | 2106 | return templ_7745c5c3_Err | |
| 2101 | 2107 | } | |
| 2102 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "<td class=\"") | |
| 2108 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "<td class=\"") | |
| 2103 | 2109 | if templ_7745c5c3_Err != nil { | |
| 2104 | 2110 | return templ_7745c5c3_Err | |
| 2105 | 2111 | } | |
| @@ -2112,7 +2118,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2112 | 2118 | if templ_7745c5c3_Err != nil { | |
| 2113 | 2119 | return templ_7745c5c3_Err | |
| 2114 | 2120 | } | |
| 2115 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "\">") | |
| 2121 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "\">") | |
| 2116 | 2122 | if templ_7745c5c3_Err != nil { | |
| 2117 | 2123 | return templ_7745c5c3_Err | |
| 2118 | 2124 | } | |
| @@ -2120,7 +2126,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||
| 2120 | 2126 | if templ_7745c5c3_Err != nil { | |
| 2121 | 2127 | return templ_7745c5c3_Err | |
| 2122 | 2128 | } | |
| 2123 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "</td>") | |
| 2129 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "</td>") | |
| 2124 | 2130 | if templ_7745c5c3_Err != nil { | |
| 2125 | 2131 | return templ_7745c5c3_Err | |
| 2126 | 2132 | } | |
| @@ -2153,33 +2159,33 @@ func gutter(n, href string) templ.Component { | |||
| 2153 | 2159 | } | |
| 2154 | 2160 | ctx = templ.ClearChildren(ctx) | |
| 2155 | 2161 | if href != "" { | |
| 2156 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "<a href=\"") | |
| 2162 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "<a href=\"") | |
| 2157 | 2163 | if templ_7745c5c3_Err != nil { | |
| 2158 | 2164 | return templ_7745c5c3_Err | |
| 2159 | 2165 | } | |
| 2160 | 2166 | var templ_7745c5c3_Var103 templ.SafeURL | |
| 2161 | 2167 | templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) | |
| 2162 | 2168 | if templ_7745c5c3_Err != nil { | |
| 2163 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 406, Col: 31} | |
| 2169 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 410, Col: 31} | |
| 2164 | 2170 | } | |
| 2165 | 2171 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) | |
| 2166 | 2172 | if templ_7745c5c3_Err != nil { | |
| 2167 | 2173 | return templ_7745c5c3_Err | |
| 2168 | 2174 | } | |
| 2169 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "\" title=\"comment on this line\">") | |
| 2175 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "\" title=\"comment on this line\">") | |
| 2170 | 2176 | if templ_7745c5c3_Err != nil { | |
| 2171 | 2177 | return templ_7745c5c3_Err | |
| 2172 | 2178 | } | |
| 2173 | 2179 | var templ_7745c5c3_Var104 string | |
| 2174 | 2180 | templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(n) | |
| 2175 | 2181 | if templ_7745c5c3_Err != nil { | |
| 2176 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 406, Col: 66} | |
| 2182 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 410, Col: 66} | |
| 2177 | 2183 | } | |
| 2178 | 2184 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) | |
| 2179 | 2185 | if templ_7745c5c3_Err != nil { | |
| 2180 | 2186 | return templ_7745c5c3_Err | |
| 2181 | 2187 | } | |
| 2182 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "</a>") | |
| 2188 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "</a>") | |
| 2183 | 2189 | if templ_7745c5c3_Err != nil { | |
| 2184 | 2190 | return templ_7745c5c3_Err | |
| 2185 | 2191 | } | |
| @@ -2187,7 +2193,7 @@ func gutter(n, href string) templ.Component { | |||
| 2187 | 2193 | var templ_7745c5c3_Var105 string | |
| 2188 | 2194 | templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(n) | |
| 2189 | 2195 | if templ_7745c5c3_Err != nil { | |
| 2190 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 408, Col: 5} | |
| 2196 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 412, Col: 5} | |
| 2191 | 2197 | } | |
| 2192 | 2198 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var105)) | |
| 2193 | 2199 | if templ_7745c5c3_Err != nil { | |
| @@ -530,14 +530,14 @@ func diffViewMenu(p DiffView) templ.Component { | |||||
| 530 | return templ_7745c5c3_Err | 530 | return templ_7745c5c3_Err | ||
| 531 | } | 531 | } | ||
| 532 | if p.Both { | 532 | if p.Both { | ||
| 533 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span hx-live=\"this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'\">") | 533 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span hx-live=\"this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'\">") |
| 534 | if templ_7745c5c3_Err != nil { | 534 | if templ_7745c5c3_Err != nil { | ||
| 535 | return templ_7745c5c3_Err | 535 | return templ_7745c5c3_Err | ||
| 536 | } | 536 | } | ||
| 537 | var templ_7745c5c3_Var22 string | 537 | var templ_7745c5c3_Var22 string | ||
| 538 | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(viewLabel(p.View)) | 538 | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(viewLabel(p.View)) | ||
| 539 | if templ_7745c5c3_Err != nil { | 539 | if templ_7745c5c3_Err != nil { | ||
| 540 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 120, Col: 122} | 540 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 120, Col: 168} |
| 541 | } | 541 | } | ||
| 542 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | 542 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | ||
| 543 | if templ_7745c5c3_Err != nil { | 543 | if templ_7745c5c3_Err != nil { | ||
| @@ -649,58 +649,64 @@ func viewLink(p DiffView, view, label, key, href string) templ.Component { | |||||
| 649 | if templ_7745c5c3_Err != nil { | 649 | if templ_7745c5c3_Err != nil { | ||
| 650 | return templ_7745c5c3_Err | 650 | return templ_7745c5c3_Err | ||
| 651 | } | 651 | } | ||
| 652 | + | if view == "split" { | |||
| 653 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " :aria-disabled=\"q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false\" :title=\"q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'\"") | |||
| 654 | + | if templ_7745c5c3_Err != nil { | |||
| 655 | + | return templ_7745c5c3_Err | |||
| 656 | + | } | |||
| 657 | + | } | |||
| 652 | if p.View == view { | 658 | if p.View == view { | ||
| 653 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " aria-current=\"true\"") | 659 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " aria-current=\"true\"") |
| 654 | if templ_7745c5c3_Err != nil { | 660 | if templ_7745c5c3_Err != nil { | ||
| 655 | return templ_7745c5c3_Err | 661 | return templ_7745c5c3_Err | ||
| 656 | } | 662 | } | ||
| 657 | } | 663 | } | ||
| 658 | if p.Both { | 664 | if p.Both { | ||
| 659 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " data-fire=\"") | 665 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " data-fire=\"") |
| 660 | if templ_7745c5c3_Err != nil { | 666 | if templ_7745c5c3_Err != nil { | ||
| 661 | return templ_7745c5c3_Err | 667 | return templ_7745c5c3_Err | ||
| 662 | } | 668 | } | ||
| 663 | var templ_7745c5c3_Var28 string | 669 | var templ_7745c5c3_Var28 string | ||
| 664 | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(view) | 670 | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(view) | ||
| 665 | if templ_7745c5c3_Err != nil { | 671 | if templ_7745c5c3_Err != nil { | ||
| 666 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 146, Col: 19} | 672 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 150, Col: 19} |
| 667 | } | 673 | } | ||
| 668 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28) | 674 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28) | ||
| 669 | if templ_7745c5c3_Err != nil { | 675 | if templ_7745c5c3_Err != nil { | ||
| 670 | return templ_7745c5c3_Err | 676 | return templ_7745c5c3_Err | ||
| 671 | } | 677 | } | ||
| 672 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\" :aria-current=\"q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false\"") | 678 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\" :aria-current=\"(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false\"") |
| 673 | if templ_7745c5c3_Err != nil { | 679 | if templ_7745c5c3_Err != nil { | ||
| 674 | return templ_7745c5c3_Err | 680 | return templ_7745c5c3_Err | ||
| 675 | } | 681 | } | ||
| 676 | } | 682 | } | ||
| 677 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, ">") | 683 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, ">") |
| 678 | if templ_7745c5c3_Err != nil { | 684 | if templ_7745c5c3_Err != nil { | ||
| 679 | return templ_7745c5c3_Err | 685 | return templ_7745c5c3_Err | ||
| 680 | } | 686 | } | ||
| 681 | var templ_7745c5c3_Var29 string | 687 | var templ_7745c5c3_Var29 string | ||
| 682 | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(label) | 688 | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(label) | ||
| 683 | if templ_7745c5c3_Err != nil { | 689 | if templ_7745c5c3_Err != nil { | ||
| 684 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 149, Col: 9} | 690 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 153, Col: 9} |
| 685 | } | 691 | } | ||
| 686 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | 692 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | ||
| 687 | if templ_7745c5c3_Err != nil { | 693 | if templ_7745c5c3_Err != nil { | ||
| 688 | return templ_7745c5c3_Err | 694 | return templ_7745c5c3_Err | ||
| 689 | } | 695 | } | ||
| 690 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<kbd aria-hidden=\"true\">") | 696 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<kbd aria-hidden=\"true\">") |
| 691 | if templ_7745c5c3_Err != nil { | 697 | if templ_7745c5c3_Err != nil { | ||
| 692 | return templ_7745c5c3_Err | 698 | return templ_7745c5c3_Err | ||
| 693 | } | 699 | } | ||
| 694 | var templ_7745c5c3_Var30 string | 700 | var templ_7745c5c3_Var30 string | ||
| 695 | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(key) | 701 | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(key) | ||
| 696 | if templ_7745c5c3_Err != nil { | 702 | if templ_7745c5c3_Err != nil { | ||
| 697 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 149, Col: 40} | 703 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 153, Col: 40} |
| 698 | } | 704 | } | ||
| 699 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | 705 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | ||
| 700 | if templ_7745c5c3_Err != nil { | 706 | if templ_7745c5c3_Err != nil { | ||
| 701 | return templ_7745c5c3_Err | 707 | return templ_7745c5c3_Err | ||
| 702 | } | 708 | } | ||
| 703 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</kbd></a>") | 709 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</kbd></a>") |
| 704 | if templ_7745c5c3_Err != nil { | 710 | if templ_7745c5c3_Err != nil { | ||
| 705 | return templ_7745c5c3_Err | 711 | return templ_7745c5c3_Err | ||
| 706 | } | 712 | } | ||
| @@ -731,7 +737,7 @@ func collapseButton() templ.Component { | |||||
| 731 | templ_7745c5c3_Var31 = templ.NopComponent | 737 | templ_7745c5c3_Var31 = templ.NopComponent | ||
| 732 | } | 738 | } | ||
| 733 | ctx = templ.ClearChildren(ctx) | 739 | ctx = templ.ClearChildren(ctx) | ||
| 734 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<button type=\"button\" aria-keyshortcuts=\"x\" data-js data-fire=\"collapse\" class=\"btn\"><span hx-live=\"this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'\">Collapse all</span><kbd aria-hidden=\"true\">x</kbd></button>") | 740 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<button type=\"button\" aria-keyshortcuts=\"x\" data-js data-fire=\"collapse\" class=\"btn\"><span hx-live=\"this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'\">Collapse all</span><kbd aria-hidden=\"true\">x</kbd></button>") |
| 735 | if templ_7745c5c3_Err != nil { | 741 | if templ_7745c5c3_Err != nil { | ||
| 736 | return templ_7745c5c3_Err | 742 | return templ_7745c5c3_Err | ||
| 737 | } | 743 | } | ||
| @@ -763,13 +769,13 @@ func personView(pr Person) templ.Component { | |||||
| 763 | var templ_7745c5c3_Var33 string | 769 | var templ_7745c5c3_Var33 string | ||
| 764 | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Name) | 770 | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(pr.Name) | ||
| 765 | if templ_7745c5c3_Err != nil { | 771 | if templ_7745c5c3_Err != nil { | ||
| 766 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 161, Col: 10} | 772 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 165, Col: 10} |
| 767 | } | 773 | } | ||
| 768 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | 774 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | ||
| 769 | if templ_7745c5c3_Err != nil { | 775 | if templ_7745c5c3_Err != nil { | ||
| 770 | return templ_7745c5c3_Err | 776 | return templ_7745c5c3_Err | ||
| 771 | } | 777 | } | ||
| 772 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, " ") | 778 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, " ") |
| 773 | if templ_7745c5c3_Err != nil { | 779 | if templ_7745c5c3_Err != nil { | ||
| 774 | return templ_7745c5c3_Err | 780 | return templ_7745c5c3_Err | ||
| 775 | } | 781 | } | ||
| @@ -777,59 +783,59 @@ func personView(pr Person) templ.Component { | |||||
| 777 | var templ_7745c5c3_Var34 string | 783 | var templ_7745c5c3_Var34 string | ||
| 778 | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") | 784 | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(" · ") | ||
| 779 | if templ_7745c5c3_Err != nil { | 785 | if templ_7745c5c3_Err != nil { | ||
| 780 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 10} | 786 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 10} |
| 781 | } | 787 | } | ||
| 782 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | 788 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | ||
| 783 | if templ_7745c5c3_Err != nil { | 789 | if templ_7745c5c3_Err != nil { | ||
| 784 | return templ_7745c5c3_Err | 790 | return templ_7745c5c3_Err | ||
| 785 | } | 791 | } | ||
| 786 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<time datetime=\"") | 792 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "<time datetime=\"") |
| 787 | if templ_7745c5c3_Err != nil { | 793 | if templ_7745c5c3_Err != nil { | ||
| 788 | return templ_7745c5c3_Err | 794 | return templ_7745c5c3_Err | ||
| 789 | } | 795 | } | ||
| 790 | var templ_7745c5c3_Var35 string | 796 | var templ_7745c5c3_Var35 string | ||
| 791 | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(pr.WhenAt) | 797 | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(pr.WhenAt) | ||
| 792 | if templ_7745c5c3_Err != nil { | 798 | if templ_7745c5c3_Err != nil { | ||
| 793 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 38} | 799 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 38} |
| 794 | } | 800 | } | ||
| 795 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35) | 801 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35) | ||
| 796 | if templ_7745c5c3_Err != nil { | 802 | if templ_7745c5c3_Err != nil { | ||
| 797 | return templ_7745c5c3_Err | 803 | return templ_7745c5c3_Err | ||
| 798 | } | 804 | } | ||
| 799 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\" title=\"") | 805 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\" title=\"") |
| 800 | if templ_7745c5c3_Err != nil { | 806 | if templ_7745c5c3_Err != nil { | ||
| 801 | return templ_7745c5c3_Err | 807 | return templ_7745c5c3_Err | ||
| 802 | } | 808 | } | ||
| 803 | var templ_7745c5c3_Var36 string | 809 | var templ_7745c5c3_Var36 string | ||
| 804 | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(pr.Abs) | 810 | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(pr.Abs) | ||
| 805 | if templ_7745c5c3_Err != nil { | 811 | if templ_7745c5c3_Err != nil { | ||
| 806 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 55} | 812 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 55} |
| 807 | } | 813 | } | ||
| 808 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36) | 814 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36) | ||
| 809 | if templ_7745c5c3_Err != nil { | 815 | if templ_7745c5c3_Err != nil { | ||
| 810 | return templ_7745c5c3_Err | 816 | return templ_7745c5c3_Err | ||
| 811 | } | 817 | } | ||
| 812 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "\">") | 818 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "\">") |
| 813 | if templ_7745c5c3_Err != nil { | 819 | if templ_7745c5c3_Err != nil { | ||
| 814 | return templ_7745c5c3_Err | 820 | return templ_7745c5c3_Err | ||
| 815 | } | 821 | } | ||
| 816 | var templ_7745c5c3_Var37 string | 822 | var templ_7745c5c3_Var37 string | ||
| 817 | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(pr.When) | 823 | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(pr.When) | ||
| 818 | if templ_7745c5c3_Err != nil { | 824 | if templ_7745c5c3_Err != nil { | ||
| 819 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 67} | 825 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 67} |
| 820 | } | 826 | } | ||
| 821 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | 827 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | ||
| 822 | if templ_7745c5c3_Err != nil { | 828 | if templ_7745c5c3_Err != nil { | ||
| 823 | return templ_7745c5c3_Err | 829 | return templ_7745c5c3_Err | ||
| 824 | } | 830 | } | ||
| 825 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</time>") | 831 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</time>") |
| 826 | if templ_7745c5c3_Err != nil { | 832 | if templ_7745c5c3_Err != nil { | ||
| 827 | return templ_7745c5c3_Err | 833 | return templ_7745c5c3_Err | ||
| 828 | } | 834 | } | ||
| 829 | var templ_7745c5c3_Var38 string | 835 | var templ_7745c5c3_Var38 string | ||
| 830 | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + pr.Abs) | 836 | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(" · " + pr.Abs) | ||
| 831 | if templ_7745c5c3_Err != nil { | 837 | if templ_7745c5c3_Err != nil { | ||
| 832 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 163, Col: 93} | 838 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 167, Col: 93} |
| 833 | } | 839 | } | ||
| 834 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | 840 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | ||
| 835 | if templ_7745c5c3_Err != nil { | 841 | if templ_7745c5c3_Err != nil { | ||
| @@ -861,20 +867,20 @@ func commitRail(p CommitPage) templ.Component { | |||||
| 861 | templ_7745c5c3_Var39 = templ.NopComponent | 867 | templ_7745c5c3_Var39 = templ.NopComponent | ||
| 862 | } | 868 | } | ||
| 863 | ctx = templ.ClearChildren(ctx) | 869 | ctx = templ.ClearChildren(ctx) | ||
| 864 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") | 870 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "<section aria-labelledby=\"r-files\"><h2 id=\"r-files\">Files <span class=\"count\">") |
| 865 | if templ_7745c5c3_Err != nil { | 871 | if templ_7745c5c3_Err != nil { | ||
| 866 | return templ_7745c5c3_Err | 872 | return templ_7745c5c3_Err | ||
| 867 | } | 873 | } | ||
| 868 | var templ_7745c5c3_Var40 string | 874 | var templ_7745c5c3_Var40 string | ||
| 869 | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) | 875 | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Files))) | ||
| 870 | if templ_7745c5c3_Err != nil { | 876 | if templ_7745c5c3_Err != nil { | ||
| 871 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 169, Col: 65} | 877 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 173, Col: 65} |
| 872 | } | 878 | } | ||
| 873 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | 879 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | ||
| 874 | if templ_7745c5c3_Err != nil { | 880 | if templ_7745c5c3_Err != nil { | ||
| 875 | return templ_7745c5c3_Err | 881 | return templ_7745c5c3_Err | ||
| 876 | } | 882 | } | ||
| 877 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span></h2>") | 883 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span></h2>") |
| 878 | if templ_7745c5c3_Err != nil { | 884 | if templ_7745c5c3_Err != nil { | ||
| 879 | return templ_7745c5c3_Err | 885 | return templ_7745c5c3_Err | ||
| 880 | } | 886 | } | ||
| @@ -882,7 +888,7 @@ func commitRail(p CommitPage) templ.Component { | |||||
| 882 | if templ_7745c5c3_Err != nil { | 888 | if templ_7745c5c3_Err != nil { | ||
| 883 | return templ_7745c5c3_Err | 889 | return templ_7745c5c3_Err | ||
| 884 | } | 890 | } | ||
| 885 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</section>") | 891 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</section>") |
| 886 | if templ_7745c5c3_Err != nil { | 892 | if templ_7745c5c3_Err != nil { | ||
| 887 | return templ_7745c5c3_Err | 893 | return templ_7745c5c3_Err | ||
| 888 | } | 894 | } | ||
| @@ -914,230 +920,230 @@ func FileList(files []DiffFile) templ.Component { | |||||
| 914 | } | 920 | } | ||
| 915 | ctx = templ.ClearChildren(ctx) | 921 | ctx = templ.ClearChildren(ctx) | ||
| 916 | if len(files) > fileFilterMin { | 922 | if len(files) > fileFilterMin { | ||
| 917 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<div class=\"ffilter\"><label for=\"files-filter\" class=\"sr\">filter the changed files</label> <input id=\"files-filter\" type=\"search\" placeholder=\"Filter files…\" autocomplete=\"off\" data-pick=\".files > li\" hx-on:input=\"ermite.filter(this)\"></div>") | 923 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<div class=\"ffilter\"><label for=\"files-filter\" class=\"sr\">filter the changed files</label> <input id=\"files-filter\" type=\"search\" placeholder=\"Filter files…\" autocomplete=\"off\" data-pick=\".files > li\" hx-on:input=\"ermite.filter(this)\"></div>") |
| 918 | if templ_7745c5c3_Err != nil { | 924 | if templ_7745c5c3_Err != nil { | ||
| 919 | return templ_7745c5c3_Err | 925 | return templ_7745c5c3_Err | ||
| 920 | } | 926 | } | ||
| 921 | } | 927 | } | ||
| 922 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<ol class=\"files\" aria-label=\"Changed files\">") | 928 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<ol class=\"files\" aria-label=\"Changed files\">") |
| 923 | if templ_7745c5c3_Err != nil { | 929 | if templ_7745c5c3_Err != nil { | ||
| 924 | return templ_7745c5c3_Err | 930 | return templ_7745c5c3_Err | ||
| 925 | } | 931 | } | ||
| 926 | for _, f := range files { | 932 | for _, f := range files { | ||
| 927 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<li><a href=\"") | 933 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<li><a href=\"") |
| 928 | if templ_7745c5c3_Err != nil { | 934 | if templ_7745c5c3_Err != nil { | ||
| 929 | return templ_7745c5c3_Err | 935 | return templ_7745c5c3_Err | ||
| 930 | } | 936 | } | ||
| 931 | var templ_7745c5c3_Var42 templ.SafeURL | 937 | var templ_7745c5c3_Var42 templ.SafeURL | ||
| 932 | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("#" + f.ID)) | 938 | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("#" + f.ID)) | ||
| 933 | if templ_7745c5c3_Err != nil { | 939 | if templ_7745c5c3_Err != nil { | ||
| 934 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 194, Col: 37} | 940 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 37} |
| 935 | } | 941 | } | ||
| 936 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) | 942 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) | ||
| 937 | if templ_7745c5c3_Err != nil { | 943 | if templ_7745c5c3_Err != nil { | ||
| 938 | return templ_7745c5c3_Err | 944 | return templ_7745c5c3_Err | ||
| 939 | } | 945 | } | ||
| 940 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "\" title=\"") | 946 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "\" title=\"") |
| 941 | if templ_7745c5c3_Err != nil { | 947 | if templ_7745c5c3_Err != nil { | ||
| 942 | return templ_7745c5c3_Err | 948 | return templ_7745c5c3_Err | ||
| 943 | } | 949 | } | ||
| 944 | var templ_7745c5c3_Var43 string | 950 | var templ_7745c5c3_Var43 string | ||
| 945 | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path) | 951 | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path) | ||
| 946 | if templ_7745c5c3_Err != nil { | 952 | if templ_7745c5c3_Err != nil { | ||
| 947 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 195, Col: 19} | 953 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 19} |
| 948 | } | 954 | } | ||
| 949 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43) | 955 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43) | ||
| 950 | if templ_7745c5c3_Err != nil { | 956 | if templ_7745c5c3_Err != nil { | ||
| 951 | return templ_7745c5c3_Err | 957 | return templ_7745c5c3_Err | ||
| 952 | } | 958 | } | ||
| 953 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "\" hx-on:click=\"(window.ermiteMR?.openFile || ermite.openFile)(this.hash.slice(1))\"><span class=\"st\" data-st=\"") | 959 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\" hx-on:click=\"(window.ermiteMR?.openFile || ermite.openFile)(this.hash.slice(1))\"><span class=\"st\" data-st=\"") |
| 954 | if templ_7745c5c3_Err != nil { | 960 | if templ_7745c5c3_Err != nil { | ||
| 955 | return templ_7745c5c3_Err | 961 | return templ_7745c5c3_Err | ||
| 956 | } | 962 | } | ||
| 957 | var templ_7745c5c3_Var44 string | 963 | var templ_7745c5c3_Var44 string | ||
| 958 | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Status) | 964 | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Status) | ||
| 959 | if templ_7745c5c3_Err != nil { | 965 | if templ_7745c5c3_Err != nil { | ||
| 960 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 40} | 966 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 202, Col: 40} |
| 961 | } | 967 | } | ||
| 962 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44) | 968 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44) | ||
| 963 | if templ_7745c5c3_Err != nil { | 969 | if templ_7745c5c3_Err != nil { | ||
| 964 | return templ_7745c5c3_Err | 970 | return templ_7745c5c3_Err | ||
| 965 | } | 971 | } | ||
| 966 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "\" title=\"") | 972 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\" title=\"") |
| 967 | if templ_7745c5c3_Err != nil { | 973 | if templ_7745c5c3_Err != nil { | ||
| 968 | return templ_7745c5c3_Err | 974 | return templ_7745c5c3_Err | ||
| 969 | } | 975 | } | ||
| 970 | var templ_7745c5c3_Var45 string | 976 | var templ_7745c5c3_Var45 string | ||
| 971 | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(statusName(f.Status)) | 977 | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.ResolveAttributeValue(statusName(f.Status)) | ||
| 972 | if templ_7745c5c3_Err != nil { | 978 | if templ_7745c5c3_Err != nil { | ||
| 973 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 71} | 979 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 202, Col: 71} |
| 974 | } | 980 | } | ||
| 975 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45) | 981 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var45) | ||
| 976 | if templ_7745c5c3_Err != nil { | 982 | if templ_7745c5c3_Err != nil { | ||
| 977 | return templ_7745c5c3_Err | 983 | return templ_7745c5c3_Err | ||
| 978 | } | 984 | } | ||
| 979 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\">") | 985 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "\">") |
| 980 | if templ_7745c5c3_Err != nil { | 986 | if templ_7745c5c3_Err != nil { | ||
| 981 | return templ_7745c5c3_Err | 987 | return templ_7745c5c3_Err | ||
| 982 | } | 988 | } | ||
| 983 | var templ_7745c5c3_Var46 string | 989 | var templ_7745c5c3_Var46 string | ||
| 984 | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(f.Status) | 990 | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(f.Status) | ||
| 985 | if templ_7745c5c3_Err != nil { | 991 | if templ_7745c5c3_Err != nil { | ||
| 986 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 198, Col: 84} | 992 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 202, Col: 84} |
| 987 | } | 993 | } | ||
| 988 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | 994 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | ||
| 989 | if templ_7745c5c3_Err != nil { | 995 | if templ_7745c5c3_Err != nil { | ||
| 990 | return templ_7745c5c3_Err | 996 | return templ_7745c5c3_Err | ||
| 991 | } | 997 | } | ||
| 992 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</span> <span class=\"nm\"><span class=\"p\">") | 998 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</span> <span class=\"nm\"><span class=\"p\">") |
| 993 | if templ_7745c5c3_Err != nil { | 999 | if templ_7745c5c3_Err != nil { | ||
| 994 | return templ_7745c5c3_Err | 1000 | return templ_7745c5c3_Err | ||
| 995 | } | 1001 | } | ||
| 996 | var templ_7745c5c3_Var47 string | 1002 | var templ_7745c5c3_Var47 string | ||
| 997 | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) | 1003 | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(f.Name) | ||
| 998 | if templ_7745c5c3_Err != nil { | 1004 | if templ_7745c5c3_Err != nil { | ||
| 999 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 46} | 1005 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 46} |
| 1000 | } | 1006 | } | ||
| 1001 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | 1007 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | ||
| 1002 | if templ_7745c5c3_Err != nil { | 1008 | if templ_7745c5c3_Err != nil { | ||
| 1003 | return templ_7745c5c3_Err | 1009 | return templ_7745c5c3_Err | ||
| 1004 | } | 1010 | } | ||
| 1005 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</span>") | 1011 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</span>") |
| 1006 | if templ_7745c5c3_Err != nil { | 1012 | if templ_7745c5c3_Err != nil { | ||
| 1007 | return templ_7745c5c3_Err | 1013 | return templ_7745c5c3_Err | ||
| 1008 | } | 1014 | } | ||
| 1009 | var templ_7745c5c3_Var48 string | 1015 | var templ_7745c5c3_Var48 string | ||
| 1010 | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | 1016 | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | ||
| 1011 | if templ_7745c5c3_Err != nil { | 1017 | if templ_7745c5c3_Err != nil { | ||
| 1012 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 60} | 1018 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 60} |
| 1013 | } | 1019 | } | ||
| 1014 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) | 1020 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) | ||
| 1015 | if templ_7745c5c3_Err != nil { | 1021 | if templ_7745c5c3_Err != nil { | ||
| 1016 | return templ_7745c5c3_Err | 1022 | return templ_7745c5c3_Err | ||
| 1017 | } | 1023 | } | ||
| 1018 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "<span class=\"d\"><bdi>") | 1024 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<span class=\"d\"><bdi>") |
| 1019 | if templ_7745c5c3_Err != nil { | 1025 | if templ_7745c5c3_Err != nil { | ||
| 1020 | return templ_7745c5c3_Err | 1026 | return templ_7745c5c3_Err | ||
| 1021 | } | 1027 | } | ||
| 1022 | var templ_7745c5c3_Var49 string | 1028 | var templ_7745c5c3_Var49 string | ||
| 1023 | templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(f.Dir) | 1029 | templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(f.Dir) | ||
| 1024 | if templ_7745c5c3_Err != nil { | 1030 | if templ_7745c5c3_Err != nil { | ||
| 1025 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 199, Col: 90} | 1031 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 90} |
| 1026 | } | 1032 | } | ||
| 1027 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49)) | 1033 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49)) | ||
| 1028 | if templ_7745c5c3_Err != nil { | 1034 | if templ_7745c5c3_Err != nil { | ||
| 1029 | return templ_7745c5c3_Err | 1035 | return templ_7745c5c3_Err | ||
| 1030 | } | 1036 | } | ||
| 1031 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</bdi></span></span> ") | 1037 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "</bdi></span></span> ") |
| 1032 | if templ_7745c5c3_Err != nil { | 1038 | if templ_7745c5c3_Err != nil { | ||
| 1033 | return templ_7745c5c3_Err | 1039 | return templ_7745c5c3_Err | ||
| 1034 | } | 1040 | } | ||
| 1035 | if f.OpenNotes > 0 { | 1041 | if f.OpenNotes > 0 { | ||
| 1036 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<span class=\"cn\" title=\"") | 1042 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "<span class=\"cn\" title=\"") |
| 1037 | if templ_7745c5c3_Err != nil { | 1043 | if templ_7745c5c3_Err != nil { | ||
| 1038 | return templ_7745c5c3_Err | 1044 | return templ_7745c5c3_Err | ||
| 1039 | } | 1045 | } | ||
| 1040 | var templ_7745c5c3_Var50 string | 1046 | var templ_7745c5c3_Var50 string | ||
| 1041 | templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.ResolveAttributeValue(plural(f.OpenNotes, "open comment", "open comments")) | 1047 | templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.ResolveAttributeValue(plural(f.OpenNotes, "open comment", "open comments")) | ||
| 1042 | if templ_7745c5c3_Err != nil { | 1048 | if templ_7745c5c3_Err != nil { | ||
| 1043 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 201, Col: 83} | 1049 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 205, Col: 83} |
| 1044 | } | 1050 | } | ||
| 1045 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var50) | 1051 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var50) | ||
| 1046 | if templ_7745c5c3_Err != nil { | 1052 | if templ_7745c5c3_Err != nil { | ||
| 1047 | return templ_7745c5c3_Err | 1053 | return templ_7745c5c3_Err | ||
| 1048 | } | 1054 | } | ||
| 1049 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\">") | 1055 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "\">") |
| 1050 | if templ_7745c5c3_Err != nil { | 1056 | if templ_7745c5c3_Err != nil { | ||
| 1051 | return templ_7745c5c3_Err | 1057 | return templ_7745c5c3_Err | ||
| 1052 | } | 1058 | } | ||
| 1053 | var templ_7745c5c3_Var51 string | 1059 | var templ_7745c5c3_Var51 string | ||
| 1054 | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.OpenNotes)) | 1060 | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.OpenNotes)) | ||
| 1055 | if templ_7745c5c3_Err != nil { | 1061 | if templ_7745c5c3_Err != nil { | ||
| 1056 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 201, Col: 105} | 1062 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 205, Col: 105} |
| 1057 | } | 1063 | } | ||
| 1058 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) | 1064 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) | ||
| 1059 | if templ_7745c5c3_Err != nil { | 1065 | if templ_7745c5c3_Err != nil { | ||
| 1060 | return templ_7745c5c3_Err | 1066 | return templ_7745c5c3_Err | ||
| 1061 | } | 1067 | } | ||
| 1062 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</span> ") | 1068 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</span> ") |
| 1063 | if templ_7745c5c3_Err != nil { | 1069 | if templ_7745c5c3_Err != nil { | ||
| 1064 | return templ_7745c5c3_Err | 1070 | return templ_7745c5c3_Err | ||
| 1065 | } | 1071 | } | ||
| 1066 | } else if f.Notes > 0 { | 1072 | } else if f.Notes > 0 { | ||
| 1067 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<span class=\"cn done\" title=\"") | 1073 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "<span class=\"cn done\" title=\"") |
| 1068 | if templ_7745c5c3_Err != nil { | 1074 | if templ_7745c5c3_Err != nil { | ||
| 1069 | return templ_7745c5c3_Err | 1075 | return templ_7745c5c3_Err | ||
| 1070 | } | 1076 | } | ||
| 1071 | var templ_7745c5c3_Var52 string | 1077 | var templ_7745c5c3_Var52 string | ||
| 1072 | templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.ResolveAttributeValue(plural(f.Notes, "resolved comment", "resolved comments")) | 1078 | templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.ResolveAttributeValue(plural(f.Notes, "resolved comment", "resolved comments")) | ||
| 1073 | if templ_7745c5c3_Err != nil { | 1079 | if templ_7745c5c3_Err != nil { | ||
| 1074 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 92} | 1080 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 207, Col: 92} |
| 1075 | } | 1081 | } | ||
| 1076 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var52) | 1082 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var52) | ||
| 1077 | if templ_7745c5c3_Err != nil { | 1083 | if templ_7745c5c3_Err != nil { | ||
| 1078 | return templ_7745c5c3_Err | 1084 | return templ_7745c5c3_Err | ||
| 1079 | } | 1085 | } | ||
| 1080 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "\">") | 1086 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "\">") |
| 1081 | if templ_7745c5c3_Err != nil { | 1087 | if templ_7745c5c3_Err != nil { | ||
| 1082 | return templ_7745c5c3_Err | 1088 | return templ_7745c5c3_Err | ||
| 1083 | } | 1089 | } | ||
| 1084 | var templ_7745c5c3_Var53 string | 1090 | var templ_7745c5c3_Var53 string | ||
| 1085 | templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Notes)) | 1091 | templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Notes)) | ||
| 1086 | if templ_7745c5c3_Err != nil { | 1092 | if templ_7745c5c3_Err != nil { | ||
| 1087 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 203, Col: 110} | 1093 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 207, Col: 110} |
| 1088 | } | 1094 | } | ||
| 1089 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) | 1095 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) | ||
| 1090 | if templ_7745c5c3_Err != nil { | 1096 | if templ_7745c5c3_Err != nil { | ||
| 1091 | return templ_7745c5c3_Err | 1097 | return templ_7745c5c3_Err | ||
| 1092 | } | 1098 | } | ||
| 1093 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "</span> ") | 1099 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "</span> ") |
| 1094 | if templ_7745c5c3_Err != nil { | 1100 | if templ_7745c5c3_Err != nil { | ||
| 1095 | return templ_7745c5c3_Err | 1101 | return templ_7745c5c3_Err | ||
| 1096 | } | 1102 | } | ||
| 1097 | } | 1103 | } | ||
| 1098 | if f.Bin { | 1104 | if f.Bin { | ||
| 1099 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<span class=\"n mute\">bin</span>") | 1105 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<span class=\"n mute\">bin</span>") |
| 1100 | if templ_7745c5c3_Err != nil { | 1106 | if templ_7745c5c3_Err != nil { | ||
| 1101 | return templ_7745c5c3_Err | 1107 | return templ_7745c5c3_Err | ||
| 1102 | } | 1108 | } | ||
| 1103 | } else { | 1109 | } else { | ||
| 1104 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<span class=\"n\"><span class=\"plus\">+") | 1110 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<span class=\"n\"><span class=\"plus\">+") |
| 1105 | if templ_7745c5c3_Err != nil { | 1111 | if templ_7745c5c3_Err != nil { | ||
| 1106 | return templ_7745c5c3_Err | 1112 | return templ_7745c5c3_Err | ||
| 1107 | } | 1113 | } | ||
| 1108 | var templ_7745c5c3_Var54 string | 1114 | var templ_7745c5c3_Var54 string | ||
| 1109 | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Add)) | 1115 | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Add)) | ||
| 1110 | if templ_7745c5c3_Err != nil { | 1116 | if templ_7745c5c3_Err != nil { | ||
| 1111 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 208, Col: 55} | 1117 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 212, Col: 55} |
| 1112 | } | 1118 | } | ||
| 1113 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) | 1119 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) | ||
| 1114 | if templ_7745c5c3_Err != nil { | 1120 | if templ_7745c5c3_Err != nil { | ||
| 1115 | return templ_7745c5c3_Err | 1121 | return templ_7745c5c3_Err | ||
| 1116 | } | 1122 | } | ||
| 1117 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</span> <span class=\"minus\">-") | 1123 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</span> <span class=\"minus\">-") |
| 1118 | if templ_7745c5c3_Err != nil { | 1124 | if templ_7745c5c3_Err != nil { | ||
| 1119 | return templ_7745c5c3_Err | 1125 | return templ_7745c5c3_Err | ||
| 1120 | } | 1126 | } | ||
| 1121 | var templ_7745c5c3_Var55 string | 1127 | var templ_7745c5c3_Var55 string | ||
| 1122 | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Del)) | 1128 | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Del)) | ||
| 1123 | if templ_7745c5c3_Err != nil { | 1129 | if templ_7745c5c3_Err != nil { | ||
| 1124 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 208, Col: 99} | 1130 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 212, Col: 99} |
| 1125 | } | 1131 | } | ||
| 1126 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) | 1132 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) | ||
| 1127 | if templ_7745c5c3_Err != nil { | 1133 | if templ_7745c5c3_Err != nil { | ||
| 1128 | return templ_7745c5c3_Err | 1134 | return templ_7745c5c3_Err | ||
| 1129 | } | 1135 | } | ||
| 1130 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</span></span>") | 1136 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "</span></span>") |
| 1131 | if templ_7745c5c3_Err != nil { | 1137 | if templ_7745c5c3_Err != nil { | ||
| 1132 | return templ_7745c5c3_Err | 1138 | return templ_7745c5c3_Err | ||
| 1133 | } | 1139 | } | ||
| 1134 | } | 1140 | } | ||
| 1135 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "</a></li>") | 1141 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "</a></li>") |
| 1136 | if templ_7745c5c3_Err != nil { | 1142 | if templ_7745c5c3_Err != nil { | ||
| 1137 | return templ_7745c5c3_Err | 1143 | return templ_7745c5c3_Err | ||
| 1138 | } | 1144 | } | ||
| 1139 | } | 1145 | } | ||
| 1140 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "</ol>") | 1146 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "</ol>") |
| 1141 | if templ_7745c5c3_Err != nil { | 1147 | if templ_7745c5c3_Err != nil { | ||
| 1142 | return templ_7745c5c3_Err | 1148 | return templ_7745c5c3_Err | ||
| 1143 | } | 1149 | } | ||
| @@ -1175,7 +1181,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1175 | if templ_7745c5c3_Err != nil { | 1181 | if templ_7745c5c3_Err != nil { | ||
| 1176 | return templ_7745c5c3_Err | 1182 | return templ_7745c5c3_Err | ||
| 1177 | } | 1183 | } | ||
| 1178 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "<details class=\"") | 1184 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "<details class=\"") |
| 1179 | if templ_7745c5c3_Err != nil { | 1185 | if templ_7745c5c3_Err != nil { | ||
| 1180 | return templ_7745c5c3_Err | 1186 | return templ_7745c5c3_Err | ||
| 1181 | } | 1187 | } | ||
| @@ -1188,134 +1194,134 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1188 | if templ_7745c5c3_Err != nil { | 1194 | if templ_7745c5c3_Err != nil { | ||
| 1189 | return templ_7745c5c3_Err | 1195 | return templ_7745c5c3_Err | ||
| 1190 | } | 1196 | } | ||
| 1191 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "\" id=\"") | 1197 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\" id=\"") |
| 1192 | if templ_7745c5c3_Err != nil { | 1198 | if templ_7745c5c3_Err != nil { | ||
| 1193 | return templ_7745c5c3_Err | 1199 | return templ_7745c5c3_Err | ||
| 1194 | } | 1200 | } | ||
| 1195 | var templ_7745c5c3_Var59 string | 1201 | var templ_7745c5c3_Var59 string | ||
| 1196 | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.ID) | 1202 | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.ID) | ||
| 1197 | if templ_7745c5c3_Err != nil { | 1203 | if templ_7745c5c3_Err != nil { | ||
| 1198 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 223, Col: 11} | 1204 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 227, Col: 11} |
| 1199 | } | 1205 | } | ||
| 1200 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var59) | 1206 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var59) | ||
| 1201 | if templ_7745c5c3_Err != nil { | 1207 | if templ_7745c5c3_Err != nil { | ||
| 1202 | return templ_7745c5c3_Err | 1208 | return templ_7745c5c3_Err | ||
| 1203 | } | 1209 | } | ||
| 1204 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\" data-file=\"") | 1210 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\" data-file=\"") |
| 1205 | if templ_7745c5c3_Err != nil { | 1211 | if templ_7745c5c3_Err != nil { | ||
| 1206 | return templ_7745c5c3_Err | 1212 | return templ_7745c5c3_Err | ||
| 1207 | } | 1213 | } | ||
| 1208 | var templ_7745c5c3_Var60 string | 1214 | var templ_7745c5c3_Var60 string | ||
| 1209 | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Key) | 1215 | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Key) | ||
| 1210 | if templ_7745c5c3_Err != nil { | 1216 | if templ_7745c5c3_Err != nil { | ||
| 1211 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 224, Col: 19} | 1217 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 228, Col: 19} |
| 1212 | } | 1218 | } | ||
| 1213 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60) | 1219 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60) | ||
| 1214 | if templ_7745c5c3_Err != nil { | 1220 | if templ_7745c5c3_Err != nil { | ||
| 1215 | return templ_7745c5c3_Err | 1221 | return templ_7745c5c3_Err | ||
| 1216 | } | 1222 | } | ||
| 1217 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\"") | 1223 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "\"") |
| 1218 | if templ_7745c5c3_Err != nil { | 1224 | if templ_7745c5c3_Err != nil { | ||
| 1219 | return templ_7745c5c3_Err | 1225 | return templ_7745c5c3_Err | ||
| 1220 | } | 1226 | } | ||
| 1221 | if f.Open { | 1227 | if f.Open { | ||
| 1222 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, " open") | 1228 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, " open") |
| 1223 | if templ_7745c5c3_Err != nil { | 1229 | if templ_7745c5c3_Err != nil { | ||
| 1224 | return templ_7745c5c3_Err | 1230 | return templ_7745c5c3_Err | ||
| 1225 | } | 1231 | } | ||
| 1226 | } | 1232 | } | ||
| 1227 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "><summary><span class=\"st\">") | 1233 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "><summary><span class=\"st\">") |
| 1228 | if templ_7745c5c3_Err != nil { | 1234 | if templ_7745c5c3_Err != nil { | ||
| 1229 | return templ_7745c5c3_Err | 1235 | return templ_7745c5c3_Err | ||
| 1230 | } | 1236 | } | ||
| 1231 | var templ_7745c5c3_Var61 string | 1237 | var templ_7745c5c3_Var61 string | ||
| 1232 | templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.JoinStringErrs(f.Status) | 1238 | templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.JoinStringErrs(f.Status) | ||
| 1233 | if templ_7745c5c3_Err != nil { | 1239 | if templ_7745c5c3_Err != nil { | ||
| 1234 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 30} | 1240 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 30} |
| 1235 | } | 1241 | } | ||
| 1236 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var61)) | 1242 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var61)) | ||
| 1237 | if templ_7745c5c3_Err != nil { | 1243 | if templ_7745c5c3_Err != nil { | ||
| 1238 | return templ_7745c5c3_Err | 1244 | return templ_7745c5c3_Err | ||
| 1239 | } | 1245 | } | ||
| 1240 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "</span>") | 1246 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "</span>") |
| 1241 | if templ_7745c5c3_Err != nil { | 1247 | if templ_7745c5c3_Err != nil { | ||
| 1242 | return templ_7745c5c3_Err | 1248 | return templ_7745c5c3_Err | ||
| 1243 | } | 1249 | } | ||
| 1244 | var templ_7745c5c3_Var62 string | 1250 | var templ_7745c5c3_Var62 string | ||
| 1245 | templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | 1251 | templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | ||
| 1246 | if templ_7745c5c3_Err != nil { | 1252 | if templ_7745c5c3_Err != nil { | ||
| 1247 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 44} | 1253 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 44} |
| 1248 | } | 1254 | } | ||
| 1249 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62)) | 1255 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62)) | ||
| 1250 | if templ_7745c5c3_Err != nil { | 1256 | if templ_7745c5c3_Err != nil { | ||
| 1251 | return templ_7745c5c3_Err | 1257 | return templ_7745c5c3_Err | ||
| 1252 | } | 1258 | } | ||
| 1253 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "<span class=\"p\">") | 1259 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "<span class=\"p\">") |
| 1254 | if templ_7745c5c3_Err != nil { | 1260 | if templ_7745c5c3_Err != nil { | ||
| 1255 | return templ_7745c5c3_Err | 1261 | return templ_7745c5c3_Err | ||
| 1256 | } | 1262 | } | ||
| 1257 | var templ_7745c5c3_Var63 string | 1263 | var templ_7745c5c3_Var63 string | ||
| 1258 | templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(f.Path) | 1264 | templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(f.Path) | ||
| 1259 | if templ_7745c5c3_Err != nil { | 1265 | if templ_7745c5c3_Err != nil { | ||
| 1260 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 70} | 1266 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 70} |
| 1261 | } | 1267 | } | ||
| 1262 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) | 1268 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) | ||
| 1263 | if templ_7745c5c3_Err != nil { | 1269 | if templ_7745c5c3_Err != nil { | ||
| 1264 | return templ_7745c5c3_Err | 1270 | return templ_7745c5c3_Err | ||
| 1265 | } | 1271 | } | ||
| 1266 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "</span>") | 1272 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "</span>") |
| 1267 | if templ_7745c5c3_Err != nil { | 1273 | if templ_7745c5c3_Err != nil { | ||
| 1268 | return templ_7745c5c3_Err | 1274 | return templ_7745c5c3_Err | ||
| 1269 | } | 1275 | } | ||
| 1270 | var templ_7745c5c3_Var64 string | 1276 | var templ_7745c5c3_Var64 string | ||
| 1271 | templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | 1277 | templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | ||
| 1272 | if templ_7745c5c3_Err != nil { | 1278 | if templ_7745c5c3_Err != nil { | ||
| 1273 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 84} | 1279 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 84} |
| 1274 | } | 1280 | } | ||
| 1275 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64)) | 1281 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64)) | ||
| 1276 | if templ_7745c5c3_Err != nil { | 1282 | if templ_7745c5c3_Err != nil { | ||
| 1277 | return templ_7745c5c3_Err | 1283 | return templ_7745c5c3_Err | ||
| 1278 | } | 1284 | } | ||
| 1279 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "<span class=\"plus\">+") | 1285 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "<span class=\"plus\">+") |
| 1280 | if templ_7745c5c3_Err != nil { | 1286 | if templ_7745c5c3_Err != nil { | ||
| 1281 | return templ_7745c5c3_Err | 1287 | return templ_7745c5c3_Err | ||
| 1282 | } | 1288 | } | ||
| 1283 | var templ_7745c5c3_Var65 string | 1289 | var templ_7745c5c3_Var65 string | ||
| 1284 | templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Add)) | 1290 | templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Add)) | ||
| 1285 | if templ_7745c5c3_Err != nil { | 1291 | if templ_7745c5c3_Err != nil { | ||
| 1286 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 119} | 1292 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 119} |
| 1287 | } | 1293 | } | ||
| 1288 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) | 1294 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65)) | ||
| 1289 | if templ_7745c5c3_Err != nil { | 1295 | if templ_7745c5c3_Err != nil { | ||
| 1290 | return templ_7745c5c3_Err | 1296 | return templ_7745c5c3_Err | ||
| 1291 | } | 1297 | } | ||
| 1292 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "</span>") | 1298 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "</span>") |
| 1293 | if templ_7745c5c3_Err != nil { | 1299 | if templ_7745c5c3_Err != nil { | ||
| 1294 | return templ_7745c5c3_Err | 1300 | return templ_7745c5c3_Err | ||
| 1295 | } | 1301 | } | ||
| 1296 | var templ_7745c5c3_Var66 string | 1302 | var templ_7745c5c3_Var66 string | ||
| 1297 | templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | 1303 | templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | ||
| 1298 | if templ_7745c5c3_Err != nil { | 1304 | if templ_7745c5c3_Err != nil { | ||
| 1299 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 133} | 1305 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 133} |
| 1300 | } | 1306 | } | ||
| 1301 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) | 1307 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) | ||
| 1302 | if templ_7745c5c3_Err != nil { | 1308 | if templ_7745c5c3_Err != nil { | ||
| 1303 | return templ_7745c5c3_Err | 1309 | return templ_7745c5c3_Err | ||
| 1304 | } | 1310 | } | ||
| 1305 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "<span class=\"minus\">-") | 1311 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "<span class=\"minus\">-") |
| 1306 | if templ_7745c5c3_Err != nil { | 1312 | if templ_7745c5c3_Err != nil { | ||
| 1307 | return templ_7745c5c3_Err | 1313 | return templ_7745c5c3_Err | ||
| 1308 | } | 1314 | } | ||
| 1309 | var templ_7745c5c3_Var67 string | 1315 | var templ_7745c5c3_Var67 string | ||
| 1310 | templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Del)) | 1316 | templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(f.Del)) | ||
| 1311 | if templ_7745c5c3_Err != nil { | 1317 | if templ_7745c5c3_Err != nil { | ||
| 1312 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 230, Col: 169} | 1318 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 234, Col: 169} |
| 1313 | } | 1319 | } | ||
| 1314 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) | 1320 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) | ||
| 1315 | if templ_7745c5c3_Err != nil { | 1321 | if templ_7745c5c3_Err != nil { | ||
| 1316 | return templ_7745c5c3_Err | 1322 | return templ_7745c5c3_Err | ||
| 1317 | } | 1323 | } | ||
| 1318 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "</span> ") | 1324 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "</span> ") |
| 1319 | if templ_7745c5c3_Err != nil { | 1325 | if templ_7745c5c3_Err != nil { | ||
| 1320 | return templ_7745c5c3_Err | 1326 | return templ_7745c5c3_Err | ||
| 1321 | } | 1327 | } | ||
| @@ -1323,36 +1329,36 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1323 | var templ_7745c5c3_Var68 string | 1329 | var templ_7745c5c3_Var68 string | ||
| 1324 | templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | 1330 | templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(" ") | ||
| 1325 | if templ_7745c5c3_Err != nil { | 1331 | if templ_7745c5c3_Err != nil { | ||
| 1326 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 232, Col: 9} | 1332 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 236, Col: 9} |
| 1327 | } | 1333 | } | ||
| 1328 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) | 1334 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) | ||
| 1329 | if templ_7745c5c3_Err != nil { | 1335 | if templ_7745c5c3_Err != nil { | ||
| 1330 | return templ_7745c5c3_Err | 1336 | return templ_7745c5c3_Err | ||
| 1331 | } | 1337 | } | ||
| 1332 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "<span class=\"note\">") | 1338 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "<span class=\"note\">") |
| 1333 | if templ_7745c5c3_Err != nil { | 1339 | if templ_7745c5c3_Err != nil { | ||
| 1334 | return templ_7745c5c3_Err | 1340 | return templ_7745c5c3_Err | ||
| 1335 | } | 1341 | } | ||
| 1336 | var templ_7745c5c3_Var69 string | 1342 | var templ_7745c5c3_Var69 string | ||
| 1337 | templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note) | 1343 | templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note) | ||
| 1338 | if templ_7745c5c3_Err != nil { | 1344 | if templ_7745c5c3_Err != nil { | ||
| 1339 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 232, Col: 38} | 1345 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 236, Col: 38} |
| 1340 | } | 1346 | } | ||
| 1341 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) | 1347 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69)) | ||
| 1342 | if templ_7745c5c3_Err != nil { | 1348 | if templ_7745c5c3_Err != nil { | ||
| 1343 | return templ_7745c5c3_Err | 1349 | return templ_7745c5c3_Err | ||
| 1344 | } | 1350 | } | ||
| 1345 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "</span>") | 1351 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "</span>") |
| 1346 | if templ_7745c5c3_Err != nil { | 1352 | if templ_7745c5c3_Err != nil { | ||
| 1347 | return templ_7745c5c3_Err | 1353 | return templ_7745c5c3_Err | ||
| 1348 | } | 1354 | } | ||
| 1349 | } | 1355 | } | ||
| 1350 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "</summary> ") | 1356 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "</summary> ") |
| 1351 | if templ_7745c5c3_Err != nil { | 1357 | if templ_7745c5c3_Err != nil { | ||
| 1352 | return templ_7745c5c3_Err | 1358 | return templ_7745c5c3_Err | ||
| 1353 | } | 1359 | } | ||
| 1354 | if f.Lazy { | 1360 | if f.Lazy { | ||
| 1355 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, " ") | 1361 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, " ") |
| 1356 | if templ_7745c5c3_Err != nil { | 1362 | if templ_7745c5c3_Err != nil { | ||
| 1357 | return templ_7745c5c3_Err | 1363 | return templ_7745c5c3_Err | ||
| 1358 | } | 1364 | } | ||
| @@ -1361,7 +1367,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1361 | if templ_7745c5c3_Err != nil { | 1367 | if templ_7745c5c3_Err != nil { | ||
| 1362 | return templ_7745c5c3_Err | 1368 | return templ_7745c5c3_Err | ||
| 1363 | } | 1369 | } | ||
| 1364 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, "<div class=\"") | 1370 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "<div class=\"") |
| 1365 | if templ_7745c5c3_Err != nil { | 1371 | if templ_7745c5c3_Err != nil { | ||
| 1366 | return templ_7745c5c3_Err | 1372 | return templ_7745c5c3_Err | ||
| 1367 | } | 1373 | } | ||
| @@ -1374,74 +1380,74 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1374 | if templ_7745c5c3_Err != nil { | 1380 | if templ_7745c5c3_Err != nil { | ||
| 1375 | return templ_7745c5c3_Err | 1381 | return templ_7745c5c3_Err | ||
| 1376 | } | 1382 | } | ||
| 1377 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "\" data-src=\"") | 1383 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "\" data-src=\"") |
| 1378 | if templ_7745c5c3_Err != nil { | 1384 | if templ_7745c5c3_Err != nil { | ||
| 1379 | return templ_7745c5c3_Err | 1385 | return templ_7745c5c3_Err | ||
| 1380 | } | 1386 | } | ||
| 1381 | var templ_7745c5c3_Var72 string | 1387 | var templ_7745c5c3_Var72 string | ||
| 1382 | templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Src) | 1388 | templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Src) | ||
| 1383 | if templ_7745c5c3_Err != nil { | 1389 | if templ_7745c5c3_Err != nil { | ||
| 1384 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 239, Col: 69} | 1390 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 243, Col: 69} |
| 1385 | } | 1391 | } | ||
| 1386 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var72) | 1392 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var72) | ||
| 1387 | if templ_7745c5c3_Err != nil { | 1393 | if templ_7745c5c3_Err != nil { | ||
| 1388 | return templ_7745c5c3_Err | 1394 | return templ_7745c5c3_Err | ||
| 1389 | } | 1395 | } | ||
| 1390 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "\" data-notes=\"") | 1396 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "\" data-notes=\"") |
| 1391 | if templ_7745c5c3_Err != nil { | 1397 | if templ_7745c5c3_Err != nil { | ||
| 1392 | return templ_7745c5c3_Err | 1398 | return templ_7745c5c3_Err | ||
| 1393 | } | 1399 | } | ||
| 1394 | var templ_7745c5c3_Var73 string | 1400 | var templ_7745c5c3_Var73 string | ||
| 1395 | templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Comments) | 1401 | templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Comments) | ||
| 1396 | if templ_7745c5c3_Err != nil { | 1402 | if templ_7745c5c3_Err != nil { | ||
| 1397 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 239, Col: 95} | 1403 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 243, Col: 95} |
| 1398 | } | 1404 | } | ||
| 1399 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var73) | 1405 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var73) | ||
| 1400 | if templ_7745c5c3_Err != nil { | 1406 | if templ_7745c5c3_Err != nil { | ||
| 1401 | return templ_7745c5c3_Err | 1407 | return templ_7745c5c3_Err | ||
| 1402 | } | 1408 | } | ||
| 1403 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "\"><a href=\"") | 1409 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "\"><a href=\"") |
| 1404 | if templ_7745c5c3_Err != nil { | 1410 | if templ_7745c5c3_Err != nil { | ||
| 1405 | return templ_7745c5c3_Err | 1411 | return templ_7745c5c3_Err | ||
| 1406 | } | 1412 | } | ||
| 1407 | var templ_7745c5c3_Var74 templ.SafeURL | 1413 | var templ_7745c5c3_Var74 templ.SafeURL | ||
| 1408 | templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("?from=" + itoa(f.From) + "#" + f.ID)) | 1414 | templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("?from=" + itoa(f.From) + "#" + f.ID)) | ||
| 1409 | if templ_7745c5c3_Err != nil { | 1415 | if templ_7745c5c3_Err != nil { | ||
| 1410 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 240, Col: 65} | 1416 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 244, Col: 65} |
| 1411 | } | 1417 | } | ||
| 1412 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) | 1418 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) | ||
| 1413 | if templ_7745c5c3_Err != nil { | 1419 | if templ_7745c5c3_Err != nil { | ||
| 1414 | return templ_7745c5c3_Err | 1420 | return templ_7745c5c3_Err | ||
| 1415 | } | 1421 | } | ||
| 1416 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "\">show this file</a></div>") | 1422 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "\">show this file</a></div>") |
| 1417 | if templ_7745c5c3_Err != nil { | 1423 | if templ_7745c5c3_Err != nil { | ||
| 1418 | return templ_7745c5c3_Err | 1424 | return templ_7745c5c3_Err | ||
| 1419 | } | 1425 | } | ||
| 1420 | } else if len(f.Hunks) > 0 { | 1426 | } else if len(f.Hunks) > 0 { | ||
| 1421 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "<div class=\"dscroll\">") | 1427 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "<div class=\"dscroll\">") |
| 1422 | if templ_7745c5c3_Err != nil { | 1428 | if templ_7745c5c3_Err != nil { | ||
| 1423 | return templ_7745c5c3_Err | 1429 | return templ_7745c5c3_Err | ||
| 1424 | } | 1430 | } | ||
| 1425 | if p.ShowUnified { | 1431 | if p.ShowUnified { | ||
| 1426 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "<table class=\"dt uni\" aria-label=\"") | 1432 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "<table class=\"dt uni\" aria-label=\"") |
| 1427 | if templ_7745c5c3_Err != nil { | 1433 | if templ_7745c5c3_Err != nil { | ||
| 1428 | return templ_7745c5c3_Err | 1434 | return templ_7745c5c3_Err | ||
| 1429 | } | 1435 | } | ||
| 1430 | var templ_7745c5c3_Var75 string | 1436 | var templ_7745c5c3_Var75 string | ||
| 1431 | templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path + ", unified") | 1437 | templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path + ", unified") | ||
| 1432 | if templ_7745c5c3_Err != nil { | 1438 | if templ_7745c5c3_Err != nil { | ||
| 1433 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 245, Col: 60} | 1439 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 249, Col: 60} |
| 1434 | } | 1440 | } | ||
| 1435 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var75) | 1441 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var75) | ||
| 1436 | if templ_7745c5c3_Err != nil { | 1442 | if templ_7745c5c3_Err != nil { | ||
| 1437 | return templ_7745c5c3_Err | 1443 | return templ_7745c5c3_Err | ||
| 1438 | } | 1444 | } | ||
| 1439 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "\">") | 1445 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "\">") |
| 1440 | if templ_7745c5c3_Err != nil { | 1446 | if templ_7745c5c3_Err != nil { | ||
| 1441 | return templ_7745c5c3_Err | 1447 | return templ_7745c5c3_Err | ||
| 1442 | } | 1448 | } | ||
| 1443 | for _, h := range f.Hunks { | 1449 | for _, h := range f.Hunks { | ||
| 1444 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "<tbody>") | 1450 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "<tbody>") |
| 1445 | if templ_7745c5c3_Err != nil { | 1451 | if templ_7745c5c3_Err != nil { | ||
| 1446 | return templ_7745c5c3_Err | 1452 | return templ_7745c5c3_Err | ||
| 1447 | } | 1453 | } | ||
| @@ -1451,20 +1457,20 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1451 | return templ_7745c5c3_Err | 1457 | return templ_7745c5c3_Err | ||
| 1452 | } | 1458 | } | ||
| 1453 | } | 1459 | } | ||
| 1454 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "<tr class=\"hunk\"><td colspan=\"4\">") | 1460 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "<tr class=\"hunk\"><td colspan=\"4\">") |
| 1455 | if templ_7745c5c3_Err != nil { | 1461 | if templ_7745c5c3_Err != nil { | ||
| 1456 | return templ_7745c5c3_Err | 1462 | return templ_7745c5c3_Err | ||
| 1457 | } | 1463 | } | ||
| 1458 | var templ_7745c5c3_Var76 string | 1464 | var templ_7745c5c3_Var76 string | ||
| 1459 | templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header) | 1465 | templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header) | ||
| 1460 | if templ_7745c5c3_Err != nil { | 1466 | if templ_7745c5c3_Err != nil { | ||
| 1461 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 251, Col: 51} | 1467 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 255, Col: 51} |
| 1462 | } | 1468 | } | ||
| 1463 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) | 1469 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76)) | ||
| 1464 | if templ_7745c5c3_Err != nil { | 1470 | if templ_7745c5c3_Err != nil { | ||
| 1465 | return templ_7745c5c3_Err | 1471 | return templ_7745c5c3_Err | ||
| 1466 | } | 1472 | } | ||
| 1467 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, "</td></tr>") | 1473 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "</td></tr>") |
| 1468 | if templ_7745c5c3_Err != nil { | 1474 | if templ_7745c5c3_Err != nil { | ||
| 1469 | return templ_7745c5c3_Err | 1475 | return templ_7745c5c3_Err | ||
| 1470 | } | 1476 | } | ||
| @@ -1474,7 +1480,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1474 | if templ_7745c5c3_Err != nil { | 1480 | if templ_7745c5c3_Err != nil { | ||
| 1475 | return templ_7745c5c3_Err | 1481 | return templ_7745c5c3_Err | ||
| 1476 | } | 1482 | } | ||
| 1477 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "<tr class=\"") | 1483 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "<tr class=\"") |
| 1478 | if templ_7745c5c3_Err != nil { | 1484 | if templ_7745c5c3_Err != nil { | ||
| 1479 | return templ_7745c5c3_Err | 1485 | return templ_7745c5c3_Err | ||
| 1480 | } | 1486 | } | ||
| @@ -1487,7 +1493,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1487 | if templ_7745c5c3_Err != nil { | 1493 | if templ_7745c5c3_Err != nil { | ||
| 1488 | return templ_7745c5c3_Err | 1494 | return templ_7745c5c3_Err | ||
| 1489 | } | 1495 | } | ||
| 1490 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "\"><td class=\"ln\">") | 1496 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "\"><td class=\"ln\">") |
| 1491 | if templ_7745c5c3_Err != nil { | 1497 | if templ_7745c5c3_Err != nil { | ||
| 1492 | return templ_7745c5c3_Err | 1498 | return templ_7745c5c3_Err | ||
| 1493 | } | 1499 | } | ||
| @@ -1495,7 +1501,7 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1495 | if templ_7745c5c3_Err != nil { | 1501 | if templ_7745c5c3_Err != nil { | ||
| 1496 | return templ_7745c5c3_Err | 1502 | return templ_7745c5c3_Err | ||
| 1497 | } | 1503 | } | ||
| 1498 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "</td><td class=\"ln\">") | 1504 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "</td><td class=\"ln\">") |
| 1499 | if templ_7745c5c3_Err != nil { | 1505 | if templ_7745c5c3_Err != nil { | ||
| 1500 | return templ_7745c5c3_Err | 1506 | return templ_7745c5c3_Err | ||
| 1501 | } | 1507 | } | ||
| @@ -1503,20 +1509,20 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1503 | if templ_7745c5c3_Err != nil { | 1509 | if templ_7745c5c3_Err != nil { | ||
| 1504 | return templ_7745c5c3_Err | 1510 | return templ_7745c5c3_Err | ||
| 1505 | } | 1511 | } | ||
| 1506 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "</td><td class=\"m\">") | 1512 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "</td><td class=\"m\">") |
| 1507 | if templ_7745c5c3_Err != nil { | 1513 | if templ_7745c5c3_Err != nil { | ||
| 1508 | return templ_7745c5c3_Err | 1514 | return templ_7745c5c3_Err | ||
| 1509 | } | 1515 | } | ||
| 1510 | var templ_7745c5c3_Var79 string | 1516 | var templ_7745c5c3_Var79 string | ||
| 1511 | templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | 1517 | templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | ||
| 1512 | if templ_7745c5c3_Err != nil { | 1518 | if templ_7745c5c3_Err != nil { | ||
| 1513 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 256, Col: 33} | 1519 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 260, Col: 33} |
| 1514 | } | 1520 | } | ||
| 1515 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) | 1521 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) | ||
| 1516 | if templ_7745c5c3_Err != nil { | 1522 | if templ_7745c5c3_Err != nil { | ||
| 1517 | return templ_7745c5c3_Err | 1523 | return templ_7745c5c3_Err | ||
| 1518 | } | 1524 | } | ||
| 1519 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "</td><td class=\"tx chroma\">") | 1525 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "</td><td class=\"tx chroma\">") |
| 1520 | if templ_7745c5c3_Err != nil { | 1526 | if templ_7745c5c3_Err != nil { | ||
| 1521 | return templ_7745c5c3_Err | 1527 | return templ_7745c5c3_Err | ||
| 1522 | } | 1528 | } | ||
| @@ -1524,12 +1530,12 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1524 | if templ_7745c5c3_Err != nil { | 1530 | if templ_7745c5c3_Err != nil { | ||
| 1525 | return templ_7745c5c3_Err | 1531 | return templ_7745c5c3_Err | ||
| 1526 | } | 1532 | } | ||
| 1527 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "</td></tr>") | 1533 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "</td></tr>") |
| 1528 | if templ_7745c5c3_Err != nil { | 1534 | if templ_7745c5c3_Err != nil { | ||
| 1529 | return templ_7745c5c3_Err | 1535 | return templ_7745c5c3_Err | ||
| 1530 | } | 1536 | } | ||
| 1531 | if len(ln.Notes) > 0 || ln.Form != nil { | 1537 | if len(ln.Notes) > 0 || ln.Form != nil { | ||
| 1532 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "<tr class=\"fnote\"><td colspan=\"3\"></td><td>") | 1538 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "<tr class=\"fnote\"><td colspan=\"3\"></td><td>") |
| 1533 | if templ_7745c5c3_Err != nil { | 1539 | if templ_7745c5c3_Err != nil { | ||
| 1534 | return templ_7745c5c3_Err | 1540 | return templ_7745c5c3_Err | ||
| 1535 | } | 1541 | } | ||
| @@ -1537,19 +1543,19 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1537 | if templ_7745c5c3_Err != nil { | 1543 | if templ_7745c5c3_Err != nil { | ||
| 1538 | return templ_7745c5c3_Err | 1544 | return templ_7745c5c3_Err | ||
| 1539 | } | 1545 | } | ||
| 1540 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "</td></tr>") | 1546 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "</td></tr>") |
| 1541 | if templ_7745c5c3_Err != nil { | 1547 | if templ_7745c5c3_Err != nil { | ||
| 1542 | return templ_7745c5c3_Err | 1548 | return templ_7745c5c3_Err | ||
| 1543 | } | 1549 | } | ||
| 1544 | } | 1550 | } | ||
| 1545 | } | 1551 | } | ||
| 1546 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "</tbody> ") | 1552 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "</tbody> ") |
| 1547 | if templ_7745c5c3_Err != nil { | 1553 | if templ_7745c5c3_Err != nil { | ||
| 1548 | return templ_7745c5c3_Err | 1554 | return templ_7745c5c3_Err | ||
| 1549 | } | 1555 | } | ||
| 1550 | } | 1556 | } | ||
| 1551 | if f.Tail != nil { | 1557 | if f.Tail != nil { | ||
| 1552 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "<tbody>") | 1558 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "<tbody>") |
| 1553 | if templ_7745c5c3_Err != nil { | 1559 | if templ_7745c5c3_Err != nil { | ||
| 1554 | return templ_7745c5c3_Err | 1560 | return templ_7745c5c3_Err | ||
| 1555 | } | 1561 | } | ||
| @@ -1557,36 +1563,36 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1557 | if templ_7745c5c3_Err != nil { | 1563 | if templ_7745c5c3_Err != nil { | ||
| 1558 | return templ_7745c5c3_Err | 1564 | return templ_7745c5c3_Err | ||
| 1559 | } | 1565 | } | ||
| 1560 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "</tbody>") | 1566 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "</tbody>") |
| 1561 | if templ_7745c5c3_Err != nil { | 1567 | if templ_7745c5c3_Err != nil { | ||
| 1562 | return templ_7745c5c3_Err | 1568 | return templ_7745c5c3_Err | ||
| 1563 | } | 1569 | } | ||
| 1564 | } | 1570 | } | ||
| 1565 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "</table>") | 1571 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "</table>") |
| 1566 | if templ_7745c5c3_Err != nil { | 1572 | if templ_7745c5c3_Err != nil { | ||
| 1567 | return templ_7745c5c3_Err | 1573 | return templ_7745c5c3_Err | ||
| 1568 | } | 1574 | } | ||
| 1569 | } | 1575 | } | ||
| 1570 | if p.ShowSplit { | 1576 | if p.ShowSplit { | ||
| 1571 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "<table class=\"dt spl\" aria-label=\"") | 1577 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "<table class=\"dt spl\" aria-label=\"") |
| 1572 | if templ_7745c5c3_Err != nil { | 1578 | if templ_7745c5c3_Err != nil { | ||
| 1573 | return templ_7745c5c3_Err | 1579 | return templ_7745c5c3_Err | ||
| 1574 | } | 1580 | } | ||
| 1575 | var templ_7745c5c3_Var80 string | 1581 | var templ_7745c5c3_Var80 string | ||
| 1576 | templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path + ", split") | 1582 | templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.ResolveAttributeValue(f.Path + ", split") | ||
| 1577 | if templ_7745c5c3_Err != nil { | 1583 | if templ_7745c5c3_Err != nil { | ||
| 1578 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 276, Col: 58} | 1584 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 280, Col: 58} |
| 1579 | } | 1585 | } | ||
| 1580 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var80) | 1586 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var80) | ||
| 1581 | if templ_7745c5c3_Err != nil { | 1587 | if templ_7745c5c3_Err != nil { | ||
| 1582 | return templ_7745c5c3_Err | 1588 | return templ_7745c5c3_Err | ||
| 1583 | } | 1589 | } | ||
| 1584 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "\"><colgroup><col class=\"c-ln\"><col class=\"c-m\"><col><col class=\"c-ln\"><col class=\"c-m\"><col></colgroup> ") | 1590 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "\"><colgroup><col class=\"c-ln\"><col class=\"c-m\"><col><col class=\"c-ln\"><col class=\"c-m\"><col></colgroup> ") |
| 1585 | if templ_7745c5c3_Err != nil { | 1591 | if templ_7745c5c3_Err != nil { | ||
| 1586 | return templ_7745c5c3_Err | 1592 | return templ_7745c5c3_Err | ||
| 1587 | } | 1593 | } | ||
| 1588 | for _, h := range f.Hunks { | 1594 | for _, h := range f.Hunks { | ||
| 1589 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "<tbody>") | 1595 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "<tbody>") |
| 1590 | if templ_7745c5c3_Err != nil { | 1596 | if templ_7745c5c3_Err != nil { | ||
| 1591 | return templ_7745c5c3_Err | 1597 | return templ_7745c5c3_Err | ||
| 1592 | } | 1598 | } | ||
| @@ -1596,25 +1602,25 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1596 | return templ_7745c5c3_Err | 1602 | return templ_7745c5c3_Err | ||
| 1597 | } | 1603 | } | ||
| 1598 | } | 1604 | } | ||
| 1599 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "<tr class=\"hunk\"><td colspan=\"6\">") | 1605 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "<tr class=\"hunk\"><td colspan=\"6\">") |
| 1600 | if templ_7745c5c3_Err != nil { | 1606 | if templ_7745c5c3_Err != nil { | ||
| 1601 | return templ_7745c5c3_Err | 1607 | return templ_7745c5c3_Err | ||
| 1602 | } | 1608 | } | ||
| 1603 | var templ_7745c5c3_Var81 string | 1609 | var templ_7745c5c3_Var81 string | ||
| 1604 | templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header) | 1610 | templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(h.Header) | ||
| 1605 | if templ_7745c5c3_Err != nil { | 1611 | if templ_7745c5c3_Err != nil { | ||
| 1606 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 283, Col: 51} | 1612 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 287, Col: 51} |
| 1607 | } | 1613 | } | ||
| 1608 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) | 1614 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81)) | ||
| 1609 | if templ_7745c5c3_Err != nil { | 1615 | if templ_7745c5c3_Err != nil { | ||
| 1610 | return templ_7745c5c3_Err | 1616 | return templ_7745c5c3_Err | ||
| 1611 | } | 1617 | } | ||
| 1612 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "</td></tr>") | 1618 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "</td></tr>") |
| 1613 | if templ_7745c5c3_Err != nil { | 1619 | if templ_7745c5c3_Err != nil { | ||
| 1614 | return templ_7745c5c3_Err | 1620 | return templ_7745c5c3_Err | ||
| 1615 | } | 1621 | } | ||
| 1616 | for _, row := range h.Split { | 1622 | for _, row := range h.Split { | ||
| 1617 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "<tr>") | 1623 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "<tr>") |
| 1618 | if templ_7745c5c3_Err != nil { | 1624 | if templ_7745c5c3_Err != nil { | ||
| 1619 | return templ_7745c5c3_Err | 1625 | return templ_7745c5c3_Err | ||
| 1620 | } | 1626 | } | ||
| @@ -1626,12 +1632,12 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1626 | if templ_7745c5c3_Err != nil { | 1632 | if templ_7745c5c3_Err != nil { | ||
| 1627 | return templ_7745c5c3_Err | 1633 | return templ_7745c5c3_Err | ||
| 1628 | } | 1634 | } | ||
| 1629 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "</tr>") | 1635 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "</tr>") |
| 1630 | if templ_7745c5c3_Err != nil { | 1636 | if templ_7745c5c3_Err != nil { | ||
| 1631 | return templ_7745c5c3_Err | 1637 | return templ_7745c5c3_Err | ||
| 1632 | } | 1638 | } | ||
| 1633 | if notes, form := row.Notes(), row.Form(); len(notes) > 0 || form != nil { | 1639 | if notes, form := row.Notes(), row.Form(); len(notes) > 0 || form != nil { | ||
| 1634 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "<tr class=\"fnote\"><td colspan=\"6\">") | 1640 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "<tr class=\"fnote\"><td colspan=\"6\">") |
| 1635 | if templ_7745c5c3_Err != nil { | 1641 | if templ_7745c5c3_Err != nil { | ||
| 1636 | return templ_7745c5c3_Err | 1642 | return templ_7745c5c3_Err | ||
| 1637 | } | 1643 | } | ||
| @@ -1639,19 +1645,19 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1639 | if templ_7745c5c3_Err != nil { | 1645 | if templ_7745c5c3_Err != nil { | ||
| 1640 | return templ_7745c5c3_Err | 1646 | return templ_7745c5c3_Err | ||
| 1641 | } | 1647 | } | ||
| 1642 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "</td></tr>") | 1648 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "</td></tr>") |
| 1643 | if templ_7745c5c3_Err != nil { | 1649 | if templ_7745c5c3_Err != nil { | ||
| 1644 | return templ_7745c5c3_Err | 1650 | return templ_7745c5c3_Err | ||
| 1645 | } | 1651 | } | ||
| 1646 | } | 1652 | } | ||
| 1647 | } | 1653 | } | ||
| 1648 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "</tbody> ") | 1654 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "</tbody> ") |
| 1649 | if templ_7745c5c3_Err != nil { | 1655 | if templ_7745c5c3_Err != nil { | ||
| 1650 | return templ_7745c5c3_Err | 1656 | return templ_7745c5c3_Err | ||
| 1651 | } | 1657 | } | ||
| 1652 | } | 1658 | } | ||
| 1653 | if f.Tail != nil { | 1659 | if f.Tail != nil { | ||
| 1654 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "<tbody>") | 1660 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "<tbody>") |
| 1655 | if templ_7745c5c3_Err != nil { | 1661 | if templ_7745c5c3_Err != nil { | ||
| 1656 | return templ_7745c5c3_Err | 1662 | return templ_7745c5c3_Err | ||
| 1657 | } | 1663 | } | ||
| @@ -1659,22 +1665,22 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1659 | if templ_7745c5c3_Err != nil { | 1665 | if templ_7745c5c3_Err != nil { | ||
| 1660 | return templ_7745c5c3_Err | 1666 | return templ_7745c5c3_Err | ||
| 1661 | } | 1667 | } | ||
| 1662 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "</tbody>") | 1668 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "</tbody>") |
| 1663 | if templ_7745c5c3_Err != nil { | 1669 | if templ_7745c5c3_Err != nil { | ||
| 1664 | return templ_7745c5c3_Err | 1670 | return templ_7745c5c3_Err | ||
| 1665 | } | 1671 | } | ||
| 1666 | } | 1672 | } | ||
| 1667 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "</table>") | 1673 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "</table>") |
| 1668 | if templ_7745c5c3_Err != nil { | 1674 | if templ_7745c5c3_Err != nil { | ||
| 1669 | return templ_7745c5c3_Err | 1675 | return templ_7745c5c3_Err | ||
| 1670 | } | 1676 | } | ||
| 1671 | } | 1677 | } | ||
| 1672 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "</div>") | 1678 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "</div>") |
| 1673 | if templ_7745c5c3_Err != nil { | 1679 | if templ_7745c5c3_Err != nil { | ||
| 1674 | return templ_7745c5c3_Err | 1680 | return templ_7745c5c3_Err | ||
| 1675 | } | 1681 | } | ||
| 1676 | } else { | 1682 | } else { | ||
| 1677 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "<p class=\"note pad\">") | 1683 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "<p class=\"note pad\">") |
| 1678 | if templ_7745c5c3_Err != nil { | 1684 | if templ_7745c5c3_Err != nil { | ||
| 1679 | return templ_7745c5c3_Err | 1685 | return templ_7745c5c3_Err | ||
| 1680 | } | 1686 | } | ||
| @@ -1682,25 +1688,25 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1682 | var templ_7745c5c3_Var82 string | 1688 | var templ_7745c5c3_Var82 string | ||
| 1683 | templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note) | 1689 | templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(f.Note) | ||
| 1684 | if templ_7745c5c3_Err != nil { | 1690 | if templ_7745c5c3_Err != nil { | ||
| 1685 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 308, Col: 13} | 1691 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 312, Col: 13} |
| 1686 | } | 1692 | } | ||
| 1687 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) | 1693 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) | ||
| 1688 | if templ_7745c5c3_Err != nil { | 1694 | if templ_7745c5c3_Err != nil { | ||
| 1689 | return templ_7745c5c3_Err | 1695 | return templ_7745c5c3_Err | ||
| 1690 | } | 1696 | } | ||
| 1691 | } else { | 1697 | } else { | ||
| 1692 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "no textual change.") | 1698 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "no textual change.") |
| 1693 | if templ_7745c5c3_Err != nil { | 1699 | if templ_7745c5c3_Err != nil { | ||
| 1694 | return templ_7745c5c3_Err | 1700 | return templ_7745c5c3_Err | ||
| 1695 | } | 1701 | } | ||
| 1696 | } | 1702 | } | ||
| 1697 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "</p>") | 1703 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "</p>") |
| 1698 | if templ_7745c5c3_Err != nil { | 1704 | if templ_7745c5c3_Err != nil { | ||
| 1699 | return templ_7745c5c3_Err | 1705 | return templ_7745c5c3_Err | ||
| 1700 | } | 1706 | } | ||
| 1701 | } | 1707 | } | ||
| 1702 | if len(f.Loose) > 0 { | 1708 | if len(f.Loose) > 0 { | ||
| 1703 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "<div class=\"dloose\">") | 1709 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "<div class=\"dloose\">") |
| 1704 | if templ_7745c5c3_Err != nil { | 1710 | if templ_7745c5c3_Err != nil { | ||
| 1705 | return templ_7745c5c3_Err | 1711 | return templ_7745c5c3_Err | ||
| 1706 | } | 1712 | } | ||
| @@ -1710,12 +1716,12 @@ func DiffFileView(f DiffFile, p DiffView) templ.Component { | |||||
| 1710 | return templ_7745c5c3_Err | 1716 | return templ_7745c5c3_Err | ||
| 1711 | } | 1717 | } | ||
| 1712 | } | 1718 | } | ||
| 1713 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "</div>") | 1719 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "</div>") |
| 1714 | if templ_7745c5c3_Err != nil { | 1720 | if templ_7745c5c3_Err != nil { | ||
| 1715 | return templ_7745c5c3_Err | 1721 | return templ_7745c5c3_Err | ||
| 1716 | } | 1722 | } | ||
| 1717 | } | 1723 | } | ||
| 1718 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "</details>") | 1724 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "</details>") |
| 1719 | if templ_7745c5c3_Err != nil { | 1725 | if templ_7745c5c3_Err != nil { | ||
| 1720 | return templ_7745c5c3_Err | 1726 | return templ_7745c5c3_Err | ||
| 1721 | } | 1727 | } | ||
| @@ -1779,7 +1785,7 @@ func MRFilesMoved() templ.Component { | |||||
| 1779 | templ_7745c5c3_Var84 = templ.NopComponent | 1785 | templ_7745c5c3_Var84 = templ.NopComponent | ||
| 1780 | } | 1786 | } | ||
| 1781 | ctx = templ.ClearChildren(ctx) | 1787 | ctx = templ.ClearChildren(ctx) | ||
| 1782 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "<p class=\"notice\" data-moved>this merge request changed since the page was loaded — <a href=\"\">reload</a></p>") | 1788 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "<p class=\"notice\" data-moved>this merge request changed since the page was loaded — <a href=\"\">reload</a></p>") |
| 1783 | if templ_7745c5c3_Err != nil { | 1789 | if templ_7745c5c3_Err != nil { | ||
| 1784 | return templ_7745c5c3_Err | 1790 | return templ_7745c5c3_Err | ||
| 1785 | } | 1791 | } | ||
| @@ -1811,59 +1817,59 @@ func gapRow(g DiffGap, cols int) templ.Component { | |||||
| 1811 | templ_7745c5c3_Var85 = templ.NopComponent | 1817 | templ_7745c5c3_Var85 = templ.NopComponent | ||
| 1812 | } | 1818 | } | ||
| 1813 | ctx = templ.ClearChildren(ctx) | 1819 | ctx = templ.ClearChildren(ctx) | ||
| 1814 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "<tr class=\"gap\" data-js data-gap=\"") | 1820 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "<tr class=\"gap\" data-js data-gap=\"") |
| 1815 | if templ_7745c5c3_Err != nil { | 1821 | if templ_7745c5c3_Err != nil { | ||
| 1816 | return templ_7745c5c3_Err | 1822 | return templ_7745c5c3_Err | ||
| 1817 | } | 1823 | } | ||
| 1818 | var templ_7745c5c3_Var86 string | 1824 | var templ_7745c5c3_Var86 string | ||
| 1819 | templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.ResolveAttributeValue(g.Key) | 1825 | templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.ResolveAttributeValue(g.Key) | ||
| 1820 | if templ_7745c5c3_Err != nil { | 1826 | if templ_7745c5c3_Err != nil { | ||
| 1821 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 342, Col: 41} | 1827 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 346, Col: 41} |
| 1822 | } | 1828 | } | ||
| 1823 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var86) | 1829 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var86) | ||
| 1824 | if templ_7745c5c3_Err != nil { | 1830 | if templ_7745c5c3_Err != nil { | ||
| 1825 | return templ_7745c5c3_Err | 1831 | return templ_7745c5c3_Err | ||
| 1826 | } | 1832 | } | ||
| 1827 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "\"><td colspan=\"") | 1833 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "\"><td colspan=\"") |
| 1828 | if templ_7745c5c3_Err != nil { | 1834 | if templ_7745c5c3_Err != nil { | ||
| 1829 | return templ_7745c5c3_Err | 1835 | return templ_7745c5c3_Err | ||
| 1830 | } | 1836 | } | ||
| 1831 | var templ_7745c5c3_Var87 string | 1837 | var templ_7745c5c3_Var87 string | ||
| 1832 | templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa(cols)) | 1838 | templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa(cols)) | ||
| 1833 | if templ_7745c5c3_Err != nil { | 1839 | if templ_7745c5c3_Err != nil { | ||
| 1834 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 343, Col: 26} | 1840 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 347, Col: 26} |
| 1835 | } | 1841 | } | ||
| 1836 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var87) | 1842 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var87) | ||
| 1837 | if templ_7745c5c3_Err != nil { | 1843 | if templ_7745c5c3_Err != nil { | ||
| 1838 | return templ_7745c5c3_Err | 1844 | return templ_7745c5c3_Err | ||
| 1839 | } | 1845 | } | ||
| 1840 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "\"><button type=\"button\" data-src=\"") | 1846 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "\"><button type=\"button\" data-src=\"") |
| 1841 | if templ_7745c5c3_Err != nil { | 1847 | if templ_7745c5c3_Err != nil { | ||
| 1842 | return templ_7745c5c3_Err | 1848 | return templ_7745c5c3_Err | ||
| 1843 | } | 1849 | } | ||
| 1844 | var templ_7745c5c3_Var88 string | 1850 | var templ_7745c5c3_Var88 string | ||
| 1845 | templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.ResolveAttributeValue(g.Src) | 1851 | templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.ResolveAttributeValue(g.Src) | ||
| 1846 | if templ_7745c5c3_Err != nil { | 1852 | if templ_7745c5c3_Err != nil { | ||
| 1847 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 344, Col: 41} | 1853 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 348, Col: 41} |
| 1848 | } | 1854 | } | ||
| 1849 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var88) | 1855 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var88) | ||
| 1850 | if templ_7745c5c3_Err != nil { | 1856 | if templ_7745c5c3_Err != nil { | ||
| 1851 | return templ_7745c5c3_Err | 1857 | return templ_7745c5c3_Err | ||
| 1852 | } | 1858 | } | ||
| 1853 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "\"><span aria-hidden=\"true\">⋯</span> ") | 1859 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "\"><span aria-hidden=\"true\">⋯</span> ") |
| 1854 | if templ_7745c5c3_Err != nil { | 1860 | if templ_7745c5c3_Err != nil { | ||
| 1855 | return templ_7745c5c3_Err | 1861 | return templ_7745c5c3_Err | ||
| 1856 | } | 1862 | } | ||
| 1857 | var templ_7745c5c3_Var89 string | 1863 | var templ_7745c5c3_Var89 string | ||
| 1858 | templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(g.Label()) | 1864 | templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(g.Label()) | ||
| 1859 | if templ_7745c5c3_Err != nil { | 1865 | if templ_7745c5c3_Err != nil { | ||
| 1860 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 345, Col: 51} | 1866 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 349, Col: 51} |
| 1861 | } | 1867 | } | ||
| 1862 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) | 1868 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89)) | ||
| 1863 | if templ_7745c5c3_Err != nil { | 1869 | if templ_7745c5c3_Err != nil { | ||
| 1864 | return templ_7745c5c3_Err | 1870 | return templ_7745c5c3_Err | ||
| 1865 | } | 1871 | } | ||
| 1866 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "</button></td></tr>") | 1872 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "</button></td></tr>") |
| 1867 | if templ_7745c5c3_Err != nil { | 1873 | if templ_7745c5c3_Err != nil { | ||
| 1868 | return templ_7745c5c3_Err | 1874 | return templ_7745c5c3_Err | ||
| 1869 | } | 1875 | } | ||
| @@ -1894,51 +1900,51 @@ func DiffContext(c ContextRows) templ.Component { | |||||
| 1894 | templ_7745c5c3_Var90 = templ.NopComponent | 1900 | templ_7745c5c3_Var90 = templ.NopComponent | ||
| 1895 | } | 1901 | } | ||
| 1896 | ctx = templ.ClearChildren(ctx) | 1902 | ctx = templ.ClearChildren(ctx) | ||
| 1897 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "<table><tbody data-for=\"uni\">") | 1903 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "<table><tbody data-for=\"uni\">") |
| 1898 | if templ_7745c5c3_Err != nil { | 1904 | if templ_7745c5c3_Err != nil { | ||
| 1899 | return templ_7745c5c3_Err | 1905 | return templ_7745c5c3_Err | ||
| 1900 | } | 1906 | } | ||
| 1901 | for _, ln := range c.Lines { | 1907 | for _, ln := range c.Lines { | ||
| 1902 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "<tr class=\"ctx\"><td class=\"ln\">") | 1908 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "<tr class=\"ctx\"><td class=\"ln\">") |
| 1903 | if templ_7745c5c3_Err != nil { | 1909 | if templ_7745c5c3_Err != nil { | ||
| 1904 | return templ_7745c5c3_Err | 1910 | return templ_7745c5c3_Err | ||
| 1905 | } | 1911 | } | ||
| 1906 | var templ_7745c5c3_Var91 string | 1912 | var templ_7745c5c3_Var91 string | ||
| 1907 | templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Old) | 1913 | templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Old) | ||
| 1908 | if templ_7745c5c3_Err != nil { | 1914 | if templ_7745c5c3_Err != nil { | ||
| 1909 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 358, Col: 28} | 1915 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 362, Col: 28} |
| 1910 | } | 1916 | } | ||
| 1911 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91)) | 1917 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91)) | ||
| 1912 | if templ_7745c5c3_Err != nil { | 1918 | if templ_7745c5c3_Err != nil { | ||
| 1913 | return templ_7745c5c3_Err | 1919 | return templ_7745c5c3_Err | ||
| 1914 | } | 1920 | } | ||
| 1915 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "</td><td class=\"ln\">") | 1921 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "</td><td class=\"ln\">") |
| 1916 | if templ_7745c5c3_Err != nil { | 1922 | if templ_7745c5c3_Err != nil { | ||
| 1917 | return templ_7745c5c3_Err | 1923 | return templ_7745c5c3_Err | ||
| 1918 | } | 1924 | } | ||
| 1919 | var templ_7745c5c3_Var92 string | 1925 | var templ_7745c5c3_Var92 string | ||
| 1920 | templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(ln.New) | 1926 | templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(ln.New) | ||
| 1921 | if templ_7745c5c3_Err != nil { | 1927 | if templ_7745c5c3_Err != nil { | ||
| 1922 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 359, Col: 28} | 1928 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 363, Col: 28} |
| 1923 | } | 1929 | } | ||
| 1924 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92)) | 1930 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92)) | ||
| 1925 | if templ_7745c5c3_Err != nil { | 1931 | if templ_7745c5c3_Err != nil { | ||
| 1926 | return templ_7745c5c3_Err | 1932 | return templ_7745c5c3_Err | ||
| 1927 | } | 1933 | } | ||
| 1928 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "</td><td class=\"m\">") | 1934 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "</td><td class=\"m\">") |
| 1929 | if templ_7745c5c3_Err != nil { | 1935 | if templ_7745c5c3_Err != nil { | ||
| 1930 | return templ_7745c5c3_Err | 1936 | return templ_7745c5c3_Err | ||
| 1931 | } | 1937 | } | ||
| 1932 | var templ_7745c5c3_Var93 string | 1938 | var templ_7745c5c3_Var93 string | ||
| 1933 | templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | 1939 | templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | ||
| 1934 | if templ_7745c5c3_Err != nil { | 1940 | if templ_7745c5c3_Err != nil { | ||
| 1935 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 360, Col: 28} | 1941 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 364, Col: 28} |
| 1936 | } | 1942 | } | ||
| 1937 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93)) | 1943 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93)) | ||
| 1938 | if templ_7745c5c3_Err != nil { | 1944 | if templ_7745c5c3_Err != nil { | ||
| 1939 | return templ_7745c5c3_Err | 1945 | return templ_7745c5c3_Err | ||
| 1940 | } | 1946 | } | ||
| 1941 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "</td><td class=\"tx chroma\">") | 1947 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "</td><td class=\"tx chroma\">") |
| 1942 | if templ_7745c5c3_Err != nil { | 1948 | if templ_7745c5c3_Err != nil { | ||
| 1943 | return templ_7745c5c3_Err | 1949 | return templ_7745c5c3_Err | ||
| 1944 | } | 1950 | } | ||
| @@ -1946,7 +1952,7 @@ func DiffContext(c ContextRows) templ.Component { | |||||
| 1946 | if templ_7745c5c3_Err != nil { | 1952 | if templ_7745c5c3_Err != nil { | ||
| 1947 | return templ_7745c5c3_Err | 1953 | return templ_7745c5c3_Err | ||
| 1948 | } | 1954 | } | ||
| 1949 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "</td></tr>") | 1955 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "</td></tr>") |
| 1950 | if templ_7745c5c3_Err != nil { | 1956 | if templ_7745c5c3_Err != nil { | ||
| 1951 | return templ_7745c5c3_Err | 1957 | return templ_7745c5c3_Err | ||
| 1952 | } | 1958 | } | ||
| @@ -1957,12 +1963,12 @@ func DiffContext(c ContextRows) templ.Component { | |||||
| 1957 | return templ_7745c5c3_Err | 1963 | return templ_7745c5c3_Err | ||
| 1958 | } | 1964 | } | ||
| 1959 | } | 1965 | } | ||
| 1960 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "</tbody> <tbody data-for=\"spl\">") | 1966 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "</tbody> <tbody data-for=\"spl\">") |
| 1961 | if templ_7745c5c3_Err != nil { | 1967 | if templ_7745c5c3_Err != nil { | ||
| 1962 | return templ_7745c5c3_Err | 1968 | return templ_7745c5c3_Err | ||
| 1963 | } | 1969 | } | ||
| 1964 | for i := range c.Lines { | 1970 | for i := range c.Lines { | ||
| 1965 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "<tr>") | 1971 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "<tr>") |
| 1966 | if templ_7745c5c3_Err != nil { | 1972 | if templ_7745c5c3_Err != nil { | ||
| 1967 | return templ_7745c5c3_Err | 1973 | return templ_7745c5c3_Err | ||
| 1968 | } | 1974 | } | ||
| @@ -1974,7 +1980,7 @@ func DiffContext(c ContextRows) templ.Component { | |||||
| 1974 | if templ_7745c5c3_Err != nil { | 1980 | if templ_7745c5c3_Err != nil { | ||
| 1975 | return templ_7745c5c3_Err | 1981 | return templ_7745c5c3_Err | ||
| 1976 | } | 1982 | } | ||
| 1977 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "</tr>") | 1983 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "</tr>") |
| 1978 | if templ_7745c5c3_Err != nil { | 1984 | if templ_7745c5c3_Err != nil { | ||
| 1979 | return templ_7745c5c3_Err | 1985 | return templ_7745c5c3_Err | ||
| 1980 | } | 1986 | } | ||
| @@ -1985,7 +1991,7 @@ func DiffContext(c ContextRows) templ.Component { | |||||
| 1985 | return templ_7745c5c3_Err | 1991 | return templ_7745c5c3_Err | ||
| 1986 | } | 1992 | } | ||
| 1987 | } | 1993 | } | ||
| 1988 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "</tbody></table>") | 1994 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "</tbody></table>") |
| 1989 | if templ_7745c5c3_Err != nil { | 1995 | if templ_7745c5c3_Err != nil { | ||
| 1990 | return templ_7745c5c3_Err | 1996 | return templ_7745c5c3_Err | ||
| 1991 | } | 1997 | } | ||
| @@ -2017,7 +2023,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2017 | } | 2023 | } | ||
| 2018 | ctx = templ.ClearChildren(ctx) | 2024 | ctx = templ.ClearChildren(ctx) | ||
| 2019 | if ln == nil { | 2025 | if ln == nil { | ||
| 2020 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "<td class=\"ln none\"></td><td class=\"m none\"></td><td class=\"tx none\"></td>") | 2026 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "<td class=\"ln none\"></td><td class=\"m none\"></td><td class=\"tx none\"></td>") |
| 2021 | if templ_7745c5c3_Err != nil { | 2027 | if templ_7745c5c3_Err != nil { | ||
| 2022 | return templ_7745c5c3_Err | 2028 | return templ_7745c5c3_Err | ||
| 2023 | } | 2029 | } | ||
| @@ -2027,7 +2033,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2027 | if templ_7745c5c3_Err != nil { | 2033 | if templ_7745c5c3_Err != nil { | ||
| 2028 | return templ_7745c5c3_Err | 2034 | return templ_7745c5c3_Err | ||
| 2029 | } | 2035 | } | ||
| 2030 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "<td class=\"") | 2036 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "<td class=\"") |
| 2031 | if templ_7745c5c3_Err != nil { | 2037 | if templ_7745c5c3_Err != nil { | ||
| 2032 | return templ_7745c5c3_Err | 2038 | return templ_7745c5c3_Err | ||
| 2033 | } | 2039 | } | ||
| @@ -2040,7 +2046,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2040 | if templ_7745c5c3_Err != nil { | 2046 | if templ_7745c5c3_Err != nil { | ||
| 2041 | return templ_7745c5c3_Err | 2047 | return templ_7745c5c3_Err | ||
| 2042 | } | 2048 | } | ||
| 2043 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "\">") | 2049 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "\">") |
| 2044 | if templ_7745c5c3_Err != nil { | 2050 | if templ_7745c5c3_Err != nil { | ||
| 2045 | return templ_7745c5c3_Err | 2051 | return templ_7745c5c3_Err | ||
| 2046 | } | 2052 | } | ||
| @@ -2055,7 +2061,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2055 | return templ_7745c5c3_Err | 2061 | return templ_7745c5c3_Err | ||
| 2056 | } | 2062 | } | ||
| 2057 | } | 2063 | } | ||
| 2058 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "</td>") | 2064 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "</td>") |
| 2059 | if templ_7745c5c3_Err != nil { | 2065 | if templ_7745c5c3_Err != nil { | ||
| 2060 | return templ_7745c5c3_Err | 2066 | return templ_7745c5c3_Err | ||
| 2061 | } | 2067 | } | ||
| @@ -2064,7 +2070,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2064 | if templ_7745c5c3_Err != nil { | 2070 | if templ_7745c5c3_Err != nil { | ||
| 2065 | return templ_7745c5c3_Err | 2071 | return templ_7745c5c3_Err | ||
| 2066 | } | 2072 | } | ||
| 2067 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "<td class=\"") | 2073 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "<td class=\"") |
| 2068 | if templ_7745c5c3_Err != nil { | 2074 | if templ_7745c5c3_Err != nil { | ||
| 2069 | return templ_7745c5c3_Err | 2075 | return templ_7745c5c3_Err | ||
| 2070 | } | 2076 | } | ||
| @@ -2077,20 +2083,20 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2077 | if templ_7745c5c3_Err != nil { | 2083 | if templ_7745c5c3_Err != nil { | ||
| 2078 | return templ_7745c5c3_Err | 2084 | return templ_7745c5c3_Err | ||
| 2079 | } | 2085 | } | ||
| 2080 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "\">") | 2086 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "\">") |
| 2081 | if templ_7745c5c3_Err != nil { | 2087 | if templ_7745c5c3_Err != nil { | ||
| 2082 | return templ_7745c5c3_Err | 2088 | return templ_7745c5c3_Err | ||
| 2083 | } | 2089 | } | ||
| 2084 | var templ_7745c5c3_Var99 string | 2090 | var templ_7745c5c3_Var99 string | ||
| 2085 | templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | 2091 | templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Mark) | ||
| 2086 | if templ_7745c5c3_Err != nil { | 2092 | if templ_7745c5c3_Err != nil { | ||
| 2087 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 397, Col: 68} | 2093 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 401, Col: 68} |
| 2088 | } | 2094 | } | ||
| 2089 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) | 2095 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99)) | ||
| 2090 | if templ_7745c5c3_Err != nil { | 2096 | if templ_7745c5c3_Err != nil { | ||
| 2091 | return templ_7745c5c3_Err | 2097 | return templ_7745c5c3_Err | ||
| 2092 | } | 2098 | } | ||
| 2093 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "</td>") | 2099 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "</td>") |
| 2094 | if templ_7745c5c3_Err != nil { | 2100 | if templ_7745c5c3_Err != nil { | ||
| 2095 | return templ_7745c5c3_Err | 2101 | return templ_7745c5c3_Err | ||
| 2096 | } | 2102 | } | ||
| @@ -2099,7 +2105,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2099 | if templ_7745c5c3_Err != nil { | 2105 | if templ_7745c5c3_Err != nil { | ||
| 2100 | return templ_7745c5c3_Err | 2106 | return templ_7745c5c3_Err | ||
| 2101 | } | 2107 | } | ||
| 2102 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "<td class=\"") | 2108 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "<td class=\"") |
| 2103 | if templ_7745c5c3_Err != nil { | 2109 | if templ_7745c5c3_Err != nil { | ||
| 2104 | return templ_7745c5c3_Err | 2110 | return templ_7745c5c3_Err | ||
| 2105 | } | 2111 | } | ||
| @@ -2112,7 +2118,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2112 | if templ_7745c5c3_Err != nil { | 2118 | if templ_7745c5c3_Err != nil { | ||
| 2113 | return templ_7745c5c3_Err | 2119 | return templ_7745c5c3_Err | ||
| 2114 | } | 2120 | } | ||
| 2115 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "\">") | 2121 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "\">") |
| 2116 | if templ_7745c5c3_Err != nil { | 2122 | if templ_7745c5c3_Err != nil { | ||
| 2117 | return templ_7745c5c3_Err | 2123 | return templ_7745c5c3_Err | ||
| 2118 | } | 2124 | } | ||
| @@ -2120,7 +2126,7 @@ func splitSide(ln *DiffLine, old bool) templ.Component { | |||||
| 2120 | if templ_7745c5c3_Err != nil { | 2126 | if templ_7745c5c3_Err != nil { | ||
| 2121 | return templ_7745c5c3_Err | 2127 | return templ_7745c5c3_Err | ||
| 2122 | } | 2128 | } | ||
| 2123 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "</td>") | 2129 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "</td>") |
| 2124 | if templ_7745c5c3_Err != nil { | 2130 | if templ_7745c5c3_Err != nil { | ||
| 2125 | return templ_7745c5c3_Err | 2131 | return templ_7745c5c3_Err | ||
| 2126 | } | 2132 | } | ||
| @@ -2153,33 +2159,33 @@ func gutter(n, href string) templ.Component { | |||||
| 2153 | } | 2159 | } | ||
| 2154 | ctx = templ.ClearChildren(ctx) | 2160 | ctx = templ.ClearChildren(ctx) | ||
| 2155 | if href != "" { | 2161 | if href != "" { | ||
| 2156 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "<a href=\"") | 2162 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "<a href=\"") |
| 2157 | if templ_7745c5c3_Err != nil { | 2163 | if templ_7745c5c3_Err != nil { | ||
| 2158 | return templ_7745c5c3_Err | 2164 | return templ_7745c5c3_Err | ||
| 2159 | } | 2165 | } | ||
| 2160 | var templ_7745c5c3_Var103 templ.SafeURL | 2166 | var templ_7745c5c3_Var103 templ.SafeURL | ||
| 2161 | templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) | 2167 | templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) | ||
| 2162 | if templ_7745c5c3_Err != nil { | 2168 | if templ_7745c5c3_Err != nil { | ||
| 2163 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 406, Col: 31} | 2169 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 410, Col: 31} |
| 2164 | } | 2170 | } | ||
| 2165 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) | 2171 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) | ||
| 2166 | if templ_7745c5c3_Err != nil { | 2172 | if templ_7745c5c3_Err != nil { | ||
| 2167 | return templ_7745c5c3_Err | 2173 | return templ_7745c5c3_Err | ||
| 2168 | } | 2174 | } | ||
| 2169 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "\" title=\"comment on this line\">") | 2175 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "\" title=\"comment on this line\">") |
| 2170 | if templ_7745c5c3_Err != nil { | 2176 | if templ_7745c5c3_Err != nil { | ||
| 2171 | return templ_7745c5c3_Err | 2177 | return templ_7745c5c3_Err | ||
| 2172 | } | 2178 | } | ||
| 2173 | var templ_7745c5c3_Var104 string | 2179 | var templ_7745c5c3_Var104 string | ||
| 2174 | templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(n) | 2180 | templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(n) | ||
| 2175 | if templ_7745c5c3_Err != nil { | 2181 | if templ_7745c5c3_Err != nil { | ||
| 2176 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 406, Col: 66} | 2182 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 410, Col: 66} |
| 2177 | } | 2183 | } | ||
| 2178 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) | 2184 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) | ||
| 2179 | if templ_7745c5c3_Err != nil { | 2185 | if templ_7745c5c3_Err != nil { | ||
| 2180 | return templ_7745c5c3_Err | 2186 | return templ_7745c5c3_Err | ||
| 2181 | } | 2187 | } | ||
| 2182 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "</a>") | 2188 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "</a>") |
| 2183 | if templ_7745c5c3_Err != nil { | 2189 | if templ_7745c5c3_Err != nil { | ||
| 2184 | return templ_7745c5c3_Err | 2190 | return templ_7745c5c3_Err | ||
| 2185 | } | 2191 | } | ||
| @@ -2187,7 +2193,7 @@ func gutter(n, href string) templ.Component { | |||||
| 2187 | var templ_7745c5c3_Var105 string | 2193 | var templ_7745c5c3_Var105 string | ||
| 2188 | templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(n) | 2194 | templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(n) | ||
| 2189 | if templ_7745c5c3_Err != nil { | 2195 | if templ_7745c5c3_Err != nil { | ||
| 2190 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 408, Col: 5} | 2196 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/diff.templ`, Line: 412, Col: 5} |
| 2191 | } | 2197 | } | ||
| 2192 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var105)) | 2198 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var105)) | ||
| 2193 | if templ_7745c5c3_Err != nil { | 2199 | if templ_7745c5c3_Err != nil { | ||
M internal/adapters/web/jstest/a11y.test.mjs +23 -0
| @@ -358,3 +358,26 @@ test('activity moves a home row up only in newest activity order, preserving foc | |||
| 358 | 358 | assert.ok(fresh.hasAttribute('data-cursor')); | |
| 359 | 359 | } | |
| 360 | 360 | }); | |
| 361 | + | ||
| 362 | + | test('mobile MR layout shortcuts preserve the saved preference until back on desktop', () => { | |
| 363 | + | const diffs = el('div', { id: 'diffs', attrs: { 'data-mr': '', 'data-diff': 'split', 'data-mobile': 'true' } }); | |
| 364 | + | dom.body.replaceChildren(diffs); | |
| 365 | + | const oldQuery = doc.querySelector; | |
| 366 | + | doc.querySelector = query.one; | |
| 367 | + | const previous = globalThis.sessionStorage; | |
| 368 | + | const writes = []; | |
| 369 | + | globalThis.sessionStorage = { setItem: (...args) => writes.push(args) }; | |
| 370 | + | try { | |
| 371 | + | window.ermite.layout('unified'); | |
| 372 | + | window.ermite.layout('split'); | |
| 373 | + | assert.equal(diffs.dataset.diff, 'split'); | |
| 374 | + | assert.deepEqual(writes, []); | |
| 375 | + | diffs.dataset.mobile = 'false'; | |
| 376 | + | window.ermite.layout('unified'); | |
| 377 | + | assert.equal(diffs.dataset.diff, 'unified'); | |
| 378 | + | assert.deepEqual(writes, [['diff', 'unified']]); | |
| 379 | + | } finally { | |
| 380 | + | globalThis.sessionStorage = previous; | |
| 381 | + | doc.querySelector = oldQuery; | |
| 382 | + | } | |
| 383 | + | }); | |
| @@ -358,3 +358,26 @@ test('activity moves a home row up only in newest activity order, preserving foc | |||||
| 358 | assert.ok(fresh.hasAttribute('data-cursor')); | 358 | assert.ok(fresh.hasAttribute('data-cursor')); | ||
| 359 | } | 359 | } | ||
| 360 | }); | 360 | }); | ||
| 361 | + | ||||
| 362 | + | test('mobile MR layout shortcuts preserve the saved preference until back on desktop', () => { | |||
| 363 | + | const diffs = el('div', { id: 'diffs', attrs: { 'data-mr': '', 'data-diff': 'split', 'data-mobile': 'true' } }); | |||
| 364 | + | dom.body.replaceChildren(diffs); | |||
| 365 | + | const oldQuery = doc.querySelector; | |||
| 366 | + | doc.querySelector = query.one; | |||
| 367 | + | const previous = globalThis.sessionStorage; | |||
| 368 | + | const writes = []; | |||
| 369 | + | globalThis.sessionStorage = { setItem: (...args) => writes.push(args) }; | |||
| 370 | + | try { | |||
| 371 | + | window.ermite.layout('unified'); | |||
| 372 | + | window.ermite.layout('split'); | |||
| 373 | + | assert.equal(diffs.dataset.diff, 'split'); | |||
| 374 | + | assert.deepEqual(writes, []); | |||
| 375 | + | diffs.dataset.mobile = 'false'; | |||
| 376 | + | window.ermite.layout('unified'); | |||
| 377 | + | assert.equal(diffs.dataset.diff, 'unified'); | |||
| 378 | + | assert.deepEqual(writes, [['diff', 'unified']]); | |||
| 379 | + | } finally { | |||
| 380 | + | globalThis.sessionStorage = previous; | |||
| 381 | + | doc.querySelector = oldQuery; | |||
| 382 | + | } | |||
| 383 | + | }); | |||
M internal/adapters/web/jstest/mr.test.mjs +208 -0
| @@ -92,3 +92,211 @@ for (const dataset of [{diff:'split'}, {view:'split'}]) test(`reveal selects the | |||
| 92 | 92 | globalThis.requestAnimationFrame=savedRAF; | |
| 93 | 93 | } | |
| 94 | 94 | }); | |
| 95 | + | ||
| 96 | + | test('footer tabs switch panels, support arrows, and open on checks hash', () => { | |
| 97 | + | const oldDocument = globalThis.document; | |
| 98 | + | const oldLocation = globalThis.location; | |
| 99 | + | const oldAdd = globalThis.addEventListener; | |
| 100 | + | const oldHistory = globalThis.history; | |
| 101 | + | const listeners = {}; | |
| 102 | + | const replaced = []; | |
| 103 | + | globalThis.history = { replaceState: (...args) => replaced.push(args) }; | |
| 104 | + | const node = (id) => ({ id, attrs: {}, events: {}, hidden: false, | |
| 105 | + | setAttribute(k,v) { this.attrs[k]=v; }, | |
| 106 | + | addEventListener(k,v) { this.events[k]=v; }, focus() { this.focused=true; } }); | |
| 107 | + | const tabs = [node('mr-tab-commits'), node('mr-tab-checks')]; | |
| 108 | + | const panels = [node('mr-commits'), node('mr-checks-panel')]; | |
| 109 | + | const footer = node('mr-panels'); footer.open=false; | |
| 110 | + | const nav = node('tabs'); nav.querySelectorAll=()=>tabs; | |
| 111 | + | footer.querySelectorAll=()=>panels; | |
| 112 | + | globalThis.document = {querySelector: (s) => s === '#mr-panels' ? footer : s === '[data-mr-tabs]' ? nav : null, | |
| 113 | + | addEventListener(k,v) {listeners[k]=v;} }; | |
| 114 | + | globalThis.location = {hash:''}; | |
| 115 | + | globalThis.addEventListener = (k,v) => {listeners[k]=v;}; | |
| 116 | + | try { | |
| 117 | + | window.ermiteMR.panels(); | |
| 118 | + | assert.equal(footer.open,false); | |
| 119 | + | assert.equal(panels[0].hidden,false); | |
| 120 | + | assert.equal(panels[1].hidden,true); | |
| 121 | + | assert.deepEqual(replaced, [], 'initial selection leaves the URL alone'); | |
| 122 | + | tabs[1].events.click({preventDefault(){}}); | |
| 123 | + | assert.deepEqual(replaced, [[null, '', '#mr-checks-panel']]); | |
| 124 | + | assert.equal(panels[0].hidden,true); | |
| 125 | + | assert.equal(tabs[1].attrs['aria-selected'],'true'); | |
| 126 | + | tabs[1].events.keydown({key:'ArrowRight',preventDefault(){}}); | |
| 127 | + | assert.equal(tabs[0].focused,true); | |
| 128 | + | assert.equal(panels[0].hidden,false); | |
| 129 | + | assert.deepEqual(replaced.at(-1), [null, '', '#mr-commits']); | |
| 130 | + | location.hash='#mr-checks'; replaced.length = 0; listeners.hashchange(); | |
| 131 | + | assert.deepEqual(replaced, [], 'hash navigation does not rewrite the URL'); | |
| 132 | + | assert.equal(footer.open,true); | |
| 133 | + | assert.equal(panels[1].hidden,false); | |
| 134 | + | footer.open=false; | |
| 135 | + | listeners.click({target:{closest:()=>true}}); | |
| 136 | + | assert.equal(footer.open,true); | |
| 137 | + | assert.equal(C.tabIndex('Home',1,2),0); | |
| 138 | + | assert.equal(C.tabIndex('End',0,2),1); | |
| 139 | + | assert.equal(C.tabIndex('ArrowLeft',0,2),1); | |
| 140 | + | assert.equal(C.tabIndex('Escape',0,2),null); | |
| 141 | + | } finally { | |
| 142 | + | globalThis.document=oldDocument; globalThis.location=oldLocation; globalThis.addEventListener=oldAdd; | |
| 143 | + | if (oldHistory === undefined) delete globalThis.history; else globalThis.history = oldHistory; | |
| 144 | + | } | |
| 145 | + | }); | |
| 146 | + | ||
| 147 | + | test('footer: #mr-ck syncs the checks label and a click opens the footer on Checks', () => { | |
| 148 | + | const saved = Object.fromEntries(['document', 'location', 'addEventListener', 'history', 'MutationObserver'].map((k) => [k, globalThis[k]])); | |
| 149 | + | const node = (id) => ({ id, attrs: {}, events: {}, hidden: false, | |
| 150 | + | setAttribute(k, v) { this.attrs[k] = v; }, addEventListener(k, v) { this.events[k] = v; }, focus() {} }); | |
| 151 | + | const tabs = [node('t0'), node('t1')]; | |
| 152 | + | const panels = [node('mr-commits'), node('mr-checks-panel')]; | |
| 153 | + | const footer = node('mr-panels'); footer.open = false; footer.querySelectorAll = () => panels; | |
| 154 | + | const label = { textContent: '' }; | |
| 155 | + | const nav = node('tabs'); nav.querySelectorAll = () => tabs; | |
| 156 | + | nav.querySelector = (s) => s === '[data-checks-label]' ? label : null; | |
| 157 | + | const summary = { title: '1/2 failed', textContent: ' 1/2 ', parentElement: {} }; | |
| 158 | + | const listeners = {}; | |
| 159 | + | let observed = null, callback = null; | |
| 160 | + | globalThis.MutationObserver = class { constructor(fn) { callback = fn; } observe(target, opts) { observed = [target, opts]; } }; | |
| 161 | + | globalThis.document = { querySelector: (s) => s === '#mr-panels' ? footer : s === '[data-mr-tabs]' ? nav : s === '#mr-ck' ? summary : null, | |
| 162 | + | addEventListener(k, v) { listeners[k] = v; } }; | |
| 163 | + | globalThis.location = { hash: '' }; | |
| 164 | + | globalThis.addEventListener = () => {}; | |
| 165 | + | globalThis.history = { replaceState() {} }; | |
| 166 | + | try { | |
| 167 | + | window.ermiteMR.panels(); | |
| 168 | + | assert.equal(label.textContent, '1/2 failed', 'initial label sync'); | |
| 169 | + | assert.equal(observed[0], summary.parentElement); | |
| 170 | + | summary.title = ''; callback(); | |
| 171 | + | assert.equal(label.textContent, '1/2', 'observer re-syncs from the text'); | |
| 172 | + | summary.textContent = ' '; callback(); | |
| 173 | + | assert.equal(label.textContent, 'no checks'); | |
| 174 | + | listeners.click({ target: { closest: (s) => s === '#mr-ck' ? summary : null } }); | |
| 175 | + | assert.equal(footer.open, true); | |
| 176 | + | assert.equal(panels[1].hidden, false); | |
| 177 | + | assert.equal(panels[0].hidden, true); | |
| 178 | + | assert.equal(tabs[1].attrs['aria-selected'], 'true'); | |
| 179 | + | } finally { | |
| 180 | + | for (const [k, v] of Object.entries(saved)) { if (v === undefined) delete globalThis[k]; else globalThis[k] = v; } | |
| 181 | + | } | |
| 182 | + | }); | |
| 183 | + | ||
| 184 | + | test('touch range: first tap anchors, second tap opens the sorted range', () => { | |
| 185 | + | const base = 'https://forge.test/demo/merge-requests/1'; | |
| 186 | + | const first = base + '?on=new:24:a.go#f1'; | |
| 187 | + | const last = base + '?on=new:10:a.go#f1'; | |
| 188 | + | assert.deepEqual(C.touchRange(null, first, base), { start: first, url: null }); | |
| 189 | + | const result = C.touchRange(first, last, base); | |
| 190 | + | assert.equal(result.start, null); | |
| 191 | + | assert.equal(new URL(result.url).searchParams.get('on'), 'new:10-24:a.go'); | |
| 192 | + | assert.deepEqual(C.touchRange(first, first, base), { start: null, url: first }); | |
| 193 | + | }); | |
| 194 | + | ||
| 195 | + | test('touch range: a different file, side or request becomes a new anchor', () => { | |
| 196 | + | const base = 'https://forge.test/demo/merge-requests/1'; | |
| 197 | + | const first = base + '?on=new:24:a.go#f1'; | |
| 198 | + | for (const next of [first.replace('new:', 'old:'), first.replace('a.go', 'b.go'), first.replace('/1?', '/2?')]) { | |
| 199 | + | assert.deepEqual(C.touchRange(first, next, base), { start: next, url: null }); | |
| 200 | + | } | |
| 201 | + | }); | |
| 202 | + | ||
| 203 | + | test('mobile unified fallback only redirects single-layout split pages and preserves query/hash', () => { | |
| 204 | + | const href = 'https://forge.test/demo/merge-requests/1?view=split&from=25&on=new:3:a.go#f26'; | |
| 205 | + | assert.equal(C.mobileURL(href, 'split', false), null); | |
| 206 | + | assert.equal(C.mobileURL(href, undefined, true), null, 'both layouts are switched by CSS'); | |
| 207 | + | assert.equal(C.mobileURL(href, 'unified', true), null, 'no redirect loop'); | |
| 208 | + | const url = new URL(C.mobileURL(href, 'split', true)); | |
| 209 | + | assert.equal(url.searchParams.get('view'), 'unified'); | |
| 210 | + | assert.equal(url.searchParams.get('from'), '25'); | |
| 211 | + | assert.equal(url.searchParams.get('on'), 'new:3:a.go'); | |
| 212 | + | assert.equal(url.hash, '#f26'); | |
| 213 | + | }); | |
| 214 | + | ||
| 215 | + | test('touch control: lazy links enable toolbar; ordinary taps pass through; ranges navigate and cancel', async () => { | |
| 216 | + | const saved = Object.fromEntries(['document', 'location', 'addEventListener', 'localStorage', 'sessionStorage', 'fetch', 'matchMedia'].map((k) => [k, globalThis[k]])); | |
| 217 | + | const make = () => ({ | |
| 218 | + | attrs: {}, events: {}, children: [], textContent: '', | |
| 219 | + | setAttribute(k, v) { this.attrs[k] = v; }, | |
| 220 | + | removeAttribute(k) { delete this.attrs[k]; }, | |
| 221 | + | addEventListener(k, fn) { this.events[k] = fn; }, | |
| 222 | + | append(...nodes) { this.children.push(...nodes); }, | |
| 223 | + | prepend(node) { this.children.unshift(node); }, | |
| 224 | + | querySelector() { return null; }, querySelectorAll() { return []; }, | |
| 225 | + | }); | |
| 226 | + | const diffs = make(); | |
| 227 | + | diffs.dataset = { diff: 'split' }; | |
| 228 | + | const base = 'https://forge.test/demo/merge-requests/1'; | |
| 229 | + | const line = (n) => Object.assign(make(), { href: `${base}?on=new:${n}:a.go#f1`, textContent: String(n) }); | |
| 230 | + | const a = line(20), b = line(10); | |
| 231 | + | let loaded = false; | |
| 232 | + | diffs.querySelector = () => loaded ? a : null; | |
| 233 | + | let assigned = null; | |
| 234 | + | globalThis.document = { | |
| 235 | + | querySelector: (sel) => sel === '#diffs[data-mr]' || sel === '#diffs' ? diffs : null, | |
| 236 | + | querySelectorAll: () => [], createElement: (tag) => tag === 'template' ? { content: { querySelectorAll: () => [] } } : make(), | |
| 237 | + | }; | |
| 238 | + | globalThis.location = { href: base, pathname: '/demo/merge-requests/1', hash: '', assign(url) { assigned = url; } }; | |
| 239 | + | globalThis.addEventListener = () => {}; | |
| 240 | + | const changes = {}; | |
| 241 | + | const medias = {}; | |
| 242 | + | globalThis.matchMedia = (q) => medias[q] ??= { matches: true, addEventListener(type, fn) { changes[q] = fn; } }; | |
| 243 | + | const media = globalThis.matchMedia('(max-width: 720px)'); | |
| 244 | + | const touchQuery = '(pointer: coarse), (hover: none)'; | |
| 245 | + | const resize = () => changes['(max-width: 720px)'](); | |
| 246 | + | globalThis.fetch = async () => { loaded = true; return { ok: true, status: 200, text: async () => '' }; }; | |
| 247 | + | globalThis.localStorage = globalThis.sessionStorage = { getItem: () => null }; | |
| 248 | + | const click = (link, modifiers = {}) => { | |
| 249 | + | const e = { target: { closest: () => link }, prevented: false, stopped: false, | |
| 250 | + | preventDefault() { this.prevented = true; }, stopPropagation() { this.stopped = true; }, ...modifiers }; | |
| 251 | + | diffs.events.click(e); | |
| 252 | + | return e; | |
| 253 | + | }; | |
| 254 | + | try { | |
| 255 | + | window.ermiteMR.start(); | |
| 256 | + | const bar = diffs.children[0]; | |
| 257 | + | const [button, status] = bar.children; | |
| 258 | + | assert.equal(bar.hidden, true, 'no commentable links in the initial window'); | |
| 259 | + | assert.equal(typeof diffs.events.click, 'function', 'delegation installed before lazy load'); | |
| 260 | + | await window.ermiteMR.load({ dataset: { src: '/files?from=25' } }); | |
| 261 | + | assert.equal(bar.hidden, false, 'lazy window refresh reveals range control'); | |
| 262 | + | assert.equal(diffs.dataset.mobile, 'true'); | |
| 263 | + | assert.equal(diffs.dataset.diff, 'split', 'preferred layout is retained'); | |
| 264 | + | media.matches = false; | |
| 265 | + | resize(); | |
| 266 | + | assert.equal(diffs.dataset.mobile, 'false', 'desktop menu returns to preferred layout'); | |
| 267 | + | assert.equal(diffs.dataset.diff, 'split'); | |
| 268 | + | assert.equal(click(a).prevented, false, 'normal single-line navigation is untouched'); | |
| 269 | + | button.events.click(); | |
| 270 | + | assert.equal(button.attrs['aria-pressed'], 'true'); | |
| 271 | + | assert.equal(click(a, { shiftKey: true }).prevented, false, 'desktop range selection is untouched'); | |
| 272 | + | const event = click(a); | |
| 273 | + | assert.equal(event.prevented, true); | |
| 274 | + | assert.equal(event.stopped, true); | |
| 275 | + | assert.ok('data-range-start' in a.attrs); | |
| 276 | + | assert.match(status.textContent, /20/); | |
| 277 | + | click(b); | |
| 278 | + | assert.equal(new URL(assigned).searchParams.get('on'), 'new:10-20:a.go'); | |
| 279 | + | assert.equal('data-range-start' in a.attrs, false); | |
| 280 | + | click(a); | |
| 281 | + | button.events.click(); | |
| 282 | + | assert.equal(button.attrs['aria-pressed'], 'false'); | |
| 283 | + | assert.equal(status.textContent, ''); | |
| 284 | + | assert.equal('data-range-start' in a.attrs, false); | |
| 285 | + | assert.equal(click(b).prevented, false); | |
| 286 | + | // The touch media query stops matching: range mode is switched off. | |
| 287 | + | button.events.click(); | |
| 288 | + | click(a); | |
| 289 | + | assert.equal(button.attrs['aria-pressed'], 'true'); | |
| 290 | + | assert.ok('data-range-start' in a.attrs); | |
| 291 | + | medias[touchQuery].matches = false; | |
| 292 | + | changes[touchQuery](); | |
| 293 | + | assert.equal(button.attrs['aria-pressed'], 'false'); | |
| 294 | + | assert.equal(status.textContent, ''); | |
| 295 | + | assert.equal('data-range-start' in a.attrs, false); | |
| 296 | + | assert.equal(click(b).prevented, false, 'clicks pass through once touch stops matching'); | |
| 297 | + | } finally { | |
| 298 | + | for (const [k, v] of Object.entries(saved)) { | |
| 299 | + | if (v === undefined) delete globalThis[k]; else globalThis[k] = v; | |
| 300 | + | } | |
| 301 | + | } | |
| 302 | + | }); | |
| @@ -92,3 +92,211 @@ for (const dataset of [{diff:'split'}, {view:'split'}]) test(`reveal selects the | |||||
| 92 | globalThis.requestAnimationFrame=savedRAF; | 92 | globalThis.requestAnimationFrame=savedRAF; | ||
| 93 | } | 93 | } | ||
| 94 | }); | 94 | }); | ||
| 95 | + | ||||
| 96 | + | test('footer tabs switch panels, support arrows, and open on checks hash', () => { | |||
| 97 | + | const oldDocument = globalThis.document; | |||
| 98 | + | const oldLocation = globalThis.location; | |||
| 99 | + | const oldAdd = globalThis.addEventListener; | |||
| 100 | + | const oldHistory = globalThis.history; | |||
| 101 | + | const listeners = {}; | |||
| 102 | + | const replaced = []; | |||
| 103 | + | globalThis.history = { replaceState: (...args) => replaced.push(args) }; | |||
| 104 | + | const node = (id) => ({ id, attrs: {}, events: {}, hidden: false, | |||
| 105 | + | setAttribute(k,v) { this.attrs[k]=v; }, | |||
| 106 | + | addEventListener(k,v) { this.events[k]=v; }, focus() { this.focused=true; } }); | |||
| 107 | + | const tabs = [node('mr-tab-commits'), node('mr-tab-checks')]; | |||
| 108 | + | const panels = [node('mr-commits'), node('mr-checks-panel')]; | |||
| 109 | + | const footer = node('mr-panels'); footer.open=false; | |||
| 110 | + | const nav = node('tabs'); nav.querySelectorAll=()=>tabs; | |||
| 111 | + | footer.querySelectorAll=()=>panels; | |||
| 112 | + | globalThis.document = {querySelector: (s) => s === '#mr-panels' ? footer : s === '[data-mr-tabs]' ? nav : null, | |||
| 113 | + | addEventListener(k,v) {listeners[k]=v;} }; | |||
| 114 | + | globalThis.location = {hash:''}; | |||
| 115 | + | globalThis.addEventListener = (k,v) => {listeners[k]=v;}; | |||
| 116 | + | try { | |||
| 117 | + | window.ermiteMR.panels(); | |||
| 118 | + | assert.equal(footer.open,false); | |||
| 119 | + | assert.equal(panels[0].hidden,false); | |||
| 120 | + | assert.equal(panels[1].hidden,true); | |||
| 121 | + | assert.deepEqual(replaced, [], 'initial selection leaves the URL alone'); | |||
| 122 | + | tabs[1].events.click({preventDefault(){}}); | |||
| 123 | + | assert.deepEqual(replaced, [[null, '', '#mr-checks-panel']]); | |||
| 124 | + | assert.equal(panels[0].hidden,true); | |||
| 125 | + | assert.equal(tabs[1].attrs['aria-selected'],'true'); | |||
| 126 | + | tabs[1].events.keydown({key:'ArrowRight',preventDefault(){}}); | |||
| 127 | + | assert.equal(tabs[0].focused,true); | |||
| 128 | + | assert.equal(panels[0].hidden,false); | |||
| 129 | + | assert.deepEqual(replaced.at(-1), [null, '', '#mr-commits']); | |||
| 130 | + | location.hash='#mr-checks'; replaced.length = 0; listeners.hashchange(); | |||
| 131 | + | assert.deepEqual(replaced, [], 'hash navigation does not rewrite the URL'); | |||
| 132 | + | assert.equal(footer.open,true); | |||
| 133 | + | assert.equal(panels[1].hidden,false); | |||
| 134 | + | footer.open=false; | |||
| 135 | + | listeners.click({target:{closest:()=>true}}); | |||
| 136 | + | assert.equal(footer.open,true); | |||
| 137 | + | assert.equal(C.tabIndex('Home',1,2),0); | |||
| 138 | + | assert.equal(C.tabIndex('End',0,2),1); | |||
| 139 | + | assert.equal(C.tabIndex('ArrowLeft',0,2),1); | |||
| 140 | + | assert.equal(C.tabIndex('Escape',0,2),null); | |||
| 141 | + | } finally { | |||
| 142 | + | globalThis.document=oldDocument; globalThis.location=oldLocation; globalThis.addEventListener=oldAdd; | |||
| 143 | + | if (oldHistory === undefined) delete globalThis.history; else globalThis.history = oldHistory; | |||
| 144 | + | } | |||
| 145 | + | }); | |||
| 146 | + | ||||
| 147 | + | test('footer: #mr-ck syncs the checks label and a click opens the footer on Checks', () => { | |||
| 148 | + | const saved = Object.fromEntries(['document', 'location', 'addEventListener', 'history', 'MutationObserver'].map((k) => [k, globalThis[k]])); | |||
| 149 | + | const node = (id) => ({ id, attrs: {}, events: {}, hidden: false, | |||
| 150 | + | setAttribute(k, v) { this.attrs[k] = v; }, addEventListener(k, v) { this.events[k] = v; }, focus() {} }); | |||
| 151 | + | const tabs = [node('t0'), node('t1')]; | |||
| 152 | + | const panels = [node('mr-commits'), node('mr-checks-panel')]; | |||
| 153 | + | const footer = node('mr-panels'); footer.open = false; footer.querySelectorAll = () => panels; | |||
| 154 | + | const label = { textContent: '' }; | |||
| 155 | + | const nav = node('tabs'); nav.querySelectorAll = () => tabs; | |||
| 156 | + | nav.querySelector = (s) => s === '[data-checks-label]' ? label : null; | |||
| 157 | + | const summary = { title: '1/2 failed', textContent: ' 1/2 ', parentElement: {} }; | |||
| 158 | + | const listeners = {}; | |||
| 159 | + | let observed = null, callback = null; | |||
| 160 | + | globalThis.MutationObserver = class { constructor(fn) { callback = fn; } observe(target, opts) { observed = [target, opts]; } }; | |||
| 161 | + | globalThis.document = { querySelector: (s) => s === '#mr-panels' ? footer : s === '[data-mr-tabs]' ? nav : s === '#mr-ck' ? summary : null, | |||
| 162 | + | addEventListener(k, v) { listeners[k] = v; } }; | |||
| 163 | + | globalThis.location = { hash: '' }; | |||
| 164 | + | globalThis.addEventListener = () => {}; | |||
| 165 | + | globalThis.history = { replaceState() {} }; | |||
| 166 | + | try { | |||
| 167 | + | window.ermiteMR.panels(); | |||
| 168 | + | assert.equal(label.textContent, '1/2 failed', 'initial label sync'); | |||
| 169 | + | assert.equal(observed[0], summary.parentElement); | |||
| 170 | + | summary.title = ''; callback(); | |||
| 171 | + | assert.equal(label.textContent, '1/2', 'observer re-syncs from the text'); | |||
| 172 | + | summary.textContent = ' '; callback(); | |||
| 173 | + | assert.equal(label.textContent, 'no checks'); | |||
| 174 | + | listeners.click({ target: { closest: (s) => s === '#mr-ck' ? summary : null } }); | |||
| 175 | + | assert.equal(footer.open, true); | |||
| 176 | + | assert.equal(panels[1].hidden, false); | |||
| 177 | + | assert.equal(panels[0].hidden, true); | |||
| 178 | + | assert.equal(tabs[1].attrs['aria-selected'], 'true'); | |||
| 179 | + | } finally { | |||
| 180 | + | for (const [k, v] of Object.entries(saved)) { if (v === undefined) delete globalThis[k]; else globalThis[k] = v; } | |||
| 181 | + | } | |||
| 182 | + | }); | |||
| 183 | + | ||||
| 184 | + | test('touch range: first tap anchors, second tap opens the sorted range', () => { | |||
| 185 | + | const base = 'https://forge.test/demo/merge-requests/1'; | |||
| 186 | + | const first = base + '?on=new:24:a.go#f1'; | |||
| 187 | + | const last = base + '?on=new:10:a.go#f1'; | |||
| 188 | + | assert.deepEqual(C.touchRange(null, first, base), { start: first, url: null }); | |||
| 189 | + | const result = C.touchRange(first, last, base); | |||
| 190 | + | assert.equal(result.start, null); | |||
| 191 | + | assert.equal(new URL(result.url).searchParams.get('on'), 'new:10-24:a.go'); | |||
| 192 | + | assert.deepEqual(C.touchRange(first, first, base), { start: null, url: first }); | |||
| 193 | + | }); | |||
| 194 | + | ||||
| 195 | + | test('touch range: a different file, side or request becomes a new anchor', () => { | |||
| 196 | + | const base = 'https://forge.test/demo/merge-requests/1'; | |||
| 197 | + | const first = base + '?on=new:24:a.go#f1'; | |||
| 198 | + | for (const next of [first.replace('new:', 'old:'), first.replace('a.go', 'b.go'), first.replace('/1?', '/2?')]) { | |||
| 199 | + | assert.deepEqual(C.touchRange(first, next, base), { start: next, url: null }); | |||
| 200 | + | } | |||
| 201 | + | }); | |||
| 202 | + | ||||
| 203 | + | test('mobile unified fallback only redirects single-layout split pages and preserves query/hash', () => { | |||
| 204 | + | const href = 'https://forge.test/demo/merge-requests/1?view=split&from=25&on=new:3:a.go#f26'; | |||
| 205 | + | assert.equal(C.mobileURL(href, 'split', false), null); | |||
| 206 | + | assert.equal(C.mobileURL(href, undefined, true), null, 'both layouts are switched by CSS'); | |||
| 207 | + | assert.equal(C.mobileURL(href, 'unified', true), null, 'no redirect loop'); | |||
| 208 | + | const url = new URL(C.mobileURL(href, 'split', true)); | |||
| 209 | + | assert.equal(url.searchParams.get('view'), 'unified'); | |||
| 210 | + | assert.equal(url.searchParams.get('from'), '25'); | |||
| 211 | + | assert.equal(url.searchParams.get('on'), 'new:3:a.go'); | |||
| 212 | + | assert.equal(url.hash, '#f26'); | |||
| 213 | + | }); | |||
| 214 | + | ||||
| 215 | + | test('touch control: lazy links enable toolbar; ordinary taps pass through; ranges navigate and cancel', async () => { | |||
| 216 | + | const saved = Object.fromEntries(['document', 'location', 'addEventListener', 'localStorage', 'sessionStorage', 'fetch', 'matchMedia'].map((k) => [k, globalThis[k]])); | |||
| 217 | + | const make = () => ({ | |||
| 218 | + | attrs: {}, events: {}, children: [], textContent: '', | |||
| 219 | + | setAttribute(k, v) { this.attrs[k] = v; }, | |||
| 220 | + | removeAttribute(k) { delete this.attrs[k]; }, | |||
| 221 | + | addEventListener(k, fn) { this.events[k] = fn; }, | |||
| 222 | + | append(...nodes) { this.children.push(...nodes); }, | |||
| 223 | + | prepend(node) { this.children.unshift(node); }, | |||
| 224 | + | querySelector() { return null; }, querySelectorAll() { return []; }, | |||
| 225 | + | }); | |||
| 226 | + | const diffs = make(); | |||
| 227 | + | diffs.dataset = { diff: 'split' }; | |||
| 228 | + | const base = 'https://forge.test/demo/merge-requests/1'; | |||
| 229 | + | const line = (n) => Object.assign(make(), { href: `${base}?on=new:${n}:a.go#f1`, textContent: String(n) }); | |||
| 230 | + | const a = line(20), b = line(10); | |||
| 231 | + | let loaded = false; | |||
| 232 | + | diffs.querySelector = () => loaded ? a : null; | |||
| 233 | + | let assigned = null; | |||
| 234 | + | globalThis.document = { | |||
| 235 | + | querySelector: (sel) => sel === '#diffs[data-mr]' || sel === '#diffs' ? diffs : null, | |||
| 236 | + | querySelectorAll: () => [], createElement: (tag) => tag === 'template' ? { content: { querySelectorAll: () => [] } } : make(), | |||
| 237 | + | }; | |||
| 238 | + | globalThis.location = { href: base, pathname: '/demo/merge-requests/1', hash: '', assign(url) { assigned = url; } }; | |||
| 239 | + | globalThis.addEventListener = () => {}; | |||
| 240 | + | const changes = {}; | |||
| 241 | + | const medias = {}; | |||
| 242 | + | globalThis.matchMedia = (q) => medias[q] ??= { matches: true, addEventListener(type, fn) { changes[q] = fn; } }; | |||
| 243 | + | const media = globalThis.matchMedia('(max-width: 720px)'); | |||
| 244 | + | const touchQuery = '(pointer: coarse), (hover: none)'; | |||
| 245 | + | const resize = () => changes['(max-width: 720px)'](); | |||
| 246 | + | globalThis.fetch = async () => { loaded = true; return { ok: true, status: 200, text: async () => '' }; }; | |||
| 247 | + | globalThis.localStorage = globalThis.sessionStorage = { getItem: () => null }; | |||
| 248 | + | const click = (link, modifiers = {}) => { | |||
| 249 | + | const e = { target: { closest: () => link }, prevented: false, stopped: false, | |||
| 250 | + | preventDefault() { this.prevented = true; }, stopPropagation() { this.stopped = true; }, ...modifiers }; | |||
| 251 | + | diffs.events.click(e); | |||
| 252 | + | return e; | |||
| 253 | + | }; | |||
| 254 | + | try { | |||
| 255 | + | window.ermiteMR.start(); | |||
| 256 | + | const bar = diffs.children[0]; | |||
| 257 | + | const [button, status] = bar.children; | |||
| 258 | + | assert.equal(bar.hidden, true, 'no commentable links in the initial window'); | |||
| 259 | + | assert.equal(typeof diffs.events.click, 'function', 'delegation installed before lazy load'); | |||
| 260 | + | await window.ermiteMR.load({ dataset: { src: '/files?from=25' } }); | |||
| 261 | + | assert.equal(bar.hidden, false, 'lazy window refresh reveals range control'); | |||
| 262 | + | assert.equal(diffs.dataset.mobile, 'true'); | |||
| 263 | + | assert.equal(diffs.dataset.diff, 'split', 'preferred layout is retained'); | |||
| 264 | + | media.matches = false; | |||
| 265 | + | resize(); | |||
| 266 | + | assert.equal(diffs.dataset.mobile, 'false', 'desktop menu returns to preferred layout'); | |||
| 267 | + | assert.equal(diffs.dataset.diff, 'split'); | |||
| 268 | + | assert.equal(click(a).prevented, false, 'normal single-line navigation is untouched'); | |||
| 269 | + | button.events.click(); | |||
| 270 | + | assert.equal(button.attrs['aria-pressed'], 'true'); | |||
| 271 | + | assert.equal(click(a, { shiftKey: true }).prevented, false, 'desktop range selection is untouched'); | |||
| 272 | + | const event = click(a); | |||
| 273 | + | assert.equal(event.prevented, true); | |||
| 274 | + | assert.equal(event.stopped, true); | |||
| 275 | + | assert.ok('data-range-start' in a.attrs); | |||
| 276 | + | assert.match(status.textContent, /20/); | |||
| 277 | + | click(b); | |||
| 278 | + | assert.equal(new URL(assigned).searchParams.get('on'), 'new:10-20:a.go'); | |||
| 279 | + | assert.equal('data-range-start' in a.attrs, false); | |||
| 280 | + | click(a); | |||
| 281 | + | button.events.click(); | |||
| 282 | + | assert.equal(button.attrs['aria-pressed'], 'false'); | |||
| 283 | + | assert.equal(status.textContent, ''); | |||
| 284 | + | assert.equal('data-range-start' in a.attrs, false); | |||
| 285 | + | assert.equal(click(b).prevented, false); | |||
| 286 | + | // The touch media query stops matching: range mode is switched off. | |||
| 287 | + | button.events.click(); | |||
| 288 | + | click(a); | |||
| 289 | + | assert.equal(button.attrs['aria-pressed'], 'true'); | |||
| 290 | + | assert.ok('data-range-start' in a.attrs); | |||
| 291 | + | medias[touchQuery].matches = false; | |||
| 292 | + | changes[touchQuery](); | |||
| 293 | + | assert.equal(button.attrs['aria-pressed'], 'false'); | |||
| 294 | + | assert.equal(status.textContent, ''); | |||
| 295 | + | assert.equal('data-range-start' in a.attrs, false); | |||
| 296 | + | assert.equal(click(b).prevented, false, 'clicks pass through once touch stops matching'); | |||
| 297 | + | } finally { | |||
| 298 | + | for (const [k, v] of Object.entries(saved)) { | |||
| 299 | + | if (v === undefined) delete globalThis[k]; else globalThis[k] = v; | |||
| 300 | + | } | |||
| 301 | + | } | |||
| 302 | + | }); | |||
M internal/adapters/web/mr.go +3 -0
| @@ -291,6 +291,7 @@ type MRPage struct { | |||
| 291 | 291 | ||
| 292 | 292 | Commits []MRCommit | |
| 293 | 293 | CommitsNote string | |
| 294 | + | CommitCount string | |
| 294 | 295 | Modes []string | |
| 295 | 296 | ChecksBlock bool | |
| 296 | 297 | // Checks are the CI checks of the head of the request, ChecksSum their | |
| @@ -734,7 +735,9 @@ func (s *Server) mrReadPresentation(p *MRPage, name string, n int64, res ports.M | |||
| 734 | 735 | }) | |
| 735 | 736 | } | |
| 736 | 737 | lastRead := res.LastReadID.String() | |
| 738 | + | p.CommitCount = itoa(len(p.Commits)) | |
| 737 | 739 | if res.CommitsTruncated { | |
| 740 | + | p.CommitCount += "+" | |
| 738 | 741 | p.CommitsNote = "the branch has more commits than the " + itoa(len(p.Commits)) + " listed." | |
| 739 | 742 | } | |
| 740 | 743 | ||
| @@ -291,6 +291,7 @@ type MRPage struct { | |||||
| 291 | 291 | ||||
| 292 | Commits []MRCommit | 292 | Commits []MRCommit | ||
| 293 | CommitsNote string | 293 | CommitsNote string | ||
| 294 | + | CommitCount string | |||
| 294 | Modes []string | 295 | Modes []string | ||
| 295 | ChecksBlock bool | 296 | ChecksBlock bool | ||
| 296 | // Checks are the CI checks of the head of the request, ChecksSum their | 297 | // Checks are the CI checks of the head of the request, ChecksSum their | ||
| @@ -734,7 +735,9 @@ func (s *Server) mrReadPresentation(p *MRPage, name string, n int64, res ports.M | |||||
| 734 | }) | 735 | }) | ||
| 735 | } | 736 | } | ||
| 736 | lastRead := res.LastReadID.String() | 737 | lastRead := res.LastReadID.String() | ||
| 738 | + | p.CommitCount = itoa(len(p.Commits)) | |||
| 737 | if res.CommitsTruncated { | 739 | if res.CommitsTruncated { | ||
| 740 | + | p.CommitCount += "+" | |||
| 738 | p.CommitsNote = "the branch has more commits than the " + itoa(len(p.Commits)) + " listed." | 741 | p.CommitsNote = "the branch has more commits than the " + itoa(len(p.Commits)) + " listed." | ||
| 739 | } | 742 | } | ||
| 740 | 743 | ||||
M internal/adapters/web/mr.templ +108 -84
| @@ -108,8 +108,9 @@ templ mrListRail(p MRListPage) { | |||
| 108 | 108 | } | |
| 109 | 109 | ||
| 110 | 110 | // MergeRequest is a merge request: its facts, its description, the diff with | |
| 111 | - | // the notes under their lines, the general comments; and in the rail the merge | |
| 112 | - | // form, the checks, the settings, the commits and the files. | |
| 111 | + | // the notes under their lines, the general comments. The merge and More menus | |
| 112 | + | // sit in the toolbar, the commits and checks in the card footer, and the rail | |
| 113 | + | // holds the files and verdicts. | |
| 113 | 114 | templ MergeRequest(l Layout, p MRPage) { | |
| 114 | 115 | @Shell(l, mrRail(p)) { | |
| 115 | 116 | <section class="mr-card"> | |
| @@ -147,6 +148,7 @@ templ MergeRequest(l Layout, p MRPage) { | |||
| 147 | 148 | @templ.Raw(string(p.Desc)) | |
| 148 | 149 | </article> | |
| 149 | 150 | } | |
| 151 | + | @mrFooter(p) | |
| 150 | 152 | </section> | |
| 151 | 153 | if p.Deleting != "" { | |
| 152 | 154 | <p class="note" role="status">merged. the branch { p.Deleting } is being deleted.</p> | |
| @@ -366,6 +368,65 @@ templ commentForm(f CommentForm, suffix string) { | |||
| 366 | 368 | </form> | |
| 367 | 369 | } | |
| 368 | 370 | ||
| 371 | + | templ mrFooter(p MRPage) { | |
| 372 | + | <footer class="mr-footer"> | |
| 373 | + | <details id="mr-panels"> | |
| 374 | + | <summary>Commits <span class="count">{ p.CommitCount }</span> · Checks</summary> | |
| 375 | + | <nav data-mr-tabs aria-label="Branch details"> | |
| 376 | + | <a id="mr-tab-commits" href="#mr-commits">Commits <span class="count">{ p.CommitCount }</span></a> | |
| 377 | + | <a id="mr-tab-checks" href="#mr-checks"> | |
| 378 | + | { "Checks " } | |
| 379 | + | <span data-checks-label> | |
| 380 | + | if p.ChecksSum.Total > 0 { | |
| 381 | + | { p.ChecksSum.Title } | |
| 382 | + | } else { | |
| 383 | + | no checks | |
| 384 | + | } | |
| 385 | + | </span> | |
| 386 | + | </a> | |
| 387 | + | </nav> | |
| 388 | + | <div id="mr-commits" data-mr-panel aria-labelledby="mr-tab-commits"> | |
| 389 | + | <table class="mr-commits"> | |
| 390 | + | <thead><tr><th>Commit</th><th>Subject</th><th>Author</th><th>Date</th><th>Signature</th><th>Status</th></tr></thead> | |
| 391 | + | <tbody> | |
| 392 | + | for _, c := range p.Commits { | |
| 393 | + | <tr data-new?={ c.New }> | |
| 394 | + | <td><a href={ templ.SafeURL(c.Href) }>{ c.Short }</a></td> | |
| 395 | + | <td>{ c.Subject }</td> | |
| 396 | + | <td>{ c.Author }</td> | |
| 397 | + | <td> | |
| 398 | + | if c.WhenAt != "" { | |
| 399 | + | <time datetime={ c.WhenAt }>{ c.When }</time> | |
| 400 | + | } | |
| 401 | + | </td> | |
| 402 | + | <td> | |
| 403 | + | if c.Sig != nil { | |
| 404 | + | @signaturePill(c.Sig) | |
| 405 | + | } | |
| 406 | + | </td> | |
| 407 | + | <td> | |
| 408 | + | if c.New { | |
| 409 | + | <span>new</span> | |
| 410 | + | } | |
| 411 | + | </td> | |
| 412 | + | </tr> | |
| 413 | + | } | |
| 414 | + | </tbody> | |
| 415 | + | </table> | |
| 416 | + | if len(p.Commits) == 0 { | |
| 417 | + | <p class="dim">no commit to merge.</p> | |
| 418 | + | } | |
| 419 | + | if p.CommitsNote != "" { | |
| 420 | + | <p class="note">{ p.CommitsNote }</p> | |
| 421 | + | } | |
| 422 | + | </div> | |
| 423 | + | <div id="mr-checks-panel" data-mr-panel aria-labelledby="mr-tab-checks"> | |
| 424 | + | @MRChecks(p.Checks) | |
| 425 | + | </div> | |
| 426 | + | </details> | |
| 427 | + | </footer> | |
| 428 | + | } | |
| 429 | + | ||
| 369 | 430 | templ mrRail(p MRPage) { | |
| 370 | 431 | <section aria-labelledby="r-files" class="r-files"> | |
| 371 | 432 | <h2 id="r-files"> | |
| @@ -391,51 +452,6 @@ templ mrRail(p MRPage) { | |||
| 391 | 452 | </ul> | |
| 392 | 453 | </section> | |
| 393 | 454 | } | |
| 394 | - | @MRChecks(p.Checks) | |
| 395 | - | <section aria-labelledby="r-commits"> | |
| 396 | - | <h2 id="r-commits">Commits <span class="count">{ itoa(len(p.Commits)) }</span></h2> | |
| 397 | - | <ul class="pcommits"> | |
| 398 | - | for _, c := range p.Commits { | |
| 399 | - | <li data-new?={ c.New }> | |
| 400 | - | <a href={ templ.SafeURL(c.Href) }>{ c.Short }</a> | |
| 401 | - | <span class="s">{ c.Subject }</span> | |
| 402 | - | if c.Sig != nil { | |
| 403 | - | @signaturePill(c.Sig) | |
| 404 | - | } | |
| 405 | - | <span class="mute"> | |
| 406 | - | { c.Author } | |
| 407 | - | if c.WhenAt != "" { | |
| 408 | - | { " · " }<time datetime={ c.WhenAt }>{ c.When }</time> | |
| 409 | - | } | |
| 410 | - | if c.New { | |
| 411 | - | { " · new" } | |
| 412 | - | } | |
| 413 | - | </span> | |
| 414 | - | </li> | |
| 415 | - | } | |
| 416 | - | </ul> | |
| 417 | - | if len(p.Commits) == 0 { | |
| 418 | - | <p class="dim">no commit to merge.</p> | |
| 419 | - | } | |
| 420 | - | if p.CommitsNote != "" { | |
| 421 | - | <p class="note">{ p.CommitsNote }</p> | |
| 422 | - | } | |
| 423 | - | </section> | |
| 424 | - | <section aria-labelledby="r-settings"> | |
| 425 | - | <h2 id="r-settings">Settings</h2> | |
| 426 | - | <dl class="kv"> | |
| 427 | - | <dt>modes</dt> | |
| 428 | - | <dd>{ strings.Join(p.Modes, ", ") }</dd> | |
| 429 | - | <dt>checks</dt> | |
| 430 | - | <dd> | |
| 431 | - | if p.ChecksBlock { | |
| 432 | - | failing ones block the merge | |
| 433 | - | } else { | |
| 434 | - | do not block the merge | |
| 435 | - | } | |
| 436 | - | </dd> | |
| 437 | - | </dl> | |
| 438 | - | </section> | |
| 439 | 455 | } | |
| 440 | 456 | ||
| 441 | 457 | // mrBar is the bar above the diff, which follows the review: the totals, the | |
| @@ -450,8 +466,8 @@ templ mrBar(p MRPage) { | |||
| 450 | 466 | @MRChecksSum(p.ChecksSum) | |
| 451 | 467 | if p.Box != nil { | |
| 452 | 468 | @mergeMenu(p) | |
| 453 | - | @moreMenu(p) | |
| 454 | 469 | } | |
| 470 | + | @moreMenu(p) | |
| 455 | 471 | </div> | |
| 456 | 472 | } | |
| 457 | 473 | ||
| @@ -474,18 +490,9 @@ templ mergeMenu(p MRPage) { | |||
| 474 | 490 | <kbd aria-hidden="true">M</kbd> | |
| 475 | 491 | </summary> | |
| 476 | 492 | <div class="menu-pop" role="group" aria-label="Merge"> | |
| 477 | - | <dl class="kv"> | |
| 478 | - | <dt>head</dt> | |
| 479 | - | <dd> | |
| 480 | - | if p.Box.HeadGone { | |
| 481 | - | gone: the source branch was deleted | |
| 482 | - | } else { | |
| 483 | - | { p.HeadShort } | |
| 484 | - | } | |
| 485 | - | </dd> | |
| 486 | - | <dt>into</dt> | |
| 487 | - | <dd>{ p.Target }</dd> | |
| 488 | - | </dl> | |
| 493 | + | if p.Box.HeadGone { | |
| 494 | + | <p class="dim">the source branch was deleted</p> | |
| 495 | + | } | |
| 489 | 496 | if p.Box.Error != "" { | |
| 490 | 497 | <p class="d-err" role="alert">{ p.Box.Error }</p> | |
| 491 | 498 | } | |
| @@ -519,15 +526,6 @@ templ mergeMenu(p MRPage) { | |||
| 519 | 526 | </label> | |
| 520 | 527 | } | |
| 521 | 528 | </fieldset> | |
| 522 | - | if p.Box.Signed { | |
| 523 | - | <p class="d-note" id="mr-signing"> | |
| 524 | - | squash and merge commits are signed with ermite's own key (generated on first start). | |
| 525 | - | if p.Box.Fingerprint != "" { | |
| 526 | - | fingerprint <code>{ p.Box.Fingerprint }</code> | |
| 527 | - | } | |
| 528 | - | <code>ermite signing-key show</code> prints it. | |
| 529 | - | </p> | |
| 530 | - | } | |
| 531 | 529 | if p.Box.CanDeleteBranch { | |
| 532 | 530 | <label class="d-check"><input type="checkbox" name="delete_branch" value="1"/> delete { p.Source } after the merge <kbd aria-hidden="true">D</kbd></label> | |
| 533 | 531 | } | |
| @@ -589,26 +587,52 @@ templ MRMergeabilityFragment(v MergeabilityView) { | |||
| 589 | 587 | @mrMergeabilitySlot(v) | |
| 590 | 588 | } | |
| 591 | 589 | ||
| 592 | - | // moreMenu is what else the owner does with an open request: mark the head | |
| 593 | - | // read, close it, merge it from a terminal. | |
| 590 | + | // moreMenu shows read-only settings to every viewer, and keeps owner actions | |
| 591 | + | // behind the same merge-box permission as before. | |
| 594 | 592 | templ moreMenu(p MRPage) { | |
| 595 | 593 | <details class="menu omenu"> | |
| 596 | 594 | <summary class="btn icon" aria-label="More actions" title="more actions">⋯</summary> | |
| 597 | 595 | <div class="menu-pop" role="group" aria-label="More actions"> | |
| 598 | - | if p.Box.CanMarkRead { | |
| 599 | - | <form method="post" action={ templ.SafeURL(p.Box.ReadAction) }> | |
| 600 | - | <input type="hidden" name="head_id" value={ p.Box.Head }/> | |
| 601 | - | <button type="submit" title="the next visit can show only what changed after this head" class="btn" aria-keyshortcuts="Shift+R" data-read>Mark read <kbd aria-hidden="true">R</kbd></button> | |
| 596 | + | <section class="merge-settings"> | |
| 597 | + | <h2>Merge settings</h2> | |
| 598 | + | <dl class="kv"> | |
| 599 | + | <dt>modes</dt> | |
| 600 | + | <dd>{ strings.Join(p.Modes, ", ") }</dd> | |
| 601 | + | <dt>checks</dt> | |
| 602 | + | <dd> | |
| 603 | + | if p.ChecksBlock { | |
| 604 | + | failing ones block the merge | |
| 605 | + | } else { | |
| 606 | + | do not block the merge | |
| 607 | + | } | |
| 608 | + | </dd> | |
| 609 | + | </dl> | |
| 610 | + | </section> | |
| 611 | + | if p.Box != nil { | |
| 612 | + | if p.Box.Signed { | |
| 613 | + | <p class="d-note" id="mr-signing"> | |
| 614 | + | squash and merge commits are signed with ermite's own key (generated on first start). | |
| 615 | + | if p.Box.Fingerprint != "" { | |
| 616 | + | fingerprint <code>{ p.Box.Fingerprint }</code> | |
| 617 | + | } | |
| 618 | + | <code>ermite signing-key show</code> prints it. | |
| 619 | + | </p> | |
| 620 | + | } | |
| 621 | + | if p.Box.CanMarkRead { | |
| 622 | + | <form method="post" action={ templ.SafeURL(p.Box.ReadAction) }> | |
| 623 | + | <input type="hidden" name="head_id" value={ p.Box.Head }/> | |
| 624 | + | <button type="submit" title="the next visit can show only what changed after this head" class="btn" aria-keyshortcuts="Shift+R" data-read>Mark read <kbd aria-hidden="true">R</kbd></button> | |
| 625 | + | </form> | |
| 626 | + | } | |
| 627 | + | <form method="post" action={ templ.SafeURL(p.Box.CloseAction) }> | |
| 628 | + | <button type="submit" title="close without merging; the branch is kept" class="btn danger">Close</button> | |
| 602 | 629 | </form> | |
| 603 | - | } | |
| 604 | - | <form method="post" action={ templ.SafeURL(p.Box.CloseAction) }> | |
| 605 | - | <button type="submit" title="close without merging; the branch is kept" class="btn danger">Close</button> | |
| 606 | - | </form> | |
| 607 | - | if !p.Box.HeadGone && p.Box.ReadyAction == "" { | |
| 608 | - | <details class="d-or"> | |
| 609 | - | <summary class="mute">or from a terminal</summary> | |
| 610 | - | @CloneBlock(p.Box.CLI) | |
| 611 | - | </details> | |
| 630 | + | if !p.Box.HeadGone && p.Box.ReadyAction == "" { | |
| 631 | + | <details class="d-or"> | |
| 632 | + | <summary class="mute">or from a terminal</summary> | |
| 633 | + | @CloneBlock(p.Box.CLI) | |
| 634 | + | </details> | |
| 635 | + | } | |
| 612 | 636 | } | |
| 613 | 637 | </div> | |
| 614 | 638 | </details> | |
| @@ -108,8 +108,9 @@ templ mrListRail(p MRListPage) { | |||||
| 108 | } | 108 | } | ||
| 109 | 109 | ||||
| 110 | // MergeRequest is a merge request: its facts, its description, the diff with | 110 | // MergeRequest is a merge request: its facts, its description, the diff with | ||
| 111 | - | // the notes under their lines, the general comments; and in the rail the merge | 111 | + | // the notes under their lines, the general comments. The merge and More menus |
| 112 | - | // form, the checks, the settings, the commits and the files. | 112 | + | // sit in the toolbar, the commits and checks in the card footer, and the rail |
| 113 | + | // holds the files and verdicts. | |||
| 113 | templ MergeRequest(l Layout, p MRPage) { | 114 | templ MergeRequest(l Layout, p MRPage) { | ||
| 114 | @Shell(l, mrRail(p)) { | 115 | @Shell(l, mrRail(p)) { | ||
| 115 | <section class="mr-card"> | 116 | <section class="mr-card"> | ||
| @@ -147,6 +148,7 @@ templ MergeRequest(l Layout, p MRPage) { | |||||
| 147 | @templ.Raw(string(p.Desc)) | 148 | @templ.Raw(string(p.Desc)) | ||
| 148 | </article> | 149 | </article> | ||
| 149 | } | 150 | } | ||
| 151 | + | @mrFooter(p) | |||
| 150 | </section> | 152 | </section> | ||
| 151 | if p.Deleting != "" { | 153 | if p.Deleting != "" { | ||
| 152 | <p class="note" role="status">merged. the branch { p.Deleting } is being deleted.</p> | 154 | <p class="note" role="status">merged. the branch { p.Deleting } is being deleted.</p> | ||
| @@ -366,6 +368,65 @@ templ commentForm(f CommentForm, suffix string) { | |||||
| 366 | </form> | 368 | </form> | ||
| 367 | } | 369 | } | ||
| 368 | 370 | ||||
| 371 | + | templ mrFooter(p MRPage) { | |||
| 372 | + | <footer class="mr-footer"> | |||
| 373 | + | <details id="mr-panels"> | |||
| 374 | + | <summary>Commits <span class="count">{ p.CommitCount }</span> · Checks</summary> | |||
| 375 | + | <nav data-mr-tabs aria-label="Branch details"> | |||
| 376 | + | <a id="mr-tab-commits" href="#mr-commits">Commits <span class="count">{ p.CommitCount }</span></a> | |||
| 377 | + | <a id="mr-tab-checks" href="#mr-checks"> | |||
| 378 | + | { "Checks " } | |||
| 379 | + | <span data-checks-label> | |||
| 380 | + | if p.ChecksSum.Total > 0 { | |||
| 381 | + | { p.ChecksSum.Title } | |||
| 382 | + | } else { | |||
| 383 | + | no checks | |||
| 384 | + | } | |||
| 385 | + | </span> | |||
| 386 | + | </a> | |||
| 387 | + | </nav> | |||
| 388 | + | <div id="mr-commits" data-mr-panel aria-labelledby="mr-tab-commits"> | |||
| 389 | + | <table class="mr-commits"> | |||
| 390 | + | <thead><tr><th>Commit</th><th>Subject</th><th>Author</th><th>Date</th><th>Signature</th><th>Status</th></tr></thead> | |||
| 391 | + | <tbody> | |||
| 392 | + | for _, c := range p.Commits { | |||
| 393 | + | <tr data-new?={ c.New }> | |||
| 394 | + | <td><a href={ templ.SafeURL(c.Href) }>{ c.Short }</a></td> | |||
| 395 | + | <td>{ c.Subject }</td> | |||
| 396 | + | <td>{ c.Author }</td> | |||
| 397 | + | <td> | |||
| 398 | + | if c.WhenAt != "" { | |||
| 399 | + | <time datetime={ c.WhenAt }>{ c.When }</time> | |||
| 400 | + | } | |||
| 401 | + | </td> | |||
| 402 | + | <td> | |||
| 403 | + | if c.Sig != nil { | |||
| 404 | + | @signaturePill(c.Sig) | |||
| 405 | + | } | |||
| 406 | + | </td> | |||
| 407 | + | <td> | |||
| 408 | + | if c.New { | |||
| 409 | + | <span>new</span> | |||
| 410 | + | } | |||
| 411 | + | </td> | |||
| 412 | + | </tr> | |||
| 413 | + | } | |||
| 414 | + | </tbody> | |||
| 415 | + | </table> | |||
| 416 | + | if len(p.Commits) == 0 { | |||
| 417 | + | <p class="dim">no commit to merge.</p> | |||
| 418 | + | } | |||
| 419 | + | if p.CommitsNote != "" { | |||
| 420 | + | <p class="note">{ p.CommitsNote }</p> | |||
| 421 | + | } | |||
| 422 | + | </div> | |||
| 423 | + | <div id="mr-checks-panel" data-mr-panel aria-labelledby="mr-tab-checks"> | |||
| 424 | + | @MRChecks(p.Checks) | |||
| 425 | + | </div> | |||
| 426 | + | </details> | |||
| 427 | + | </footer> | |||
| 428 | + | } | |||
| 429 | + | ||||
| 369 | templ mrRail(p MRPage) { | 430 | templ mrRail(p MRPage) { | ||
| 370 | <section aria-labelledby="r-files" class="r-files"> | 431 | <section aria-labelledby="r-files" class="r-files"> | ||
| 371 | <h2 id="r-files"> | 432 | <h2 id="r-files"> | ||
| @@ -391,51 +452,6 @@ templ mrRail(p MRPage) { | |||||
| 391 | </ul> | 452 | </ul> | ||
| 392 | </section> | 453 | </section> | ||
| 393 | } | 454 | } | ||
| 394 | - | @MRChecks(p.Checks) | |||
| 395 | - | <section aria-labelledby="r-commits"> | |||
| 396 | - | <h2 id="r-commits">Commits <span class="count">{ itoa(len(p.Commits)) }</span></h2> | |||
| 397 | - | <ul class="pcommits"> | |||
| 398 | - | for _, c := range p.Commits { | |||
| 399 | - | <li data-new?={ c.New }> | |||
| 400 | - | <a href={ templ.SafeURL(c.Href) }>{ c.Short }</a> | |||
| 401 | - | <span class="s">{ c.Subject }</span> | |||
| 402 | - | if c.Sig != nil { | |||
| 403 | - | @signaturePill(c.Sig) | |||
| 404 | - | } | |||
| 405 | - | <span class="mute"> | |||
| 406 | - | { c.Author } | |||
| 407 | - | if c.WhenAt != "" { | |||
| 408 | - | { " · " }<time datetime={ c.WhenAt }>{ c.When }</time> | |||
| 409 | - | } | |||
| 410 | - | if c.New { | |||
| 411 | - | { " · new" } | |||
| 412 | - | } | |||
| 413 | - | </span> | |||
| 414 | - | </li> | |||
| 415 | - | } | |||
| 416 | - | </ul> | |||
| 417 | - | if len(p.Commits) == 0 { | |||
| 418 | - | <p class="dim">no commit to merge.</p> | |||
| 419 | - | } | |||
| 420 | - | if p.CommitsNote != "" { | |||
| 421 | - | <p class="note">{ p.CommitsNote }</p> | |||
| 422 | - | } | |||
| 423 | - | </section> | |||
| 424 | - | <section aria-labelledby="r-settings"> | |||
| 425 | - | <h2 id="r-settings">Settings</h2> | |||
| 426 | - | <dl class="kv"> | |||
| 427 | - | <dt>modes</dt> | |||
| 428 | - | <dd>{ strings.Join(p.Modes, ", ") }</dd> | |||
| 429 | - | <dt>checks</dt> | |||
| 430 | - | <dd> | |||
| 431 | - | if p.ChecksBlock { | |||
| 432 | - | failing ones block the merge | |||
| 433 | - | } else { | |||
| 434 | - | do not block the merge | |||
| 435 | - | } | |||
| 436 | - | </dd> | |||
| 437 | - | </dl> | |||
| 438 | - | </section> | |||
| 439 | } | 455 | } | ||
| 440 | 456 | ||||
| 441 | // mrBar is the bar above the diff, which follows the review: the totals, the | 457 | // mrBar is the bar above the diff, which follows the review: the totals, the | ||
| @@ -450,8 +466,8 @@ templ mrBar(p MRPage) { | |||||
| 450 | @MRChecksSum(p.ChecksSum) | 466 | @MRChecksSum(p.ChecksSum) | ||
| 451 | if p.Box != nil { | 467 | if p.Box != nil { | ||
| 452 | @mergeMenu(p) | 468 | @mergeMenu(p) | ||
| 453 | - | @moreMenu(p) | |||
| 454 | } | 469 | } | ||
| 470 | + | @moreMenu(p) | |||
| 455 | </div> | 471 | </div> | ||
| 456 | } | 472 | } | ||
| 457 | 473 | ||||
| @@ -474,18 +490,9 @@ templ mergeMenu(p MRPage) { | |||||
| 474 | <kbd aria-hidden="true">M</kbd> | 490 | <kbd aria-hidden="true">M</kbd> | ||
| 475 | </summary> | 491 | </summary> | ||
| 476 | <div class="menu-pop" role="group" aria-label="Merge"> | 492 | <div class="menu-pop" role="group" aria-label="Merge"> | ||
| 477 | - | <dl class="kv"> | 493 | + | if p.Box.HeadGone { |
| 478 | - | <dt>head</dt> | 494 | + | <p class="dim">the source branch was deleted</p> |
| 479 | - | <dd> | 495 | + | } |
| 480 | - | if p.Box.HeadGone { | |||
| 481 | - | gone: the source branch was deleted | |||
| 482 | - | } else { | |||
| 483 | - | { p.HeadShort } | |||
| 484 | - | } | |||
| 485 | - | </dd> | |||
| 486 | - | <dt>into</dt> | |||
| 487 | - | <dd>{ p.Target }</dd> | |||
| 488 | - | </dl> | |||
| 489 | if p.Box.Error != "" { | 496 | if p.Box.Error != "" { | ||
| 490 | <p class="d-err" role="alert">{ p.Box.Error }</p> | 497 | <p class="d-err" role="alert">{ p.Box.Error }</p> | ||
| 491 | } | 498 | } | ||
| @@ -519,15 +526,6 @@ templ mergeMenu(p MRPage) { | |||||
| 519 | </label> | 526 | </label> | ||
| 520 | } | 527 | } | ||
| 521 | </fieldset> | 528 | </fieldset> | ||
| 522 | - | if p.Box.Signed { | |||
| 523 | - | <p class="d-note" id="mr-signing"> | |||
| 524 | - | squash and merge commits are signed with ermite's own key (generated on first start). | |||
| 525 | - | if p.Box.Fingerprint != "" { | |||
| 526 | - | fingerprint <code>{ p.Box.Fingerprint }</code> | |||
| 527 | - | } | |||
| 528 | - | <code>ermite signing-key show</code> prints it. | |||
| 529 | - | </p> | |||
| 530 | - | } | |||
| 531 | if p.Box.CanDeleteBranch { | 529 | if p.Box.CanDeleteBranch { | ||
| 532 | <label class="d-check"><input type="checkbox" name="delete_branch" value="1"/> delete { p.Source } after the merge <kbd aria-hidden="true">D</kbd></label> | 530 | <label class="d-check"><input type="checkbox" name="delete_branch" value="1"/> delete { p.Source } after the merge <kbd aria-hidden="true">D</kbd></label> | ||
| 533 | } | 531 | } | ||
| @@ -589,26 +587,52 @@ templ MRMergeabilityFragment(v MergeabilityView) { | |||||
| 589 | @mrMergeabilitySlot(v) | 587 | @mrMergeabilitySlot(v) | ||
| 590 | } | 588 | } | ||
| 591 | 589 | ||||
| 592 | - | // moreMenu is what else the owner does with an open request: mark the head | 590 | + | // moreMenu shows read-only settings to every viewer, and keeps owner actions |
| 593 | - | // read, close it, merge it from a terminal. | 591 | + | // behind the same merge-box permission as before. |
| 594 | templ moreMenu(p MRPage) { | 592 | templ moreMenu(p MRPage) { | ||
| 595 | <details class="menu omenu"> | 593 | <details class="menu omenu"> | ||
| 596 | <summary class="btn icon" aria-label="More actions" title="more actions">⋯</summary> | 594 | <summary class="btn icon" aria-label="More actions" title="more actions">⋯</summary> | ||
| 597 | <div class="menu-pop" role="group" aria-label="More actions"> | 595 | <div class="menu-pop" role="group" aria-label="More actions"> | ||
| 598 | - | if p.Box.CanMarkRead { | 596 | + | <section class="merge-settings"> |
| 599 | - | <form method="post" action={ templ.SafeURL(p.Box.ReadAction) }> | 597 | + | <h2>Merge settings</h2> |
| 600 | - | <input type="hidden" name="head_id" value={ p.Box.Head }/> | 598 | + | <dl class="kv"> |
| 601 | - | <button type="submit" title="the next visit can show only what changed after this head" class="btn" aria-keyshortcuts="Shift+R" data-read>Mark read <kbd aria-hidden="true">R</kbd></button> | 599 | + | <dt>modes</dt> |
| 600 | + | <dd>{ strings.Join(p.Modes, ", ") }</dd> | |||
| 601 | + | <dt>checks</dt> | |||
| 602 | + | <dd> | |||
| 603 | + | if p.ChecksBlock { | |||
| 604 | + | failing ones block the merge | |||
| 605 | + | } else { | |||
| 606 | + | do not block the merge | |||
| 607 | + | } | |||
| 608 | + | </dd> | |||
| 609 | + | </dl> | |||
| 610 | + | </section> | |||
| 611 | + | if p.Box != nil { | |||
| 612 | + | if p.Box.Signed { | |||
| 613 | + | <p class="d-note" id="mr-signing"> | |||
| 614 | + | squash and merge commits are signed with ermite's own key (generated on first start). | |||
| 615 | + | if p.Box.Fingerprint != "" { | |||
| 616 | + | fingerprint <code>{ p.Box.Fingerprint }</code> | |||
| 617 | + | } | |||
| 618 | + | <code>ermite signing-key show</code> prints it. | |||
| 619 | + | </p> | |||
| 620 | + | } | |||
| 621 | + | if p.Box.CanMarkRead { | |||
| 622 | + | <form method="post" action={ templ.SafeURL(p.Box.ReadAction) }> | |||
| 623 | + | <input type="hidden" name="head_id" value={ p.Box.Head }/> | |||
| 624 | + | <button type="submit" title="the next visit can show only what changed after this head" class="btn" aria-keyshortcuts="Shift+R" data-read>Mark read <kbd aria-hidden="true">R</kbd></button> | |||
| 625 | + | </form> | |||
| 626 | + | } | |||
| 627 | + | <form method="post" action={ templ.SafeURL(p.Box.CloseAction) }> | |||
| 628 | + | <button type="submit" title="close without merging; the branch is kept" class="btn danger">Close</button> | |||
| 602 | </form> | 629 | </form> | ||
| 603 | - | } | 630 | + | if !p.Box.HeadGone && p.Box.ReadyAction == "" { |
| 604 | - | <form method="post" action={ templ.SafeURL(p.Box.CloseAction) }> | 631 | + | <details class="d-or"> |
| 605 | - | <button type="submit" title="close without merging; the branch is kept" class="btn danger">Close</button> | 632 | + | <summary class="mute">or from a terminal</summary> |
| 606 | - | </form> | 633 | + | @CloneBlock(p.Box.CLI) |
| 607 | - | if !p.Box.HeadGone && p.Box.ReadyAction == "" { | 634 | + | </details> |
| 608 | - | <details class="d-or"> | 635 | + | } |
| 609 | - | <summary class="mute">or from a terminal</summary> | |||
| 610 | - | @CloneBlock(p.Box.CLI) | |||
| 611 | - | </details> | |||
| 612 | } | 636 | } | ||
| 613 | </div> | 637 | </div> | ||
| 614 | </details> | 638 | </details> | ||
M internal/adapters/web/mr_templ.go +626 -581 generated file: collapsed
M internal/adapters/web/mr_test.go +57 -0
| @@ -4,6 +4,7 @@ package web | |||
| 4 | 4 | ||
| 5 | 5 | import ( | |
| 6 | 6 | "context" | |
| 7 | + | "time" | |
| 7 | 8 | "testing" | |
| 8 | 9 | ||
| 9 | 10 | "github.com/stretchr/testify/assert" | |
| @@ -128,3 +129,59 @@ func TestMergeabilityLiveEvents(t *testing.T) { | |||
| 128 | 129 | require.NoError(t, err) | |
| 129 | 130 | assert.Empty(t, fs) | |
| 130 | 131 | } | |
| 132 | + | ||
| 133 | + | func TestMRPanelsAndMenus(t *testing.T) { | |
| 134 | + | p := MRPage{CommitCount: "500+", CommitsNote: "more commits", Modes: []string{"squash", "merge"}, ChecksBlock: true, | |
| 135 | + | ChecksSum: ChecksSummary{Total: 2, Label: "1/2", Title: "1/2 failed"}, Box: &MergeBox{Signed: true, Fingerprint: "fingerprint", HeadGone: true}} | |
| 136 | + | footer := renderToString(t, mrFooter(p)) | |
| 137 | + | assert.Contains(t, footer, `<footer class="mr-footer"><details id="mr-panels">`) | |
| 138 | + | assert.Contains(t, footer, `data-mr-tabs`) | |
| 139 | + | assert.Contains(t, footer, `id="mr-commits"`) | |
| 140 | + | assert.Contains(t, footer, `id="mr-checks"`) | |
| 141 | + | assert.Contains(t, footer, `<table class="mr-commits">`) | |
| 142 | + | assert.Contains(t, footer, "500+") | |
| 143 | + | assert.Contains(t, footer, "more commits") | |
| 144 | + | assert.Contains(t, footer, "1/2 failed") | |
| 145 | + | rail := renderToString(t, mrRail(p)) | |
| 146 | + | assert.Contains(t, rail, "g f") | |
| 147 | + | for _, text := range []string{"Checks", "Commits", "Settings", "mr-checks"} { | |
| 148 | + | assert.NotContains(t, rail, text) | |
| 149 | + | } | |
| 150 | + | more := renderToString(t, moreMenu(p)) | |
| 151 | + | for _, text := range []string{"Merge settings", "squash, merge", "failing ones block", `id="mr-signing"`, "fingerprint", "ermite signing-key show"} { | |
| 152 | + | assert.Contains(t, more, text) | |
| 153 | + | } | |
| 154 | + | merge := renderToString(t, mergeMenu(p)) | |
| 155 | + | assert.NotContains(t, merge, `<dl`) | |
| 156 | + | assert.NotContains(t, merge, `mr-signing`) | |
| 157 | + | assert.Contains(t, merge, "the source branch was deleted") | |
| 158 | + | bar := renderToString(t, mrBar(MRPage{})) | |
| 159 | + | assert.Contains(t, bar, `id="mr-ck"`) | |
| 160 | + | assert.Contains(t, bar, `href="#mr-checks"`) | |
| 161 | + | assert.Contains(t, bar, "Merge settings") | |
| 162 | + | assert.NotContains(t, bar, ">Close</button>") | |
| 163 | + | } | |
| 164 | + | ||
| 165 | + | func TestMRReadPresentationCommitCount(t *testing.T) { | |
| 166 | + | commits := func(n int) []domain.Commit { return make([]domain.Commit, n) } | |
| 167 | + | for _, tc := range []struct { | |
| 168 | + | name string | |
| 169 | + | commits []domain.Commit | |
| 170 | + | truncated bool | |
| 171 | + | count string | |
| 172 | + | note string | |
| 173 | + | }{ | |
| 174 | + | {"empty", nil, false, "0", ""}, | |
| 175 | + | {"complete", commits(2), false, "2", ""}, | |
| 176 | + | {"truncated", commits(3), true, "3+", "the branch has more commits than the 3 listed."}, | |
| 177 | + | } { | |
| 178 | + | t.Run(tc.name, func(t *testing.T) { | |
| 179 | + | s := &Server{cfg: Config{Now: time.Now}} | |
| 180 | + | p := &MRPage{} | |
| 181 | + | s.mrReadPresentation(p, "demo", 1, ports.MergeRequestDetail{Commits: tc.commits, CommitsTruncated: tc.truncated}, false, false) | |
| 182 | + | assert.Equal(t, tc.count, p.CommitCount) | |
| 183 | + | assert.Equal(t, tc.note, p.CommitsNote) | |
| 184 | + | assert.Len(t, p.Commits, len(tc.commits)) | |
| 185 | + | }) | |
| 186 | + | } | |
| 187 | + | } | |
| @@ -4,6 +4,7 @@ package web | |||||
| 4 | 4 | ||||
| 5 | import ( | 5 | import ( | ||
| 6 | "context" | 6 | "context" | ||
| 7 | + | "time" | |||
| 7 | "testing" | 8 | "testing" | ||
| 8 | 9 | ||||
| 9 | "github.com/stretchr/testify/assert" | 10 | "github.com/stretchr/testify/assert" | ||
| @@ -128,3 +129,59 @@ func TestMergeabilityLiveEvents(t *testing.T) { | |||||
| 128 | require.NoError(t, err) | 129 | require.NoError(t, err) | ||
| 129 | assert.Empty(t, fs) | 130 | assert.Empty(t, fs) | ||
| 130 | } | 131 | } | ||
| 132 | + | ||||
| 133 | + | func TestMRPanelsAndMenus(t *testing.T) { | |||
| 134 | + | p := MRPage{CommitCount: "500+", CommitsNote: "more commits", Modes: []string{"squash", "merge"}, ChecksBlock: true, | |||
| 135 | + | ChecksSum: ChecksSummary{Total: 2, Label: "1/2", Title: "1/2 failed"}, Box: &MergeBox{Signed: true, Fingerprint: "fingerprint", HeadGone: true}} | |||
| 136 | + | footer := renderToString(t, mrFooter(p)) | |||
| 137 | + | assert.Contains(t, footer, `<footer class="mr-footer"><details id="mr-panels">`) | |||
| 138 | + | assert.Contains(t, footer, `data-mr-tabs`) | |||
| 139 | + | assert.Contains(t, footer, `id="mr-commits"`) | |||
| 140 | + | assert.Contains(t, footer, `id="mr-checks"`) | |||
| 141 | + | assert.Contains(t, footer, `<table class="mr-commits">`) | |||
| 142 | + | assert.Contains(t, footer, "500+") | |||
| 143 | + | assert.Contains(t, footer, "more commits") | |||
| 144 | + | assert.Contains(t, footer, "1/2 failed") | |||
| 145 | + | rail := renderToString(t, mrRail(p)) | |||
| 146 | + | assert.Contains(t, rail, "g f") | |||
| 147 | + | for _, text := range []string{"Checks", "Commits", "Settings", "mr-checks"} { | |||
| 148 | + | assert.NotContains(t, rail, text) | |||
| 149 | + | } | |||
| 150 | + | more := renderToString(t, moreMenu(p)) | |||
| 151 | + | for _, text := range []string{"Merge settings", "squash, merge", "failing ones block", `id="mr-signing"`, "fingerprint", "ermite signing-key show"} { | |||
| 152 | + | assert.Contains(t, more, text) | |||
| 153 | + | } | |||
| 154 | + | merge := renderToString(t, mergeMenu(p)) | |||
| 155 | + | assert.NotContains(t, merge, `<dl`) | |||
| 156 | + | assert.NotContains(t, merge, `mr-signing`) | |||
| 157 | + | assert.Contains(t, merge, "the source branch was deleted") | |||
| 158 | + | bar := renderToString(t, mrBar(MRPage{})) | |||
| 159 | + | assert.Contains(t, bar, `id="mr-ck"`) | |||
| 160 | + | assert.Contains(t, bar, `href="#mr-checks"`) | |||
| 161 | + | assert.Contains(t, bar, "Merge settings") | |||
| 162 | + | assert.NotContains(t, bar, ">Close</button>") | |||
| 163 | + | } | |||
| 164 | + | ||||
| 165 | + | func TestMRReadPresentationCommitCount(t *testing.T) { | |||
| 166 | + | commits := func(n int) []domain.Commit { return make([]domain.Commit, n) } | |||
| 167 | + | for _, tc := range []struct { | |||
| 168 | + | name string | |||
| 169 | + | commits []domain.Commit | |||
| 170 | + | truncated bool | |||
| 171 | + | count string | |||
| 172 | + | note string | |||
| 173 | + | }{ | |||
| 174 | + | {"empty", nil, false, "0", ""}, | |||
| 175 | + | {"complete", commits(2), false, "2", ""}, | |||
| 176 | + | {"truncated", commits(3), true, "3+", "the branch has more commits than the 3 listed."}, | |||
| 177 | + | } { | |||
| 178 | + | t.Run(tc.name, func(t *testing.T) { | |||
| 179 | + | s := &Server{cfg: Config{Now: time.Now}} | |||
| 180 | + | p := &MRPage{} | |||
| 181 | + | s.mrReadPresentation(p, "demo", 1, ports.MergeRequestDetail{Commits: tc.commits, CommitsTruncated: tc.truncated}, false, false) | |||
| 182 | + | assert.Equal(t, tc.count, p.CommitCount) | |||
| 183 | + | assert.Equal(t, tc.note, p.CommitsNote) | |||
| 184 | + | assert.Len(t, p.Commits, len(tc.commits)) | |||
| 185 | + | }) | |||
| 186 | + | } | |||
| 187 | + | } | |||
M internal/adapters/web/signature_test.go +1 -1
| @@ -145,7 +145,7 @@ func TestCommitPageShowsTheSignature(t *testing.T) { | |||
| 145 | 145 | func TestMergeRequestCommitsShowTheSignatureBadge(t *testing.T) { | |
| 146 | 146 | t.Parallel() | |
| 147 | 147 | signed := signatureBadge(verification(domain.FormatGPG, domain.StatusVerified, gpgFP, ""), false) | |
| 148 | - | got := renderToString(t, mrRail(MRPage{Commits: []MRCommit{ | |
| 148 | + | got := renderToString(t, mrFooter(MRPage{Commits: []MRCommit{ | |
| 149 | 149 | {Short: "aaaaaaa", Href: "/r/commit/a", Subject: "signed", Sig: signed}, | |
| 150 | 150 | {Short: "bbbbbbb", Href: "/r/commit/b", Subject: "unsigned"}, | |
| 151 | 151 | }})) | |
| @@ -145,7 +145,7 @@ func TestCommitPageShowsTheSignature(t *testing.T) { | |||||
| 145 | func TestMergeRequestCommitsShowTheSignatureBadge(t *testing.T) { | 145 | func TestMergeRequestCommitsShowTheSignatureBadge(t *testing.T) { | ||
| 146 | t.Parallel() | 146 | t.Parallel() | ||
| 147 | signed := signatureBadge(verification(domain.FormatGPG, domain.StatusVerified, gpgFP, ""), false) | 147 | signed := signatureBadge(verification(domain.FormatGPG, domain.StatusVerified, gpgFP, ""), false) | ||
| 148 | - | got := renderToString(t, mrRail(MRPage{Commits: []MRCommit{ | 148 | + | got := renderToString(t, mrFooter(MRPage{Commits: []MRCommit{ |
| 149 | {Short: "aaaaaaa", Href: "/r/commit/a", Subject: "signed", Sig: signed}, | 149 | {Short: "aaaaaaa", Href: "/r/commit/a", Subject: "signed", Sig: signed}, | ||
| 150 | {Short: "bbbbbbb", Href: "/r/commit/b", Subject: "unsigned"}, | 150 | {Short: "bbbbbbb", Href: "/r/commit/b", Subject: "unsigned"}, | ||
| 151 | }})) | 151 | }})) | ||
M internal/adapters/web/static/css/60-mr.css +19 -2
| @@ -8,6 +8,23 @@ | |||
| 8 | 8 | & > .mr-desc.prose { border: 0; border-top: 1px solid var(--border); border-radius: 0; } | |
| 9 | 9 | } | |
| 10 | 10 | ||
| 11 | + | .mr-footer { | |
| 12 | + | border-top: 1px solid var(--border); padding: var(--s3) var(--s5); | |
| 13 | + | font-size: var(--fs-s); | |
| 14 | + | & summary { cursor: pointer; color: var(--ink-dim); } | |
| 15 | + | & nav { display: flex; gap: var(--s3); padding-block: var(--s3); } | |
| 16 | + | & [role="tab"] { padding: var(--s1) var(--s2); border-radius: var(--r-s); } | |
| 17 | + | & [aria-selected="true"] { background: var(--bg-raised); color: var(--ink-hi); } | |
| 18 | + | & [data-mr-panel] { overflow-x: auto; } | |
| 19 | + | & [hidden] { display: none; } | |
| 20 | + | & section h2 { font-size: var(--fs-s); color: var(--ink-dim); } | |
| 21 | + | & table { width: 100%; border-collapse: collapse; } | |
| 22 | + | & th, & td { text-align: left; padding: var(--s2); border-bottom: 1px solid var(--border); } | |
| 23 | + | & th { color: var(--ink-dim); font-weight: 500; } | |
| 24 | + | } | |
| 25 | + | .merge-settings { font-size: var(--fs-s); color: var(--ink-dim); } | |
| 26 | + | .merge-settings h2 { font-size: var(--fs-s); } | |
| 27 | + | ||
| 11 | 28 | .mr-state[data-state="open"]::before { content: "● "; color: var(--teal); } | |
| 12 | 29 | .mr-state[data-state="merged"]::before { content: "✓ "; color: var(--teal); } | |
| 13 | 30 | .mr-state[data-state="closed"]::before { content: "✗ "; color: var(--red); } | |
| @@ -112,11 +129,11 @@ | |||
| 112 | 129 | & .d-or > summary:hover { color: var(--ink-hi); } | |
| 113 | 130 | & .d-or[open] > .clone { margin-top: var(--s2); } | |
| 114 | 131 | & .clone code { white-space: pre-wrap; overflow-wrap: anywhere; } | |
| 132 | + | & #mr-signing code { overflow-wrap: anywhere; } | |
| 115 | 133 | } | |
| 116 | 134 | ||
| 117 | 135 | /* the rail of a merge request follows the review: it sticks under the | |
| 118 | - | header, one screen high, and scrolls on its own to its checks, commits | |
| 119 | - | and settings. The list of files keeps its own scroll, under a height, so | |
| 136 | + | header, one screen high, and scrolls on its own to its verdicts. The list of files keeps its own scroll, under a height, so | |
| 120 | 137 | that the blocks below it stay in reach. Only on a two-column layout. */ | |
| 121 | 138 | @media (min-width: 1081px) { | |
| 122 | 139 | .rail:has(.r-files) { | |
| @@ -8,6 +8,23 @@ | |||||
| 8 | & > .mr-desc.prose { border: 0; border-top: 1px solid var(--border); border-radius: 0; } | 8 | & > .mr-desc.prose { border: 0; border-top: 1px solid var(--border); border-radius: 0; } | ||
| 9 | } | 9 | } | ||
| 10 | 10 | ||||
| 11 | + | .mr-footer { | |||
| 12 | + | border-top: 1px solid var(--border); padding: var(--s3) var(--s5); | |||
| 13 | + | font-size: var(--fs-s); | |||
| 14 | + | & summary { cursor: pointer; color: var(--ink-dim); } | |||
| 15 | + | & nav { display: flex; gap: var(--s3); padding-block: var(--s3); } | |||
| 16 | + | & [role="tab"] { padding: var(--s1) var(--s2); border-radius: var(--r-s); } | |||
| 17 | + | & [aria-selected="true"] { background: var(--bg-raised); color: var(--ink-hi); } | |||
| 18 | + | & [data-mr-panel] { overflow-x: auto; } | |||
| 19 | + | & [hidden] { display: none; } | |||
| 20 | + | & section h2 { font-size: var(--fs-s); color: var(--ink-dim); } | |||
| 21 | + | & table { width: 100%; border-collapse: collapse; } | |||
| 22 | + | & th, & td { text-align: left; padding: var(--s2); border-bottom: 1px solid var(--border); } | |||
| 23 | + | & th { color: var(--ink-dim); font-weight: 500; } | |||
| 24 | + | } | |||
| 25 | + | .merge-settings { font-size: var(--fs-s); color: var(--ink-dim); } | |||
| 26 | + | .merge-settings h2 { font-size: var(--fs-s); } | |||
| 27 | + | ||||
| 11 | .mr-state[data-state="open"]::before { content: "● "; color: var(--teal); } | 28 | .mr-state[data-state="open"]::before { content: "● "; color: var(--teal); } | ||
| 12 | .mr-state[data-state="merged"]::before { content: "✓ "; color: var(--teal); } | 29 | .mr-state[data-state="merged"]::before { content: "✓ "; color: var(--teal); } | ||
| 13 | .mr-state[data-state="closed"]::before { content: "✗ "; color: var(--red); } | 30 | .mr-state[data-state="closed"]::before { content: "✗ "; color: var(--red); } | ||
| @@ -112,11 +129,11 @@ | |||||
| 112 | & .d-or > summary:hover { color: var(--ink-hi); } | 129 | & .d-or > summary:hover { color: var(--ink-hi); } | ||
| 113 | & .d-or[open] > .clone { margin-top: var(--s2); } | 130 | & .d-or[open] > .clone { margin-top: var(--s2); } | ||
| 114 | & .clone code { white-space: pre-wrap; overflow-wrap: anywhere; } | 131 | & .clone code { white-space: pre-wrap; overflow-wrap: anywhere; } | ||
| 132 | + | & #mr-signing code { overflow-wrap: anywhere; } | |||
| 115 | } | 133 | } | ||
| 116 | 134 | ||||
| 117 | /* the rail of a merge request follows the review: it sticks under the | 135 | /* the rail of a merge request follows the review: it sticks under the | ||
| 118 | - | header, one screen high, and scrolls on its own to its checks, commits | 136 | + | header, one screen high, and scrolls on its own to its verdicts. The list of files keeps its own scroll, under a height, so |
| 119 | - | and settings. The list of files keeps its own scroll, under a height, so | |||
| 120 | that the blocks below it stay in reach. Only on a two-column layout. */ | 137 | that the blocks below it stay in reach. Only on a two-column layout. */ | ||
| 121 | @media (min-width: 1081px) { | 138 | @media (min-width: 1081px) { | ||
| 122 | .rail:has(.r-files) { | 139 | .rail:has(.r-files) { | ||
A internal/adapters/web/static/css/85-mobile.css +55 -0
| @@ -0,0 +1,55 @@ | |||
| 1 | + | @layer components { | |
| 2 | + | .mr-touch-range { display: none; } | |
| 3 | + | ||
| 4 | + | /* MR only: retain the shell's desktop layout and other pages' spacing. */ | |
| 5 | + | @media (max-width: 720px) { | |
| 6 | + | body:has(#diffs[data-mr]) { | |
| 7 | + | --pad: 0px; | |
| 8 | + | --hdr-h: 97px; | |
| 9 | + | overflow-x: clip; | |
| 10 | + | } | |
| 11 | + | body:has(#diffs[data-mr]) .work { padding-inline: 0; margin-inline: 0; gap: var(--s3); } | |
| 12 | + | body:has(#diffs[data-mr]) main { min-width: 0; padding-inline: 0; } | |
| 13 | + | body:has(#diffs[data-mr]) :is(.card, .mr-card, .mr-desc, .dfile, .dscroll, .code, .rail section) { | |
| 14 | + | margin-inline: 0; border-inline: 0; border-radius: 0; min-width: 0; max-width: 100%; | |
| 15 | + | } | |
| 16 | + | body:has(#diffs[data-mr]) :is(.mr-h, .mr-desc.prose, .card-h, .mr-footer) { padding-inline: 4px; } | |
| 17 | + | body:has(#diffs[data-mr]) .mr-footer :is(th, td) { padding-inline: var(--s1); } | |
| 18 | + | body:has(#diffs[data-mr]) .mr-desc.prose > pre { margin-inline: -4px; padding-inline: 0; max-width: calc(100% + 8px); } | |
| 19 | + | #diffs[data-mr] .dfile > summary { padding-inline: 0; border-inline: 0; border-radius: 0; } | |
| 20 | + | #diffs[data-mr] :is(.dscroll, .code) { overflow-x: auto; overscroll-behavior-x: contain; padding-inline: 0; } | |
| 21 | + | #diffs[data-mr] .dt .ln { width: calc(var(--lnw) + .5ch); min-width: calc(var(--lnw) + .5ch); padding-inline: .25ch; } | |
| 22 | + | #diffs[data-mr] .dt .m { width: 1ch; } | |
| 23 | + | #diffs[data-mr][data-diff] .uni { display: table; } | |
| 24 | + | #diffs[data-mr][data-diff] .spl { display: none; } | |
| 25 | + | #diffs[data-mr] .fnote td { padding-inline: 0; } | |
| 26 | + | #diffs[data-mr] :is(.cform, .cmt) { width: min(65ch, calc(100vw - 5rem)); max-width: calc(100vw - 5rem); overflow-wrap: anywhere; } | |
| 27 | + | body:has(#diffs[data-mr]) :is(input, textarea, select) { font-size: 16px; } | |
| 28 | + | body:has(#diffs[data-mr]) .f-btns { flex-wrap: wrap; } | |
| 29 | + | body:has(#diffs[data-mr]) .menu .menu-pop { | |
| 30 | + | position: fixed; inset: auto 0 0; width: auto; max-width: 100%; | |
| 31 | + | max-height: 75dvh; overflow-y: auto; border-radius: var(--r) var(--r) 0 0; | |
| 32 | + | padding-bottom: max(var(--s4), env(safe-area-inset-bottom)); | |
| 33 | + | } | |
| 34 | + | body:has(#diffs[data-mr]) .mr-bar { position: static; } | |
| 35 | + | /* A wrapping toolbar has no reliable fixed sticky height. */ | |
| 36 | + | body:has(#diffs[data-mr]) { --bar-h: 0px; } | |
| 37 | + | } | |
| 38 | + | ||
| 39 | + | @media (pointer: coarse), (hover: none) { | |
| 40 | + | .mr-touch-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); } | |
| 41 | + | /* Real, disjoint cells: never expand invisible targets into other lines | |
| 42 | + | or into the neighbouring old/new gutter. */ | |
| 43 | + | #diffs[data-mr] .dt { line-height: max(var(--lh-code), 40px); } | |
| 44 | + | #diffs[data-mr] .dt .ln { width: max(calc(var(--lnw) + .5ch), 40px); min-width: 40px; padding: 0; } | |
| 45 | + | #diffs[data-mr] .spl .c-ln { width: max(calc(var(--lnw) + .5ch), 40px); } | |
| 46 | + | #diffs[data-mr] .ln a { display: block; width: 100%; min-height: 40px; text-align: center; text-decoration: underline; } | |
| 47 | + | .mr-touch-range[hidden] { display: none; } | |
| 48 | + | #diffs[data-mr] .ln a[data-range-start] { outline: 2px solid var(--focus); background: var(--sel); } | |
| 49 | + | body:has(#diffs[data-mr]) :is(.cform .btn, .menu .btn, .mr-touch-range .btn, .c-act button) { min-height: 40px; height: auto; padding-block: var(--s2); } | |
| 50 | + | #diffs[data-mr] .cform { scroll-margin-block: calc(var(--hdr-h) + 12px); } | |
| 51 | + | .mr-footer [data-mr-tabs] a { display: inline-flex; align-items: center; min-height: 40px; } | |
| 52 | + | /* No display change: the summary stays a list-item and keeps its marker. */ | |
| 53 | + | .mr-footer summary { min-height: 40px; line-height: 40px; } | |
| 54 | + | } | |
| 55 | + | } | |
| @@ -0,0 +1,55 @@ | |||||
| 1 | + | @layer components { | |||
| 2 | + | .mr-touch-range { display: none; } | |||
| 3 | + | ||||
| 4 | + | /* MR only: retain the shell's desktop layout and other pages' spacing. */ | |||
| 5 | + | @media (max-width: 720px) { | |||
| 6 | + | body:has(#diffs[data-mr]) { | |||
| 7 | + | --pad: 0px; | |||
| 8 | + | --hdr-h: 97px; | |||
| 9 | + | overflow-x: clip; | |||
| 10 | + | } | |||
| 11 | + | body:has(#diffs[data-mr]) .work { padding-inline: 0; margin-inline: 0; gap: var(--s3); } | |||
| 12 | + | body:has(#diffs[data-mr]) main { min-width: 0; padding-inline: 0; } | |||
| 13 | + | body:has(#diffs[data-mr]) :is(.card, .mr-card, .mr-desc, .dfile, .dscroll, .code, .rail section) { | |||
| 14 | + | margin-inline: 0; border-inline: 0; border-radius: 0; min-width: 0; max-width: 100%; | |||
| 15 | + | } | |||
| 16 | + | body:has(#diffs[data-mr]) :is(.mr-h, .mr-desc.prose, .card-h, .mr-footer) { padding-inline: 4px; } | |||
| 17 | + | body:has(#diffs[data-mr]) .mr-footer :is(th, td) { padding-inline: var(--s1); } | |||
| 18 | + | body:has(#diffs[data-mr]) .mr-desc.prose > pre { margin-inline: -4px; padding-inline: 0; max-width: calc(100% + 8px); } | |||
| 19 | + | #diffs[data-mr] .dfile > summary { padding-inline: 0; border-inline: 0; border-radius: 0; } | |||
| 20 | + | #diffs[data-mr] :is(.dscroll, .code) { overflow-x: auto; overscroll-behavior-x: contain; padding-inline: 0; } | |||
| 21 | + | #diffs[data-mr] .dt .ln { width: calc(var(--lnw) + .5ch); min-width: calc(var(--lnw) + .5ch); padding-inline: .25ch; } | |||
| 22 | + | #diffs[data-mr] .dt .m { width: 1ch; } | |||
| 23 | + | #diffs[data-mr][data-diff] .uni { display: table; } | |||
| 24 | + | #diffs[data-mr][data-diff] .spl { display: none; } | |||
| 25 | + | #diffs[data-mr] .fnote td { padding-inline: 0; } | |||
| 26 | + | #diffs[data-mr] :is(.cform, .cmt) { width: min(65ch, calc(100vw - 5rem)); max-width: calc(100vw - 5rem); overflow-wrap: anywhere; } | |||
| 27 | + | body:has(#diffs[data-mr]) :is(input, textarea, select) { font-size: 16px; } | |||
| 28 | + | body:has(#diffs[data-mr]) .f-btns { flex-wrap: wrap; } | |||
| 29 | + | body:has(#diffs[data-mr]) .menu .menu-pop { | |||
| 30 | + | position: fixed; inset: auto 0 0; width: auto; max-width: 100%; | |||
| 31 | + | max-height: 75dvh; overflow-y: auto; border-radius: var(--r) var(--r) 0 0; | |||
| 32 | + | padding-bottom: max(var(--s4), env(safe-area-inset-bottom)); | |||
| 33 | + | } | |||
| 34 | + | body:has(#diffs[data-mr]) .mr-bar { position: static; } | |||
| 35 | + | /* A wrapping toolbar has no reliable fixed sticky height. */ | |||
| 36 | + | body:has(#diffs[data-mr]) { --bar-h: 0px; } | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | @media (pointer: coarse), (hover: none) { | |||
| 40 | + | .mr-touch-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); } | |||
| 41 | + | /* Real, disjoint cells: never expand invisible targets into other lines | |||
| 42 | + | or into the neighbouring old/new gutter. */ | |||
| 43 | + | #diffs[data-mr] .dt { line-height: max(var(--lh-code), 40px); } | |||
| 44 | + | #diffs[data-mr] .dt .ln { width: max(calc(var(--lnw) + .5ch), 40px); min-width: 40px; padding: 0; } | |||
| 45 | + | #diffs[data-mr] .spl .c-ln { width: max(calc(var(--lnw) + .5ch), 40px); } | |||
| 46 | + | #diffs[data-mr] .ln a { display: block; width: 100%; min-height: 40px; text-align: center; text-decoration: underline; } | |||
| 47 | + | .mr-touch-range[hidden] { display: none; } | |||
| 48 | + | #diffs[data-mr] .ln a[data-range-start] { outline: 2px solid var(--focus); background: var(--sel); } | |||
| 49 | + | body:has(#diffs[data-mr]) :is(.cform .btn, .menu .btn, .mr-touch-range .btn, .c-act button) { min-height: 40px; height: auto; padding-block: var(--s2); } | |||
| 50 | + | #diffs[data-mr] .cform { scroll-margin-block: calc(var(--hdr-h) + 12px); } | |||
| 51 | + | .mr-footer [data-mr-tabs] a { display: inline-flex; align-items: center; min-height: 40px; } | |||
| 52 | + | /* No display change: the summary stays a list-item and keeps its marker. */ | |||
| 53 | + | .mr-footer summary { min-height: 40px; line-height: 40px; } | |||
| 54 | + | } | |||
| 55 | + | } | |||
M internal/adapters/web/static/js/ermite.js +1 -0
| @@ -183,6 +183,7 @@ | |||
| 183 | 183 | layout(mode) { | |
| 184 | 184 | const el = $('[data-diff]'); | |
| 185 | 185 | if (!el) return; | |
| 186 | + | if (el.hasAttribute('data-mr') && el.dataset.mobile === 'true') return; | |
| 186 | 187 | el.dataset.diff = mode; | |
| 187 | 188 | try { sessionStorage.setItem('diff', mode); } catch { /* storage refused: the layout holds for this page */ } | |
| 188 | 189 | for (const d of $$('[data-file]')) if ($('.dt', d)) d.open = true; | |
| @@ -183,6 +183,7 @@ | |||||
| 183 | layout(mode) { | 183 | layout(mode) { | ||
| 184 | const el = $('[data-diff]'); | 184 | const el = $('[data-diff]'); | ||
| 185 | if (!el) return; | 185 | if (!el) return; | ||
| 186 | + | if (el.hasAttribute('data-mr') && el.dataset.mobile === 'true') return; | |||
| 186 | el.dataset.diff = mode; | 187 | el.dataset.diff = mode; | ||
| 187 | try { sessionStorage.setItem('diff', mode); } catch { /* storage refused: the layout holds for this page */ } | 188 | try { sessionStorage.setItem('diff', mode); } catch { /* storage refused: the layout holds for this page */ } | ||
| 188 | for (const d of $$('[data-file]')) if ($('.dt', d)) d.open = true; | 189 | for (const d of $$('[data-file]')) if ($('.dt', d)) d.open = true; | ||
M internal/adapters/web/static/js/mr.js +143 -2
| @@ -27,6 +27,20 @@ window.ermiteMR = (() => { | |||
| 27 | 27 | b.searchParams.set('on', `${y[1]}:${nums[0]}-${nums[1]}:${y[3]}`); | |
| 28 | 28 | return b.href; | |
| 29 | 29 | }, | |
| 30 | + | // Range mode is explicit: ordinary taps still open single-line forms. | |
| 31 | + | touchRange(previous, current, base) { | |
| 32 | + | if (!previous) return { start: current, url: null }; | |
| 33 | + | const url = core.rangeURL(previous, current, base); | |
| 34 | + | if (url) return { start: null, url }; | |
| 35 | + | if (previous === current) return { start: null, url: current }; | |
| 36 | + | return { start: current, url: null }; // another file/side starts afresh | |
| 37 | + | }, | |
| 38 | + | mobileURL(href, view, narrow) { | |
| 39 | + | if (!narrow || view !== 'split') return null; | |
| 40 | + | const url = new URL(href); | |
| 41 | + | url.searchParams.set('view', 'unified'); | |
| 42 | + | return url.href; | |
| 43 | + | }, | |
| 30 | 44 | quote(button) { | |
| 31 | 45 | const thread = button.closest('.cmt').closest('[data-thread]'); | |
| 32 | 46 | const details = thread?.querySelector(':scope > details[data-reply]'); | |
| @@ -49,6 +63,13 @@ window.ermiteMR = (() => { | |||
| 49 | 63 | if (/^[1-9]$/.test(key) && Number(key) <= modes) return { mode: Number(key) - 1 }; | |
| 50 | 64 | return null; | |
| 51 | 65 | }, | |
| 66 | + | tabIndex(key, index, count) { | |
| 67 | + | if (key === 'Home') return 0; | |
| 68 | + | if (key === 'End') return count - 1; | |
| 69 | + | if (key === 'ArrowRight') return (index + 1) % count; | |
| 70 | + | if (key === 'ArrowLeft') return (index + count - 1) % count; | |
| 71 | + | return null; | |
| 72 | + | }, | |
| 52 | 73 | // step moves an index within [0, n). | |
| 53 | 74 | step(i, d, n) { | |
| 54 | 75 | if (n === 0) return -1; | |
| @@ -60,6 +81,7 @@ window.ermiteMR = (() => { | |||
| 60 | 81 | const $ = (sel, root = document) => root.querySelector(sel); | |
| 61 | 82 | const $$ = (sel, root = document) => [...root.querySelectorAll(sel)]; | |
| 62 | 83 | const loading = new Map(); // src -> promise of the swap | |
| 84 | + | let refreshTouchComments = () => {}; | |
| 63 | 85 | let moved = false; | |
| 64 | 86 | let lazyIO = null; // the observer of the placeholders (watch) | |
| 65 | 87 | let revealGen = 0; // the last reveal wins the scroll | |
| @@ -108,6 +130,7 @@ window.ermiteMR = (() => { | |||
| 108 | 130 | window.htmx?.process(f); | |
| 109 | 131 | window.ermite?.watchFile?.(f, old); | |
| 110 | 132 | } | |
| 133 | + | refreshTouchComments(); | |
| 111 | 134 | } | |
| 112 | 135 | ||
| 113 | 136 | // stale: the diff changed under the page. The placeholders say so; no file | |
| @@ -130,7 +153,7 @@ window.ermiteMR = (() => { | |||
| 130 | 153 | // A page with both layouts says which shows in data-diff; a large diff | |
| 131 | 154 | // rendered in one layout only says it in data-view. | |
| 132 | 155 | const diffs = $('#diffs')?.dataset; | |
| 133 | - | if (/^c\d+$/.test(id) && (diffs?.diff || diffs?.view) === 'split') { | |
| 156 | + | if (/^c\d+$/.test(id) && !window.matchMedia?.('(max-width: 720px)').matches && (diffs?.diff || diffs?.view) === 'split') { | |
| 134 | 157 | const split = document.getElementById(id + '-s'); | |
| 135 | 158 | if (split) return split; | |
| 136 | 159 | } | |
| @@ -285,8 +308,126 @@ window.ermiteMR = (() => { | |||
| 285 | 308 | reveal(id); | |
| 286 | 309 | } | |
| 287 | 310 | ||
| 311 | + | // Enhance the ordinary anchor navigation only when scripts are available. | |
| 312 | + | function panels() { | |
| 313 | + | const footer = $('#mr-panels'), nav = $('[data-mr-tabs]'); | |
| 314 | + | if (!footer || !nav) return; | |
| 315 | + | const tabs = $$('a', nav), panels = $$('[data-mr-panel]', footer); | |
| 316 | + | nav.setAttribute('role', 'tablist'); | |
| 317 | + | function select(index, focus = false, fromUser = false) { | |
| 318 | + | tabs.forEach((tab, i) => { | |
| 319 | + | tab.setAttribute('role', 'tab'); | |
| 320 | + | tab.setAttribute('aria-controls', panels[i].id); | |
| 321 | + | tab.setAttribute('aria-selected', String(i === index)); | |
| 322 | + | tab.tabIndex = i === index ? 0 : -1; | |
| 323 | + | panels[i].setAttribute('role', 'tabpanel'); | |
| 324 | + | panels[i].tabIndex = 0; | |
| 325 | + | panels[i].hidden = i !== index; | |
| 326 | + | }); | |
| 327 | + | if (focus) tabs[index].focus(); | |
| 328 | + | if (fromUser && location.hash !== '#' + panels[index].id) history.replaceState(null, '', '#' + panels[index].id); | |
| 329 | + | } | |
| 330 | + | tabs.forEach((tab, i) => { | |
| 331 | + | tab.addEventListener('click', (e) => { e.preventDefault(); select(i, false, true); }); | |
| 332 | + | tab.addEventListener('keydown', (e) => { | |
| 333 | + | const next = core.tabIndex(e.key, i, tabs.length); | |
| 334 | + | if (next === null) return; | |
| 335 | + | e.preventDefault(); select(next, true, true); | |
| 336 | + | }); | |
| 337 | + | }); | |
| 338 | + | function hash() { | |
| 339 | + | const h = location.hash; | |
| 340 | + | const index = h === '#mr-checks' || h === '#mr-checks-panel' ? 1 : h === '#mr-commits' ? 0 : -1; | |
| 341 | + | if (index < 0) return; | |
| 342 | + | footer.open = true; select(index); | |
| 343 | + | } | |
| 344 | + | // A repeated click on the same hash must also reopen a folded footer. | |
| 345 | + | document.addEventListener('click', (e) => { | |
| 346 | + | if (e.target.closest?.('#mr-ck')) { footer.open = true; select(1); } | |
| 347 | + | }); | |
| 348 | + | const summary = $('#mr-ck'); | |
| 349 | + | if (summary) { | |
| 350 | + | const sync = () => { $('[data-checks-label]', nav).textContent = $('#mr-ck')?.title || $('#mr-ck')?.textContent.trim() || 'no checks'; }; | |
| 351 | + | new MutationObserver(sync).observe(summary.parentElement, { childList: true, subtree: true, characterData: true }); | |
| 352 | + | sync(); | |
| 353 | + | } | |
| 354 | + | select(0); hash(); | |
| 355 | + | addEventListener('hashchange', hash); | |
| 356 | + | } | |
| 357 | + | ||
| 358 | + | function touchComments() { | |
| 359 | + | const diffs = $('#diffs'); | |
| 360 | + | const bar = document.createElement('div'); | |
| 361 | + | bar.className = 'mr-touch-range'; | |
| 362 | + | const button = document.createElement('button'); | |
| 363 | + | button.type = 'button'; | |
| 364 | + | button.className = 'btn'; | |
| 365 | + | button.textContent = 'Select line range'; | |
| 366 | + | button.setAttribute('aria-pressed', 'false'); | |
| 367 | + | const status = document.createElement('span'); | |
| 368 | + | status.setAttribute('role', 'status'); | |
| 369 | + | bar.append(button, status); | |
| 370 | + | diffs.prepend(bar); | |
| 371 | + | refreshTouchComments = () => { bar.hidden = !$('.ln a[href*="on="]', diffs); }; | |
| 372 | + | refreshTouchComments(); | |
| 373 | + | const touch = window.matchMedia?.('(pointer: coarse), (hover: none)'); | |
| 374 | + | let enabled = false, start = null, marker = null; | |
| 375 | + | const clear = () => { marker?.removeAttribute('data-range-start'); marker = null; start = null; }; | |
| 376 | + | button.addEventListener('click', () => { | |
| 377 | + | enabled = !enabled; | |
| 378 | + | clear(); | |
| 379 | + | button.setAttribute('aria-pressed', String(enabled)); | |
| 380 | + | status.textContent = enabled ? 'Tap the first line number, then the last. Tap the same line for one line.' : ''; | |
| 381 | + | }); | |
| 382 | + | diffs.addEventListener('click', (e) => { | |
| 383 | + | const link = e.target.closest?.('.ln a[href*="on="]'); | |
| 384 | + | if (!touch?.matches || !enabled || !link || e.shiftKey || e.ctrlKey || e.metaKey || e.altKey) return; | |
| 385 | + | e.preventDefault(); | |
| 386 | + | e.stopPropagation(); // do not alter the desktop shift-click anchor | |
| 387 | + | const next = core.touchRange(start, link.href, location.href); | |
| 388 | + | clear(); | |
| 389 | + | if (next.url) { location.assign(next.url); return; } | |
| 390 | + | start = next.start; | |
| 391 | + | marker = link; | |
| 392 | + | marker.setAttribute('data-range-start', ''); | |
| 393 | + | status.textContent = `Range starts at line ${link.textContent.trim()}. Tap the last line number (same file and side).`; | |
| 394 | + | }); | |
| 395 | + | touch?.addEventListener('change', () => { | |
| 396 | + | if (touch.matches) return; | |
| 397 | + | enabled = false; | |
| 398 | + | clear(); | |
| 399 | + | button.setAttribute('aria-pressed', 'false'); | |
| 400 | + | status.textContent = ''; | |
| 401 | + | }); | |
| 402 | + | // The server opens the line form. Scroll after layout without stealing | |
| 403 | + | // focus or forcing a mobile keyboard to appear. | |
| 404 | + | if (new URL(location.href).searchParams.has('on')) requestAnimationFrame(() => { | |
| 405 | + | const form = $$('.fnote .cform', diffs).find((f) => f.getClientRects().length); | |
| 406 | + | form?.scrollIntoView({ block: 'center' }); | |
| 407 | + | }); | |
| 408 | + | } | |
| 409 | + | ||
| 288 | 410 | function start() { | |
| 289 | 411 | if (!$('#diffs[data-mr]')) return; | |
| 412 | + | panels(); | |
| 413 | + | // Large diffs may contain only the split table. Ask the existing server | |
| 414 | + | // route for unified rather than writing the saved session preference. | |
| 415 | + | const narrow = window.matchMedia?.('(max-width: 720px)'); | |
| 416 | + | const unify = () => { | |
| 417 | + | $('#diffs').dataset.mobile = String(!!narrow?.matches); | |
| 418 | + | const url = core.mobileURL(location.href, $('#diffs')?.dataset.view, narrow?.matches); | |
| 419 | + | if (url) { location.replace(url); return true; } | |
| 420 | + | return false; | |
| 421 | + | }; | |
| 422 | + | if (unify()) return; | |
| 423 | + | narrow?.addEventListener('change', unify); | |
| 424 | + | addEventListener('click', (e) => { | |
| 425 | + | if (narrow?.matches && e.target.closest?.('.vbtn[data-view="split"]')) { | |
| 426 | + | e.preventDefault(); | |
| 427 | + | e.stopImmediatePropagation(); | |
| 428 | + | } | |
| 429 | + | }, true); | |
| 430 | + | touchComments(); | |
| 290 | 431 | let folded = false; | |
| 291 | 432 | try { folded = localStorage.getItem('mr-files-folded') === '1'; } catch { /* no storage: open */ } | |
| 292 | 433 | if (folded) foldFiles(true); | |
| @@ -316,7 +457,7 @@ window.ermiteMR = (() => { | |||
| 316 | 457 | }); | |
| 317 | 458 | } | |
| 318 | 459 | ||
| 319 | - | return { core, start, load, reveal, openMerge, menuKey, markRead, focusFiles, stepFiles, leaveFiles, foldFiles, openFile }; | |
| 460 | + | return { core, panels, start, load, reveal, openMerge, menuKey, markRead, focusFiles, stepFiles, leaveFiles, foldFiles, openFile }; | |
| 320 | 461 | })(); | |
| 321 | 462 | ||
| 322 | 463 | if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => window.ermiteMR.start()); | |
| @@ -27,6 +27,20 @@ window.ermiteMR = (() => { | |||||
| 27 | b.searchParams.set('on', `${y[1]}:${nums[0]}-${nums[1]}:${y[3]}`); | 27 | b.searchParams.set('on', `${y[1]}:${nums[0]}-${nums[1]}:${y[3]}`); | ||
| 28 | return b.href; | 28 | return b.href; | ||
| 29 | }, | 29 | }, | ||
| 30 | + | // Range mode is explicit: ordinary taps still open single-line forms. | |||
| 31 | + | touchRange(previous, current, base) { | |||
| 32 | + | if (!previous) return { start: current, url: null }; | |||
| 33 | + | const url = core.rangeURL(previous, current, base); | |||
| 34 | + | if (url) return { start: null, url }; | |||
| 35 | + | if (previous === current) return { start: null, url: current }; | |||
| 36 | + | return { start: current, url: null }; // another file/side starts afresh | |||
| 37 | + | }, | |||
| 38 | + | mobileURL(href, view, narrow) { | |||
| 39 | + | if (!narrow || view !== 'split') return null; | |||
| 40 | + | const url = new URL(href); | |||
| 41 | + | url.searchParams.set('view', 'unified'); | |||
| 42 | + | return url.href; | |||
| 43 | + | }, | |||
| 30 | quote(button) { | 44 | quote(button) { | ||
| 31 | const thread = button.closest('.cmt').closest('[data-thread]'); | 45 | const thread = button.closest('.cmt').closest('[data-thread]'); | ||
| 32 | const details = thread?.querySelector(':scope > details[data-reply]'); | 46 | const details = thread?.querySelector(':scope > details[data-reply]'); | ||
| @@ -49,6 +63,13 @@ window.ermiteMR = (() => { | |||||
| 49 | if (/^[1-9]$/.test(key) && Number(key) <= modes) return { mode: Number(key) - 1 }; | 63 | if (/^[1-9]$/.test(key) && Number(key) <= modes) return { mode: Number(key) - 1 }; | ||
| 50 | return null; | 64 | return null; | ||
| 51 | }, | 65 | }, | ||
| 66 | + | tabIndex(key, index, count) { | |||
| 67 | + | if (key === 'Home') return 0; | |||
| 68 | + | if (key === 'End') return count - 1; | |||
| 69 | + | if (key === 'ArrowRight') return (index + 1) % count; | |||
| 70 | + | if (key === 'ArrowLeft') return (index + count - 1) % count; | |||
| 71 | + | return null; | |||
| 72 | + | }, | |||
| 52 | // step moves an index within [0, n). | 73 | // step moves an index within [0, n). | ||
| 53 | step(i, d, n) { | 74 | step(i, d, n) { | ||
| 54 | if (n === 0) return -1; | 75 | if (n === 0) return -1; | ||
| @@ -60,6 +81,7 @@ window.ermiteMR = (() => { | |||||
| 60 | const $ = (sel, root = document) => root.querySelector(sel); | 81 | const $ = (sel, root = document) => root.querySelector(sel); | ||
| 61 | const $$ = (sel, root = document) => [...root.querySelectorAll(sel)]; | 82 | const $$ = (sel, root = document) => [...root.querySelectorAll(sel)]; | ||
| 62 | const loading = new Map(); // src -> promise of the swap | 83 | const loading = new Map(); // src -> promise of the swap | ||
| 84 | + | let refreshTouchComments = () => {}; | |||
| 63 | let moved = false; | 85 | let moved = false; | ||
| 64 | let lazyIO = null; // the observer of the placeholders (watch) | 86 | let lazyIO = null; // the observer of the placeholders (watch) | ||
| 65 | let revealGen = 0; // the last reveal wins the scroll | 87 | let revealGen = 0; // the last reveal wins the scroll | ||
| @@ -108,6 +130,7 @@ window.ermiteMR = (() => { | |||||
| 108 | window.htmx?.process(f); | 130 | window.htmx?.process(f); | ||
| 109 | window.ermite?.watchFile?.(f, old); | 131 | window.ermite?.watchFile?.(f, old); | ||
| 110 | } | 132 | } | ||
| 133 | + | refreshTouchComments(); | |||
| 111 | } | 134 | } | ||
| 112 | 135 | ||||
| 113 | // stale: the diff changed under the page. The placeholders say so; no file | 136 | // stale: the diff changed under the page. The placeholders say so; no file | ||
| @@ -130,7 +153,7 @@ window.ermiteMR = (() => { | |||||
| 130 | // A page with both layouts says which shows in data-diff; a large diff | 153 | // A page with both layouts says which shows in data-diff; a large diff | ||
| 131 | // rendered in one layout only says it in data-view. | 154 | // rendered in one layout only says it in data-view. | ||
| 132 | const diffs = $('#diffs')?.dataset; | 155 | const diffs = $('#diffs')?.dataset; | ||
| 133 | - | if (/^c\d+$/.test(id) && (diffs?.diff || diffs?.view) === 'split') { | 156 | + | if (/^c\d+$/.test(id) && !window.matchMedia?.('(max-width: 720px)').matches && (diffs?.diff || diffs?.view) === 'split') { |
| 134 | const split = document.getElementById(id + '-s'); | 157 | const split = document.getElementById(id + '-s'); | ||
| 135 | if (split) return split; | 158 | if (split) return split; | ||
| 136 | } | 159 | } | ||
| @@ -285,8 +308,126 @@ window.ermiteMR = (() => { | |||||
| 285 | reveal(id); | 308 | reveal(id); | ||
| 286 | } | 309 | } | ||
| 287 | 310 | ||||
| 311 | + | // Enhance the ordinary anchor navigation only when scripts are available. | |||
| 312 | + | function panels() { | |||
| 313 | + | const footer = $('#mr-panels'), nav = $('[data-mr-tabs]'); | |||
| 314 | + | if (!footer || !nav) return; | |||
| 315 | + | const tabs = $$('a', nav), panels = $$('[data-mr-panel]', footer); | |||
| 316 | + | nav.setAttribute('role', 'tablist'); | |||
| 317 | + | function select(index, focus = false, fromUser = false) { | |||
| 318 | + | tabs.forEach((tab, i) => { | |||
| 319 | + | tab.setAttribute('role', 'tab'); | |||
| 320 | + | tab.setAttribute('aria-controls', panels[i].id); | |||
| 321 | + | tab.setAttribute('aria-selected', String(i === index)); | |||
| 322 | + | tab.tabIndex = i === index ? 0 : -1; | |||
| 323 | + | panels[i].setAttribute('role', 'tabpanel'); | |||
| 324 | + | panels[i].tabIndex = 0; | |||
| 325 | + | panels[i].hidden = i !== index; | |||
| 326 | + | }); | |||
| 327 | + | if (focus) tabs[index].focus(); | |||
| 328 | + | if (fromUser && location.hash !== '#' + panels[index].id) history.replaceState(null, '', '#' + panels[index].id); | |||
| 329 | + | } | |||
| 330 | + | tabs.forEach((tab, i) => { | |||
| 331 | + | tab.addEventListener('click', (e) => { e.preventDefault(); select(i, false, true); }); | |||
| 332 | + | tab.addEventListener('keydown', (e) => { | |||
| 333 | + | const next = core.tabIndex(e.key, i, tabs.length); | |||
| 334 | + | if (next === null) return; | |||
| 335 | + | e.preventDefault(); select(next, true, true); | |||
| 336 | + | }); | |||
| 337 | + | }); | |||
| 338 | + | function hash() { | |||
| 339 | + | const h = location.hash; | |||
| 340 | + | const index = h === '#mr-checks' || h === '#mr-checks-panel' ? 1 : h === '#mr-commits' ? 0 : -1; | |||
| 341 | + | if (index < 0) return; | |||
| 342 | + | footer.open = true; select(index); | |||
| 343 | + | } | |||
| 344 | + | // A repeated click on the same hash must also reopen a folded footer. | |||
| 345 | + | document.addEventListener('click', (e) => { | |||
| 346 | + | if (e.target.closest?.('#mr-ck')) { footer.open = true; select(1); } | |||
| 347 | + | }); | |||
| 348 | + | const summary = $('#mr-ck'); | |||
| 349 | + | if (summary) { | |||
| 350 | + | const sync = () => { $('[data-checks-label]', nav).textContent = $('#mr-ck')?.title || $('#mr-ck')?.textContent.trim() || 'no checks'; }; | |||
| 351 | + | new MutationObserver(sync).observe(summary.parentElement, { childList: true, subtree: true, characterData: true }); | |||
| 352 | + | sync(); | |||
| 353 | + | } | |||
| 354 | + | select(0); hash(); | |||
| 355 | + | addEventListener('hashchange', hash); | |||
| 356 | + | } | |||
| 357 | + | ||||
| 358 | + | function touchComments() { | |||
| 359 | + | const diffs = $('#diffs'); | |||
| 360 | + | const bar = document.createElement('div'); | |||
| 361 | + | bar.className = 'mr-touch-range'; | |||
| 362 | + | const button = document.createElement('button'); | |||
| 363 | + | button.type = 'button'; | |||
| 364 | + | button.className = 'btn'; | |||
| 365 | + | button.textContent = 'Select line range'; | |||
| 366 | + | button.setAttribute('aria-pressed', 'false'); | |||
| 367 | + | const status = document.createElement('span'); | |||
| 368 | + | status.setAttribute('role', 'status'); | |||
| 369 | + | bar.append(button, status); | |||
| 370 | + | diffs.prepend(bar); | |||
| 371 | + | refreshTouchComments = () => { bar.hidden = !$('.ln a[href*="on="]', diffs); }; | |||
| 372 | + | refreshTouchComments(); | |||
| 373 | + | const touch = window.matchMedia?.('(pointer: coarse), (hover: none)'); | |||
| 374 | + | let enabled = false, start = null, marker = null; | |||
| 375 | + | const clear = () => { marker?.removeAttribute('data-range-start'); marker = null; start = null; }; | |||
| 376 | + | button.addEventListener('click', () => { | |||
| 377 | + | enabled = !enabled; | |||
| 378 | + | clear(); | |||
| 379 | + | button.setAttribute('aria-pressed', String(enabled)); | |||
| 380 | + | status.textContent = enabled ? 'Tap the first line number, then the last. Tap the same line for one line.' : ''; | |||
| 381 | + | }); | |||
| 382 | + | diffs.addEventListener('click', (e) => { | |||
| 383 | + | const link = e.target.closest?.('.ln a[href*="on="]'); | |||
| 384 | + | if (!touch?.matches || !enabled || !link || e.shiftKey || e.ctrlKey || e.metaKey || e.altKey) return; | |||
| 385 | + | e.preventDefault(); | |||
| 386 | + | e.stopPropagation(); // do not alter the desktop shift-click anchor | |||
| 387 | + | const next = core.touchRange(start, link.href, location.href); | |||
| 388 | + | clear(); | |||
| 389 | + | if (next.url) { location.assign(next.url); return; } | |||
| 390 | + | start = next.start; | |||
| 391 | + | marker = link; | |||
| 392 | + | marker.setAttribute('data-range-start', ''); | |||
| 393 | + | status.textContent = `Range starts at line ${link.textContent.trim()}. Tap the last line number (same file and side).`; | |||
| 394 | + | }); | |||
| 395 | + | touch?.addEventListener('change', () => { | |||
| 396 | + | if (touch.matches) return; | |||
| 397 | + | enabled = false; | |||
| 398 | + | clear(); | |||
| 399 | + | button.setAttribute('aria-pressed', 'false'); | |||
| 400 | + | status.textContent = ''; | |||
| 401 | + | }); | |||
| 402 | + | // The server opens the line form. Scroll after layout without stealing | |||
| 403 | + | // focus or forcing a mobile keyboard to appear. | |||
| 404 | + | if (new URL(location.href).searchParams.has('on')) requestAnimationFrame(() => { | |||
| 405 | + | const form = $$('.fnote .cform', diffs).find((f) => f.getClientRects().length); | |||
| 406 | + | form?.scrollIntoView({ block: 'center' }); | |||
| 407 | + | }); | |||
| 408 | + | } | |||
| 409 | + | ||||
| 288 | function start() { | 410 | function start() { | ||
| 289 | if (!$('#diffs[data-mr]')) return; | 411 | if (!$('#diffs[data-mr]')) return; | ||
| 412 | + | panels(); | |||
| 413 | + | // Large diffs may contain only the split table. Ask the existing server | |||
| 414 | + | // route for unified rather than writing the saved session preference. | |||
| 415 | + | const narrow = window.matchMedia?.('(max-width: 720px)'); | |||
| 416 | + | const unify = () => { | |||
| 417 | + | $('#diffs').dataset.mobile = String(!!narrow?.matches); | |||
| 418 | + | const url = core.mobileURL(location.href, $('#diffs')?.dataset.view, narrow?.matches); | |||
| 419 | + | if (url) { location.replace(url); return true; } | |||
| 420 | + | return false; | |||
| 421 | + | }; | |||
| 422 | + | if (unify()) return; | |||
| 423 | + | narrow?.addEventListener('change', unify); | |||
| 424 | + | addEventListener('click', (e) => { | |||
| 425 | + | if (narrow?.matches && e.target.closest?.('.vbtn[data-view="split"]')) { | |||
| 426 | + | e.preventDefault(); | |||
| 427 | + | e.stopImmediatePropagation(); | |||
| 428 | + | } | |||
| 429 | + | }, true); | |||
| 430 | + | touchComments(); | |||
| 290 | let folded = false; | 431 | let folded = false; | ||
| 291 | try { folded = localStorage.getItem('mr-files-folded') === '1'; } catch { /* no storage: open */ } | 432 | try { folded = localStorage.getItem('mr-files-folded') === '1'; } catch { /* no storage: open */ } | ||
| 292 | if (folded) foldFiles(true); | 433 | if (folded) foldFiles(true); | ||
| @@ -316,7 +457,7 @@ window.ermiteMR = (() => { | |||||
| 316 | }); | 457 | }); | ||
| 317 | } | 458 | } | ||
| 318 | 459 | ||||
| 319 | - | return { core, start, load, reveal, openMerge, menuKey, markRead, focusFiles, stepFiles, leaveFiles, foldFiles, openFile }; | 460 | + | return { core, panels, start, load, reveal, openMerge, menuKey, markRead, focusFiles, stepFiles, leaveFiles, foldFiles, openFile }; |
| 320 | })(); | 461 | })(); | ||
| 321 | 462 | ||||
| 322 | if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => window.ermiteMR.start()); | 463 | if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => window.ermiteMR.start()); | ||
M internal/app/testdata/web/commit-big.html +3 -3
| @@ -127,12 +127,12 @@ | |||
| 127 | 127 | </span> | |
| 128 | 128 | <details class="menu vmenu"> | |
| 129 | 129 | <summary class="btn" aria-label="Diff view"> | |
| 130 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 130 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 131 | 131 | </summary> | |
| 132 | 132 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 133 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 133 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 134 | 134 | </a> | |
| 135 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 135 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 136 | 136 | </a> | |
| 137 | 137 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 138 | 138 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -127,12 +127,12 @@ | |||||
| 127 | </span> | 127 | </span> | ||
| 128 | <details class="menu vmenu"> | 128 | <details class="menu vmenu"> | ||
| 129 | <summary class="btn" aria-label="Diff view"> | 129 | <summary class="btn" aria-label="Diff view"> | ||
| 130 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 130 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 131 | </summary> | 131 | </summary> | ||
| 132 | <div class="menu-pop" role="group" aria-label="Diff view"> | 132 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 133 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 133 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 134 | </a> | 134 | </a> | ||
| 135 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 135 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 136 | </a> | 136 | </a> | ||
| 137 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 137 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 138 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 138 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-binary.html +3 -3
| @@ -123,12 +123,12 @@ | |||
| 123 | 123 | </span> | |
| 124 | 124 | <details class="menu vmenu"> | |
| 125 | 125 | <summary class="btn" aria-label="Diff view"> | |
| 126 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 126 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 127 | 127 | </summary> | |
| 128 | 128 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 129 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 129 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 130 | 130 | </a> | |
| 131 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 131 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 132 | 132 | </a> | |
| 133 | 133 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 134 | 134 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -123,12 +123,12 @@ | |||||
| 123 | </span> | 123 | </span> | ||
| 124 | <details class="menu vmenu"> | 124 | <details class="menu vmenu"> | ||
| 125 | <summary class="btn" aria-label="Diff view"> | 125 | <summary class="btn" aria-label="Diff view"> | ||
| 126 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 126 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 127 | </summary> | 127 | </summary> | ||
| 128 | <div class="menu-pop" role="group" aria-label="Diff view"> | 128 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 129 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 129 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 130 | </a> | 130 | </a> | ||
| 131 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 131 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 132 | </a> | 132 | </a> | ||
| 133 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 133 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 134 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 134 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-merge.html +3 -3
| @@ -122,12 +122,12 @@ | |||
| 122 | 122 | </span> | |
| 123 | 123 | <details class="menu vmenu"> | |
| 124 | 124 | <summary class="btn" aria-label="Diff view"> | |
| 125 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 125 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 126 | 126 | </summary> | |
| 127 | 127 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 128 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 128 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 129 | 129 | </a> | |
| 130 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 130 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 131 | 131 | </a> | |
| 132 | 132 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 133 | 133 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -122,12 +122,12 @@ | |||||
| 122 | </span> | 122 | </span> | ||
| 123 | <details class="menu vmenu"> | 123 | <details class="menu vmenu"> | ||
| 124 | <summary class="btn" aria-label="Diff view"> | 124 | <summary class="btn" aria-label="Diff view"> | ||
| 125 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 125 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 126 | </summary> | 126 | </summary> | ||
| 127 | <div class="menu-pop" role="group" aria-label="Diff view"> | 127 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 128 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 128 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 129 | </a> | 129 | </a> | ||
| 130 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 130 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 131 | </a> | 131 | </a> | ||
| 132 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 132 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 133 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 133 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-modify-split.html +3 -3
| @@ -129,12 +129,12 @@ And <b>html</b> & "quotes".</pre> | |||
| 129 | 129 | </span> | |
| 130 | 130 | <details class="menu vmenu"> | |
| 131 | 131 | <summary class="btn" aria-label="Diff view"> | |
| 132 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Split</span> | |
| 132 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Split</span> | |
| 133 | 133 | </summary> | |
| 134 | 134 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 135 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 135 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 136 | 136 | </a> | |
| 137 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" aria-current="true" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 137 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" aria-current="true" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 138 | 138 | </a> | |
| 139 | 139 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 140 | 140 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -129,12 +129,12 @@ And <b>html</b> & "quotes".</pre> | |||||
| 129 | </span> | 129 | </span> | ||
| 130 | <details class="menu vmenu"> | 130 | <details class="menu vmenu"> | ||
| 131 | <summary class="btn" aria-label="Diff view"> | 131 | <summary class="btn" aria-label="Diff view"> | ||
| 132 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Split</span> | 132 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Split</span> |
| 133 | </summary> | 133 | </summary> | ||
| 134 | <div class="menu-pop" role="group" aria-label="Diff view"> | 134 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 135 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 135 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 136 | </a> | 136 | </a> | ||
| 137 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" aria-current="true" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 137 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" aria-current="true" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 138 | </a> | 138 | </a> | ||
| 139 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 139 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 140 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 140 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-modify.html +3 -3
| @@ -129,12 +129,12 @@ And <b>html</b> & "quotes".</pre> | |||
| 129 | 129 | </span> | |
| 130 | 130 | <details class="menu vmenu"> | |
| 131 | 131 | <summary class="btn" aria-label="Diff view"> | |
| 132 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 132 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 133 | 133 | </summary> | |
| 134 | 134 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 135 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 135 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 136 | 136 | </a> | |
| 137 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 137 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 138 | 138 | </a> | |
| 139 | 139 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 140 | 140 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -129,12 +129,12 @@ And <b>html</b> & "quotes".</pre> | |||||
| 129 | </span> | 129 | </span> | ||
| 130 | <details class="menu vmenu"> | 130 | <details class="menu vmenu"> | ||
| 131 | <summary class="btn" aria-label="Diff view"> | 131 | <summary class="btn" aria-label="Diff view"> | ||
| 132 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 132 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 133 | </summary> | 133 | </summary> | ||
| 134 | <div class="menu-pop" role="group" aria-label="Diff view"> | 134 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 135 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 135 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 136 | </a> | 136 | </a> | ||
| 137 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 137 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 138 | </a> | 138 | </a> | ||
| 139 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 139 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 140 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 140 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-rename.html +3 -3
| @@ -123,12 +123,12 @@ | |||
| 123 | 123 | </span> | |
| 124 | 124 | <details class="menu vmenu"> | |
| 125 | 125 | <summary class="btn" aria-label="Diff view"> | |
| 126 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 126 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 127 | 127 | </summary> | |
| 128 | 128 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 129 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 129 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 130 | 130 | </a> | |
| 131 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 131 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 132 | 132 | </a> | |
| 133 | 133 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 134 | 134 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -123,12 +123,12 @@ | |||||
| 123 | </span> | 123 | </span> | ||
| 124 | <details class="menu vmenu"> | 124 | <details class="menu vmenu"> | ||
| 125 | <summary class="btn" aria-label="Diff view"> | 125 | <summary class="btn" aria-label="Diff view"> | ||
| 126 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 126 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 127 | </summary> | 127 | </summary> | ||
| 128 | <div class="menu-pop" role="group" aria-label="Diff view"> | 128 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 129 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 129 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 130 | </a> | 130 | </a> | ||
| 131 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 131 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 132 | </a> | 132 | </a> | ||
| 133 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 133 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 134 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 134 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-root.html +3 -3
| @@ -121,12 +121,12 @@ | |||
| 121 | 121 | </span> | |
| 122 | 122 | <details class="menu vmenu"> | |
| 123 | 123 | <summary class="btn" aria-label="Diff view"> | |
| 124 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 124 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 125 | 125 | </summary> | |
| 126 | 126 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 127 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 127 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 128 | 128 | </a> | |
| 129 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 129 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 130 | 130 | </a> | |
| 131 | 131 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 132 | 132 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -121,12 +121,12 @@ | |||||
| 121 | </span> | 121 | </span> | ||
| 122 | <details class="menu vmenu"> | 122 | <details class="menu vmenu"> | ||
| 123 | <summary class="btn" aria-label="Diff view"> | 123 | <summary class="btn" aria-label="Diff view"> | ||
| 124 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 124 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 125 | </summary> | 125 | </summary> | ||
| 126 | <div class="menu-pop" role="group" aria-label="Diff view"> | 126 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 127 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 127 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 128 | </a> | 128 | </a> | ||
| 129 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 129 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 130 | </a> | 130 | </a> | ||
| 131 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 131 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 132 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 132 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/testdata/web/commit-trojan.html +3 -3
| @@ -124,12 +124,12 @@ | |||
| 124 | 124 | </span> | |
| 125 | 125 | <details class="menu vmenu"> | |
| 126 | 126 | <summary class="btn" aria-label="Diff view"> | |
| 127 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 127 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | |
| 128 | 128 | </summary> | |
| 129 | 129 | <div class="menu-pop" role="group" aria-label="Diff view"> | |
| 130 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 130 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | |
| 131 | 131 | </a> | |
| 132 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 132 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 133 | 133 | </a> | |
| 134 | 134 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | |
| 135 | 135 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| @@ -124,12 +124,12 @@ | |||||
| 124 | </span> | 124 | </span> | ||
| 125 | <details class="menu vmenu"> | 125 | <details class="menu vmenu"> | ||
| 126 | <summary class="btn" aria-label="Diff view"> | 126 | <summary class="btn" aria-label="Diff view"> | ||
| 127 | - | <span hx-live="this.textContent = q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> | 127 | + | <span hx-live="this.textContent = q('#diffs').attr['data-mobile'] !== 'true' && q('#diffs').attr['data-diff'] === 'split' ? 'Split' : 'Unified'">Unified</span> |
| 128 | </summary> | 128 | </summary> | ||
| 129 | <div class="menu-pop" role="group" aria-label="Diff view"> | 129 | <div class="menu-pop" role="group" aria-label="Diff view"> | ||
| 130 | - | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> | 130 | + | <a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd> |
| 131 | </a> | 131 | </a> | ||
| 132 | - | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 132 | + | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" :aria-disabled="q('#diffs').attr['data-mobile'] === 'true' ? 'true' : false" :title="q('#diffs').attr['data-mobile'] === 'true' ? 'Split view requires a wider screen' : 'Split view'" data-fire="split" :aria-current="(q('#diffs').attr['data-mobile'] === 'true' ? 'unified' : q('#diffs').attr['data-diff']) === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> |
| 133 | </a> | 133 | </a> | ||
| 134 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | 134 | <button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn"> | ||
| 135 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | 135 | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | ||
M internal/app/web_mr_test.go +1 -1
| @@ -335,7 +335,7 @@ func TestWebMergeRequestReviewAndFastForward(t *testing.T) { | |||
| 335 | 335 | all := b.get(base, as(token)) | |
| 336 | 336 | assert.Contains(t, all.body, `href="/proj/merge-requests/1/since"`) | |
| 337 | 337 | assert.Contains(t, all.body, "since your last read") | |
| 338 | - | assert.Contains(t, all.body, "<li data-new>", "the commit pushed since is marked") | |
| 338 | + | assert.Contains(t, all.body, "<tr data-new>", "the commit pushed since is marked") | |
| 339 | 339 | assert.Contains(t, all.body, "data-read>Mark read") | |
| 340 | 340 | assert.Contains(t, all.body, "outdated", "the notes were written on the earlier head") | |
| 341 | 341 | since := b.get(base+"/since", as(token)) | |
| @@ -335,7 +335,7 @@ func TestWebMergeRequestReviewAndFastForward(t *testing.T) { | |||||
| 335 | all := b.get(base, as(token)) | 335 | all := b.get(base, as(token)) | ||
| 336 | assert.Contains(t, all.body, `href="/proj/merge-requests/1/since"`) | 336 | assert.Contains(t, all.body, `href="/proj/merge-requests/1/since"`) | ||
| 337 | assert.Contains(t, all.body, "since your last read") | 337 | assert.Contains(t, all.body, "since your last read") | ||
| 338 | - | assert.Contains(t, all.body, "<li data-new>", "the commit pushed since is marked") | 338 | + | assert.Contains(t, all.body, "<tr data-new>", "the commit pushed since is marked") |
| 339 | assert.Contains(t, all.body, "data-read>Mark read") | 339 | assert.Contains(t, all.body, "data-read>Mark read") | ||
| 340 | assert.Contains(t, all.body, "outdated", "the notes were written on the earlier head") | 340 | assert.Contains(t, all.body, "outdated", "the notes were written on the earlier head") | ||
| 341 | since := b.get(base+"/since", as(token)) | 341 | since := b.get(base+"/since", as(token)) | ||