Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silverwind patches #5

Merged
merged 3 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions templates/repo/graph.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
{{.i18n.Tr "repo.commit_graph"}}
<div class="ui icon buttons tiny color-buttons">
<div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown">
<input type="hidden">
<input type="hidden" name="flow">
<i class="dropdown icon"></i>
<input type="text" class="search">
<div class="default text">{{.i18n.Tr "repo.commit_graph.select"}}</div>
<div class="menu">
<div class="item" data-value="...flow-hide-pr-refs">
Expand All @@ -18,7 +17,6 @@
</span>
<!--<button id="flow-hide-pr-refs" class="ui labelled icon button {{if .HidePRRefs}} active{{end}}" title="{{.i18n.Tr "repo.commit_graph.hide_pr_refs"}}">{{svg "octicon-git-pull-request" 16 "mr-2"}}{{.i18n.Tr "repo.commit_graph.hide_pr_refs"}}</button>-->
</div>
<div class="divider"></div>
{{range .AllRefs}}
{{$refGroup := .RefGroup}}
{{if eq $refGroup "pull"}}
Expand Down
17 changes: 8 additions & 9 deletions web_src/js/features/gitgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default async function initGitGraph() {
});
const url = new URL(window.location);
const params = url.searchParams;
const updateGraph = () => {
const updateGraph = async () => {
const queryString = params.toString();
const ajaxUrl = new URL(url);
ajaxUrl.searchParams.set('div-only', 'true');
Expand All @@ -62,14 +62,13 @@ export default async function initGitGraph() {
$('#rev-container').addClass('hide');
$('#loading-indicator').removeClass('hide');

$.ajax(ajaxUrl.toString()).then((div) => {
$('#pagination').html($($.parseHTML(div)).find('#pagination').html());
$('#rel-container').html($($.parseHTML(div)).find('#rel-container').html());
$('#rev-container').html($($.parseHTML(div)).find('#rev-container').html());
$('#loading-indicator').addClass('hide');
$('#rel-container').removeClass('hide');
$('#rev-container').removeClass('hide');
});
const div = $(await $.ajax(String(ajaxUrl)));
$('#pagination').html(div.find('#pagination').html());
$('#rel-container').html(div.find('#rel-container').html());
$('#rev-container').html(div.find('#rev-container').html());
$('#loading-indicator').addClass('hide');
$('#rel-container').removeClass('hide');
$('#rev-container').removeClass('hide');
};
const dropdownSelected = params.getAll('branch');
if (params.has('hide-pr-refs') && params.get('hide-pr-refs') === 'true') {
Expand Down
4 changes: 4 additions & 0 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,10 @@ table th[data-sortt-desc] {
}
}

.dropdown .ui.label {
margin-left: 0 !important;
}

.text-label {
display: inline-flex !important;
align-items: center !important;
Expand Down
26 changes: 18 additions & 8 deletions web_src/less/features/gitgraph.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,15 @@
}

#flow-select-refs-dropdown {
vertical-align: top;
height: 36.8438px;
max-height: 36.8438px;
min-width: 250px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;

div.default.text {
padding-top: 6.715px;
}
min-width: 250px;
border-right: none;

.ui.label {
max-width: 180px;
display: inline-flex !important;
align-items: center;

.truncate {
display: inline-block;
Expand All @@ -47,6 +43,20 @@
white-space: nowrap;
}
}

.dropdown.icon {
display: none;
}

.default.text {
padding-top: 4px;
padding-bottom: 4px;
}

input.search {
position: relative;
top: 1px;
}
}

li {
Expand Down
10 changes: 10 additions & 0 deletions web_src/less/themes/theme-arc-green.less
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ body {
color: #9e9e9e;
}

input {
color: #dbdbdb;
}

/* firefox scroll bars */

* {
Expand Down Expand Up @@ -1590,6 +1594,12 @@ a.blob-excerpt:hover {
color: #dbdbdb;
}

.ui.active.label {
background: #393d4a;
border-color: #393d4a;
color: #dbdbdb;
}

a.ui.label:hover,
a.ui.labels .label:hover {
background-color: #505667 !important;
Expand Down