OXYGENHUB
# e9bfea8e26db oxygenhub / templates / resolve.html
3.0 KiB · HTML · last changed Resolve conflicts together, live 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Resolve {{ path }} · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "conflicts") %}{% endblock %}
6
{% block mainclass %} class="wide"{% endblock %}
7
{% block content %}
8
<div class="head"><h1>Resolve <code>{{ path }}</code> <small>on <span class="lbl lbl-bm">{{ bookmark }}</span></small></h1>
9
<p class="small mute">Choose what each conflict keeps. The file is put back together around the lines no one disagrees on and committed to {{ bookmark }} as a resolution: it depends on every change that wrote a side, so no side is lost from history. Link to a conflict with its <code>#region-N</code>.</p></div>
10
<p class="small"><a href="{{ vscode }}">Resolve in VS Code</a> <span class="mute">(with the Oxygen extension: it opens your checkout on {{ bookmark }}, or offers to clone it)</span></p>
11
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
12
{% if let Some(d) = delegation %}<p class="error">{{ d }}</p>{% endif %}
13
<p class="small" data-live-present hidden></p>
14
<div class="strip" data-live-landed hidden></div>
15
<form method="post" action="{{ repo.url }}/resolve/{{ bookmark }}/{{ path }}" data-resolve-live="{{ repo.url }}/resolve-live/{{ bookmark }}/{{ path }}" data-csrf="{{ shell.csrf }}">
16
<input type="hidden" name="_csrf" value="{{ shell.csrf }}">
17
<input type="hidden" name="state" value="{{ state }}">
18
{% for p in pieces %}
19
{% match p %}
20
{% when crate::web::resolve::Piece::Plain with (text) %}
21
<pre class="marked context">{{ text }}</pre>
22
{% when crate::web::resolve::Piece::Region with (r) %}
23
<section class="file-diff conflict-region" id="region-{{ r.n }}">
24
  <header><a href="#region-{{ r.n }}"><strong>Conflict {{ r.n }}</strong></a> <span class="small mute">{{ r.sides.len() }} sides</span></header>
25
  {% for s in r.sides %}
26
  <div class="side">
27
    <label><input type="radio" name="r{{ r.n }}" value="side{{ loop.index }}"{% if loop.first %} checked{% endif %}> keep side {{ loop.index }} <span class="small mute">{{ s.label }}</span></label>
28
    {% if s.deletion %}<p class="small mute">Keeping this side keeps the deletion of these lines:</p>{% endif %}
29
    <pre class="marked{% if s.deletion %} deleted{% endif %}">{{ s.text }}</pre>
30
  </div>
31
  {% endfor %}
32
  <div class="choice">
33
    <label><input type="radio" name="r{{ r.n }}" value="all"> keep every side, in order</label>
34
    <label><input type="radio" name="r{{ r.n }}" value="none"> keep none</label>
35
    <label><input type="radio" name="r{{ r.n }}" value="text"> write it myself:</label>
36
  </div>
37
  <textarea name="t{{ r.n }}" rows="{{ r.all().lines().count() + 1 }}" aria-label="Your text for conflict {{ r.n }}">{{ r.all() }}</textarea>
38
</section>
39
{% endmatch %}
40
{% endfor %}
41
<label for="message">Message</label><input type="text" id="message" name="message" value="{{ message }}">
42
<button type="submit">COMMIT RESOLUTION</button>
43
</form>
44
{% endblock %}