Compare commits
9 Commits
v1.4.5
...
proj/zhizh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd9319883b | ||
|
|
62fa349507 | ||
|
|
d0dc3f4e0b | ||
|
|
fe13a53e19 | ||
|
|
38e24d67f5 | ||
|
|
3871b35652 | ||
|
|
1797f006a7 | ||
|
|
05ad562f1f | ||
|
|
e973ba53f7 |
@@ -2,14 +2,12 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||||
<title>数瑞客户端</title>
|
<title>数瑞浏览器</title>
|
||||||
|
|
||||||
<script src="./js/createWS.js"></script>
|
<script src="./js/createWS.js"></script>
|
||||||
<script src="./js/cryptico.js"></script>
|
<script src="./js/cryptico.js"></script>
|
||||||
<script src="./js/jquery-2.1.4.js"></script>
|
<script src="./js/jquery-2.1.4.js"></script>
|
||||||
<script src="./js/bootstrap.min.js"></script>
|
<script src="./js/bootstrap.min.js"></script>
|
||||||
<script src="./js/commonutil.js"></script>
|
<script src="./js/commonutil.js"></script>
|
||||||
|
|
||||||
<link href="./css/common.css" rel="stylesheet">
|
<link href="./css/common.css" rel="stylesheet">
|
||||||
<link href="./css/bootstrap.min.css" rel="stylesheet">
|
<link href="./css/bootstrap.min.css" rel="stylesheet">
|
||||||
<script src="./js/vue.js"></script>
|
<script src="./js/vue.js"></script>
|
||||||
@@ -23,7 +21,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<a class="navbar-brand" href="#"> <img alt="Brand"
|
<a class="navbar-brand" href="#"> <img alt="Brand"
|
||||||
src="./img/logo-1.png" style="height: 30px">
|
src="./img/logo-1.png" style="height: 30px">
|
||||||
</a><a class="navbar-brand">数瑞浏览器 </a> <input id="urlInput"
|
</a><a class="navbar-brand">智能合约浏览器 </a> <input id="urlInput"
|
||||||
type="text" class="form-control" placeholder="输入地址" style="display: none;">
|
type="text" class="form-control" placeholder="输入地址" style="display: none;">
|
||||||
|
|
||||||
<button class="btn btn-outline-secondary" type="button"
|
<button class="btn btn-outline-secondary" type="button"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||||
<title>数瑞客户端</title>
|
<title>智能合约浏览器</title>
|
||||||
<script src="./js/createWS.js"></script>
|
<script src="./js/createWS.js"></script>
|
||||||
<script src="./js/cryptico.js"></script>
|
<script src="./js/cryptico.js"></script>
|
||||||
<script src="./js/jquery-2.1.4.js"></script>
|
<script src="./js/jquery-2.1.4.js"></script>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<img alt="Brand"
|
<img alt="Brand"
|
||||||
src="./img/logo-1.png" style="height: 30px">
|
src="./img/logo-1.png" style="height: 30px">
|
||||||
</a>
|
</a>
|
||||||
<a class="navbar-brand">数瑞浏览器 </a>
|
<a class="navbar-brand">智能合约浏览器 </a>
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<input id="urlInput" style="border-top-left-radius: 5px; border-bottom-left-radius: 5px"
|
<input id="urlInput" style="border-top-left-radius: 5px; border-bottom-left-radius: 5px"
|
||||||
type="text" placeholder="输入地址">
|
type="text" placeholder="输入地址">
|
||||||
|
|||||||
2
css/bootstrap.min.css
vendored
2
css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
|||||||
border: 1px solid rgba(0, 0, 0, .125);
|
border: 1px solid rgba(0, 0, 0, .125);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background: white;
|
background: white;
|
||||||
color: #2E324C;
|
color: #304156;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userName:hover {
|
.userName:hover {
|
||||||
@@ -85,16 +85,16 @@ div .card {
|
|||||||
|
|
||||||
.projectLine.collapsed {
|
.projectLine.collapsed {
|
||||||
background: #D5D6DB;
|
background: #D5D6DB;
|
||||||
color: #2E324C;
|
color: #304156;
|
||||||
}
|
}
|
||||||
|
|
||||||
.projectLine {
|
.projectLine {
|
||||||
background: #2E324C;
|
background: #304156;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.projectLine.collapsed:hover {
|
.projectLine.collapsed:hover {
|
||||||
background: #2E324C;
|
background: #304156;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ div .card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.headerFooter {
|
.headerFooter {
|
||||||
background: #2E324C;
|
background: #304156;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
img/logo-1.png
BIN
img/logo-1.png
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 37 KiB |
@@ -313,6 +313,7 @@ function displayOutput(obj) {
|
|||||||
|
|
||||||
function initWSocket() {
|
function initWSocket() {
|
||||||
let host = $("#urlInput")[0].value;
|
let host = $("#urlInput")[0].value;
|
||||||
|
document.title = `数瑞浏览器(${host})`
|
||||||
if (!host.startsWith("ws")) {
|
if (!host.startsWith("ws")) {
|
||||||
if (location.href.startsWith("https")) {
|
if (location.href.startsWith("https")) {
|
||||||
host = "wss://" + host;
|
host = "wss://" + host;
|
||||||
@@ -375,6 +376,7 @@ function changeApp() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(global.currentContract);
|
console.log(global.currentContract);
|
||||||
|
document.title = `数瑞浏览器(${global.currentContract.name} - ${$("#urlInput")[0].value})`
|
||||||
changeAppInternal(needRender(global.currentContract));
|
changeAppInternal(needRender(global.currentContract));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -474,21 +476,21 @@ function triggerExecuteCurrentContract() {
|
|||||||
console.log(funNode);
|
console.log(funNode);
|
||||||
const argInput = $("#argInput");
|
const argInput = $("#argInput");
|
||||||
var contract = global.currentContract;
|
var contract = global.currentContract;
|
||||||
var gas = $("#gasInput")[0].value/1;
|
var gas = $("#gasInput")[0].value / 1;
|
||||||
executeContractWithGas(contract.id, funNode.functionName, argInput[0].value,gas,
|
executeContractWithGas(contract.id, funNode.functionName, argInput[0].value, gas,
|
||||||
fillResultInternal, executeContractAsDebug.checked);
|
fillResultInternal, executeContractAsDebug.checked);
|
||||||
var iHtml = "/SCIDE/SCManager?action=executeContract&contractID="
|
var iHtml = "/SCIDE/SCManager?action=executeContract&contractID="
|
||||||
+ global.currentContract.name + "&operation="
|
+ global.currentContract.name + "&operation="
|
||||||
+ funNode.functionName + "&arg=" + argInput[0].value;
|
+ funNode.functionName + "&arg=" + argInput[0].value;
|
||||||
|
|
||||||
var toSign = global.currentContract.name + "|" + funNode.functionName + "|"
|
var toSign = global.currentContract.name + "|" + funNode.functionName + "|"
|
||||||
+ argInput[0].value ;
|
+ argInput[0].value;
|
||||||
if (gas>0){
|
if (gas > 0) {
|
||||||
toSign+="|"+gas;
|
toSign += "|" + gas;
|
||||||
iHtml+="&gasLimit="+gas;
|
iHtml += "&gasLimit=" + gas;
|
||||||
}
|
}
|
||||||
iHtml+= "&pubkey=" + global.sm2Key.publicKey + "&signature=";
|
iHtml += "&pubkey=" + global.sm2Key.publicKey + "&signature=";
|
||||||
toSign+= "|" + global.sm2Key.publicKey;
|
toSign += "|" + global.sm2Key.publicKey;
|
||||||
const signature = sm2.doSignature(toSign, global.sm2Key.privateKey, {hash: true, der: true});
|
const signature = sm2.doSignature(toSign, global.sm2Key.privateKey, {hash: true, der: true});
|
||||||
let urlPre = $("#urlInput")[0].value;
|
let urlPre = $("#urlInput")[0].value;
|
||||||
if (urlPre.startsWith("ws")) {
|
if (urlPre.startsWith("ws")) {
|
||||||
@@ -528,8 +530,8 @@ function fillResultInternal(result, data) {
|
|||||||
global.responseCollector[data.responseID].push(data);
|
global.responseCollector[data.responseID].push(data);
|
||||||
$("#statusSpan")[0].innerHTML = result.status;
|
$("#statusSpan")[0].innerHTML = result.status;
|
||||||
$("#timeSpan")[0].innerHTML = "调用耗时:" + data.executeTime + "(ms)";
|
$("#timeSpan")[0].innerHTML = "调用耗时:" + data.executeTime + "(ms)";
|
||||||
if (data.executionGas !=undefined && data.executionGas>0)
|
if (data.executionGas != undefined && data.executionGas > 0)
|
||||||
$("#timeSpan")[0].innerHTML+="<br> "+data.executionGas+"(gas)";
|
$("#timeSpan")[0].innerHTML += "<br> " + data.executionGas + "(gas)";
|
||||||
$("#timeSpan")[0].innerHTML
|
$("#timeSpan")[0].innerHTML
|
||||||
if (result.result instanceof Object) {
|
if (result.result instanceof Object) {
|
||||||
$("#responseArea")[0].value = JSON.stringify(result.result);
|
$("#responseArea")[0].value = JSON.stringify(result.result);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ var getDateDaysBefore = function (daysAgo) {
|
|||||||
return new Date(dateStr).getTime() - daysAgo * 24 * 3600 * 1000;
|
return new Date(dateStr).getTime() - daysAgo * 24 * 3600 * 1000;
|
||||||
};
|
};
|
||||||
|
|
||||||
let primaryColor = "#2E324C";
|
let primaryColor = "#304156";
|
||||||
|
|
||||||
// ======Vue start
|
// ======Vue start
|
||||||
var headerVue = "";
|
var headerVue = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user