Skip to content

Commit e40a9f4

Browse files
committed
presentaion
add SEARCH & FAQ
1 parent 68850e5 commit e40a9f4

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

code/default/launcher/web_ui/status.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@
88
<div id="noob-info" class=""></div>
99

1010
<div id="details" hidden>
11+
12+
<div id="search">
13+
<h4>{{ _( "Search" ) }}</h4>
14+
<form accept-charset="UTF-8" action="https://github.com/XX-net/XX-Net/issues" class="subnav-search float-left" data-pjax="true" method="get" target="_blank">
15+
<div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value=""></div>
16+
<input aria-label='{{ _( "Search all issues" ) }}' class="form-control form-control subnav-search-input input-contrast" data-hotkey="/" id="issues-search" name="q" placeholder='{{ _( "Search all issues" ) }}' type="text"> <!-- value="is:issue is:open " -->
17+
<!--<svg aria-hidden="true" class="octicon octicon-search subnav-search-icon" height="16" width="16" version="1.1" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>-->
18+
</form>
19+
<br />
20+
</div> <!-- #search -->
21+
22+
<div id="faq">
23+
<h4>{{ _( "FAQ" ) }}</h4>
24+
<div id="faq-content"></div>
25+
<!--<iframe src="https://azu.github.io/github-issue-widget/?owner=xx-net&repo=XX-Net&limit=10&labels=分类_功能"
26+
allowtransparency="true" frameborder="0" scrolling="true" width="100%" id="board"></iframe> &lt;!&ndash; +td#xxnet-version. &ndash;&gt;-->
27+
<br />
28+
</div> <!-- #faq -->
29+
1130
<h4>{{ _( "Status" ) }}</h4>
1231
<table id="status" class="table table-bordered table-striped">
1332
<thead>
@@ -221,6 +240,7 @@ <h3>{{ _( "Diagnostic Info" ) }}</h3>
221240

222241
updateDetailStatus();
223242
updateNoobStatus();
243+
updateFAQ();
224244
getConfig();
225245
});
226246

@@ -515,3 +535,31 @@ <h3>{{ _( "Diagnostic Info" ) }}</h3>
515535
});
516536
}
517537
</script>
538+
<script type="text/javascript">
539+
"use strict";
540+
function updateFAQ() {
541+
var APIurl = "https://api.github.com/repos/xx-net/XX-Net/issues?" + "labels=分类_功能"//FAQ,"+'td#xxnet-version';
542+
$.ajax({
543+
type: 'GET',
544+
url: APIurl,
545+
dataType: 'JSON',
546+
success: function(result) {
547+
var content = document.getElementById('faq-content');
548+
var ul = document.createElement('ul');
549+
var setLimit = 10;
550+
for (var i = 0; i < Math.min(setLimit, result.length); i++) {
551+
var issue = result[i];
552+
var li = document.createElement('li');
553+
var a = document.createElement('a');
554+
a.href = issue.html_url;
555+
a.textContent = issue.title;
556+
a.setAttribute('target', '_blank');
557+
li.appendChild(a);
558+
ul.appendChild(li);
559+
}
560+
//content.empty();
561+
content.appendChild(ul);
562+
}
563+
});
564+
}
565+
</script>

0 commit comments

Comments
 (0)