sync: sync upstream code
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
8dafeb2cf0
commit
fd1b23a4c3
@ -2753,3 +2753,12 @@ iframe
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.btn--float
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
width: 230px;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,17 @@ function $(id)
|
|||||||
{
|
{
|
||||||
return document.getElementById(id);
|
return document.getElementById(id);
|
||||||
};
|
};
|
||||||
|
window.Storage = {};
|
||||||
|
window.Storage.setItem = function (Key,Value)
|
||||||
|
{
|
||||||
|
if(window.localStorage)
|
||||||
|
localStorage.setItem(Key, Value);
|
||||||
|
};
|
||||||
|
window.Storage.getItem = function (Key)
|
||||||
|
{
|
||||||
|
if(window.localStorage)
|
||||||
|
return localStorage.getItem(Key);
|
||||||
|
};
|
||||||
var WALLET_KEY_NAME = "WALLET_KEY";
|
var WALLET_KEY_NAME = "WALLET_KEY";
|
||||||
var WALLET_PUB_KEY_NAME = "WALLET_PUB_KEY";
|
var WALLET_PUB_KEY_NAME = "WALLET_PUB_KEY";
|
||||||
if(!Math.log2)
|
if(!Math.log2)
|
||||||
@ -49,17 +60,6 @@ if(!String.prototype.padStart)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
window.Storage = {};
|
|
||||||
window.Storage.setItem = function (Key,Value)
|
|
||||||
{
|
|
||||||
if(window.localStorage)
|
|
||||||
localStorage.setItem(Key, Value);
|
|
||||||
};
|
|
||||||
window.Storage.getItem = function (Key)
|
|
||||||
{
|
|
||||||
if(window.localStorage)
|
|
||||||
return localStorage.getItem(Key);
|
|
||||||
};
|
|
||||||
window.IsLocalClient = function ()
|
window.IsLocalClient = function ()
|
||||||
{
|
{
|
||||||
return (window.location.protocol.substr(0, 4) !== "http");
|
return (window.location.protocol.substr(0, 4) !== "http");
|
||||||
@ -937,7 +937,7 @@ function RetIconPath(Item,bCurrency)
|
|||||||
return StrPath + '/file/' + Item.IconBlockNum + '/' + Item.IconTrNum;
|
return StrPath + '/file/' + Item.IconBlockNum + '/' + Item.IconTrNum;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return StrPath + "./PIC/blank.svg";
|
return StrPath + "/PIC/blank.svg";
|
||||||
};
|
};
|
||||||
|
|
||||||
function RetIconDapp(Item)
|
function RetIconDapp(Item)
|
||||||
@ -1437,9 +1437,9 @@ function AddToInvoiceList(Item)
|
|||||||
Storage.setItem("InvoiceList", JSON.stringify(arr));
|
Storage.setItem("InvoiceList", JSON.stringify(arr));
|
||||||
};
|
};
|
||||||
|
|
||||||
function OpenDapps(Num,AccountNum)
|
function OpenDapps(Num,AccountNum,HTMLLength)
|
||||||
{
|
{
|
||||||
if(!Num)
|
if(!Num || !HTMLLength)
|
||||||
return ;
|
return ;
|
||||||
var StrPath = '/dapp/' + Num;
|
var StrPath = '/dapp/' + Num;
|
||||||
if(IsLocalClient())
|
if(IsLocalClient())
|
||||||
@ -1801,8 +1801,8 @@ function ToLog(Str)
|
|||||||
|
|
||||||
function InitMainServer()
|
function InitMainServer()
|
||||||
{
|
{
|
||||||
var Str = localStorage["MainServer"];
|
var Str = Storage.getItem("MainServer");
|
||||||
if(Str && !localStorage["BIGWALLET"] && Str.substr(0, 1) === "{")
|
if(Str && !Storage.getItem("BIGWALLET") && Str.substr(0, 1) === "{")
|
||||||
{
|
{
|
||||||
MainServer = JSON.parse(Str);
|
MainServer = JSON.parse(Str);
|
||||||
}
|
}
|
||||||
@ -1823,13 +1823,13 @@ var KeyPasswordMap = {};
|
|||||||
|
|
||||||
function InitWalletKeyName()
|
function InitWalletKeyName()
|
||||||
{
|
{
|
||||||
if(!localStorage["WALLET_KEY"])
|
if(!Storage.getItem("WALLET_KEY"))
|
||||||
{
|
{
|
||||||
localStorage["WALLET_KEY"] = localStorage["idPrivKey"];
|
Storage.setItem("WALLET_KEY", Storage.getItem("idPrivKey"));
|
||||||
}
|
}
|
||||||
if(!localStorage["WALLET_PUB_KEY"])
|
if(!Storage.getItem("WALLET_PUB_KEY"))
|
||||||
{
|
{
|
||||||
localStorage["WALLET_PUB_KEY"] = localStorage["idPubKey"];
|
Storage.setItem("WALLET_PUB_KEY", Storage.getItem("idPubKey"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1862,8 +1862,11 @@ function OpenWalletKey()
|
|||||||
{
|
{
|
||||||
PubKeyStr = "";
|
PubKeyStr = "";
|
||||||
}
|
}
|
||||||
sessionStorage[WALLET_KEY_NAME] = RetKey;
|
if(window.sessionStorage)
|
||||||
sessionStorage[WALLET_PUB_KEY_NAME] = PubKeyStr;
|
{
|
||||||
|
sessionStorage[WALLET_KEY_NAME] = RetKey;
|
||||||
|
sessionStorage[WALLET_PUB_KEY_NAME] = PubKeyStr;
|
||||||
|
}
|
||||||
if(!WALLET_PASSWORD)
|
if(!WALLET_PASSWORD)
|
||||||
Storage.setItem(WALLET_PUB_KEY_NAME, PubKeyStr);
|
Storage.setItem(WALLET_PUB_KEY_NAME, PubKeyStr);
|
||||||
return RetKey;
|
return RetKey;
|
||||||
@ -1880,26 +1883,28 @@ function IsLockedWallet()
|
|||||||
|
|
||||||
function GetPrivKey()
|
function GetPrivKey()
|
||||||
{
|
{
|
||||||
var Key = sessionStorage[WALLET_KEY_NAME];
|
var Key;
|
||||||
|
if(window.sessionStorage)
|
||||||
|
Key = sessionStorage[WALLET_KEY_NAME];
|
||||||
if(!Key)
|
if(!Key)
|
||||||
Key = Storage.getItem(WALLET_KEY_NAME);
|
Key = Storage.getItem(WALLET_KEY_NAME);
|
||||||
if(Key && typeof Key === "string" && Key.length >= 64)
|
if(Key && typeof Key === "string" && Key.length >= 64)
|
||||||
return Key;
|
return Key;
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function GetPubKey()
|
function GetPubKey()
|
||||||
{
|
{
|
||||||
var Key = sessionStorage[WALLET_PUB_KEY_NAME];
|
var Key;
|
||||||
|
if(window.sessionStorage)
|
||||||
|
Key = sessionStorage[WALLET_PUB_KEY_NAME];
|
||||||
if(!Key)
|
if(!Key)
|
||||||
Key = Storage.getItem(WALLET_PUB_KEY_NAME);
|
Key = Storage.getItem(WALLET_PUB_KEY_NAME);
|
||||||
if(Key && typeof Key === "string" && Key.length >= 64)
|
if(Key && typeof Key === "string" && Key.length >= 66)
|
||||||
return Key;
|
return Key;
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function SetPrivKey(StrPrivKey)
|
function SetPrivKey(StrPrivKey)
|
||||||
@ -1920,15 +1925,18 @@ function SetPrivKey(StrPrivKey)
|
|||||||
Storage.setItem(WALLET_KEY_NAME, Key);
|
Storage.setItem(WALLET_KEY_NAME, Key);
|
||||||
Storage.setItem(WALLET_PUB_KEY_NAME, StrPubKey);
|
Storage.setItem(WALLET_PUB_KEY_NAME, StrPubKey);
|
||||||
Storage.setItem("WALLET_PUB_KEY_MAIN", StrPubKey);
|
Storage.setItem("WALLET_PUB_KEY_MAIN", StrPubKey);
|
||||||
sessionStorage[WALLET_KEY_NAME] = StrPrivKey;
|
if(window.sessionStorage)
|
||||||
sessionStorage[WALLET_PUB_KEY_NAME] = StrPubKey;
|
{
|
||||||
|
sessionStorage[WALLET_KEY_NAME] = StrPrivKey;
|
||||||
|
sessionStorage[WALLET_PUB_KEY_NAME] = StrPubKey;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function SetWalletPassword(Str)
|
function SetWalletPassword(Str)
|
||||||
{
|
{
|
||||||
WALLET_PASSWORD = Str;
|
WALLET_PASSWORD = Str;
|
||||||
if(localStorage["idPrivKey"])
|
if(Storage.getItem("idPrivKey"))
|
||||||
delete localStorage["idPrivKey"];
|
Storage.setItem("idPrivKey", "");
|
||||||
};
|
};
|
||||||
|
|
||||||
function HashProtect(Str)
|
function HashProtect(Str)
|
||||||
|
@ -93,8 +93,6 @@ function OnLoad()
|
|||||||
LoadValues();
|
LoadValues();
|
||||||
InitDappsCard();
|
InitDappsCard();
|
||||||
StartWebWallet();
|
StartWebWallet();
|
||||||
UpdatesExplorerData();
|
|
||||||
UpdatesAccountsData();
|
|
||||||
setInterval(UpdatesExplorerData, 1000);
|
setInterval(UpdatesExplorerData, 1000);
|
||||||
setInterval(UpdatesAccountsData, 1000);
|
setInterval(UpdatesAccountsData, 1000);
|
||||||
DoStableScroll();
|
DoStableScroll();
|
||||||
@ -117,9 +115,14 @@ function ChangeNetwork()
|
|||||||
CONNECT_STATUS = 0;
|
CONNECT_STATUS = 0;
|
||||||
NETWORK = $("idCurNetwork").value;
|
NETWORK = $("idCurNetwork").value;
|
||||||
Storage.setItem("NETWORK", NETWORK);
|
Storage.setItem("NETWORK", NETWORK);
|
||||||
StartWebWallet();
|
ConnectWebWallet();
|
||||||
|
};
|
||||||
|
|
||||||
|
function UpdateTabs()
|
||||||
|
{
|
||||||
UpdatesExplorerData();
|
UpdatesExplorerData();
|
||||||
UpdatesAccountsData();
|
UpdatesAccountsData();
|
||||||
|
ViewDapps();
|
||||||
};
|
};
|
||||||
|
|
||||||
function OnFindServer()
|
function OnFindServer()
|
||||||
@ -134,11 +137,12 @@ function OnFindServer()
|
|||||||
CONNECT_STATUS = 2;
|
CONNECT_STATUS = 2;
|
||||||
Storage.setItem("MainServer", JSON.stringify({ip:MainServer.ip, port:MainServer.port}));
|
Storage.setItem("MainServer", JSON.stringify({ip:MainServer.ip, port:MainServer.port}));
|
||||||
FillCurrencyAsync("idAccountCur");
|
FillCurrencyAsync("idAccountCur");
|
||||||
|
UpdateTabs();
|
||||||
};
|
};
|
||||||
|
|
||||||
function LoadValues()
|
function LoadValues()
|
||||||
{
|
{
|
||||||
var StrDelList = localStorage["DelList"];
|
var StrDelList = Storage.getItem("DelList");
|
||||||
if(StrDelList)
|
if(StrDelList)
|
||||||
DelList = JSON.parse(StrDelList);
|
DelList = JSON.parse(StrDelList);
|
||||||
if(typeof DelList !== "object")
|
if(typeof DelList !== "object")
|
||||||
@ -153,7 +157,7 @@ function LoadValues()
|
|||||||
function SaveValues()
|
function SaveValues()
|
||||||
{
|
{
|
||||||
SaveValuesByArr(SaveIdArr);
|
SaveValuesByArr(SaveIdArr);
|
||||||
localStorage["DelList"] = JSON.stringify(DelList);
|
Storage.setItem("DelList", JSON.stringify(DelList));
|
||||||
};
|
};
|
||||||
var TabArr = [{name:"TabWelcome"}, {name:"TabWalletSet"}, {name:"TabKeySet"}, {name:"TabAccounts"}, {name:"TabSend"}, {name:"TabDapps"},
|
var TabArr = [{name:"TabWelcome"}, {name:"TabWalletSet"}, {name:"TabKeySet"}, {name:"TabAccounts"}, {name:"TabSend"}, {name:"TabDapps"},
|
||||||
{name:"TabExplorer"}, {name:"TabLogo"}];
|
{name:"TabExplorer"}, {name:"TabLogo"}];
|
||||||
@ -442,11 +446,12 @@ function SetAccountsCard(Data,AccountsDataStr)
|
|||||||
Str = Str.replace("{Item.Name}", escapeHtml(Item.Name));
|
Str = Str.replace("{Item.Name}", escapeHtml(Item.Name));
|
||||||
var SmartObj = Item.SmartObj;
|
var SmartObj = Item.SmartObj;
|
||||||
if(!SmartObj)
|
if(!SmartObj)
|
||||||
SmartObj = {Name:"", Num:0};
|
SmartObj = {Name:"", Num:0, HTMLLength:0};
|
||||||
SmartObj.IconPath = RetIconPath(SmartObj, 0);
|
SmartObj.IconPath = RetIconPath(SmartObj, 0);
|
||||||
Str = Str.replace("{SmartObj.IconPath}", SmartObj.IconPath);
|
Str = Str.replace("{SmartObj.IconPath}", SmartObj.IconPath);
|
||||||
Str = Str.replace("{SmartObj.Name}", escapeHtml(SmartObj.Name));
|
Str = Str.replace("{SmartObj.Name}", escapeHtml(SmartObj.Name));
|
||||||
Str = Str.replace(/{SmartObj.Num}/g, SmartObj.Num);
|
Str = Str.replace(/{SmartObj.Num}/g, SmartObj.Num);
|
||||||
|
Str = Str.replace(/{SmartObj.HTMLLength}/g, SmartObj.HTMLLength);
|
||||||
if(SmartObj.Num)
|
if(SmartObj.Num)
|
||||||
{
|
{
|
||||||
Str = Str.replace("prod-card__link--connect", "myhidden");
|
Str = Str.replace("prod-card__link--connect", "myhidden");
|
||||||
@ -482,15 +487,40 @@ function SetAccountsCard(Data,AccountsDataStr)
|
|||||||
delete LoadMapAfter["idAccount"];
|
delete LoadMapAfter["idAccount"];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var glWasSmart;
|
||||||
|
var glWasNumAccount;
|
||||||
|
|
||||||
|
function ChangeSmartLocal(NumAccount,WasSmart)
|
||||||
|
{
|
||||||
|
if(!IsPrivateMode())
|
||||||
|
{
|
||||||
|
SetError("Pls, open wallet");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
openModal('idSmartEnter');
|
||||||
|
if(WasSmart)
|
||||||
|
$("idSmartNum").value = WasSmart;
|
||||||
|
else
|
||||||
|
$("idSmartNum").value = "";
|
||||||
|
$("idSmartNum").focus();
|
||||||
|
glWasNumAccount = NumAccount;
|
||||||
|
glWasSmart = WasSmart;
|
||||||
|
};
|
||||||
|
|
||||||
|
function DoSetSmartLocal()
|
||||||
|
{
|
||||||
|
DoChangeSmart(glWasNumAccount, glWasSmart, $("idSmartNum").value);
|
||||||
|
closeModal();
|
||||||
|
};
|
||||||
|
|
||||||
function ConnectSmart(NumAccount)
|
function ConnectSmart(NumAccount)
|
||||||
{
|
{
|
||||||
ChangeSmart(NumAccount, 0);
|
ChangeSmartLocal(NumAccount, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
function SetSmart(NumAccount,WasSmart)
|
function SetSmart(NumAccount,WasSmart)
|
||||||
{
|
{
|
||||||
ChangeSmart(NumAccount, WasSmart);
|
ChangeSmartLocal(NumAccount, WasSmart);
|
||||||
};
|
};
|
||||||
|
|
||||||
function DelSmart(NumAccount,WasSmart)
|
function DelSmart(NumAccount,WasSmart)
|
||||||
@ -934,6 +964,7 @@ function FillDappCard(Str,Item)
|
|||||||
Str = Str.replace("{Item.Owner}", Item.Owner);
|
Str = Str.replace("{Item.Owner}", Item.Owner);
|
||||||
if(!Item.TokenGenerate)
|
if(!Item.TokenGenerate)
|
||||||
Str = Str.replace("dapp-modal__ok-token", "myhidden");
|
Str = Str.replace("dapp-modal__ok-token", "myhidden");
|
||||||
|
Str = Str.replace(/{Item.HTMLLength}/g, Item.HTMLLength);
|
||||||
Str = Str.replace("{Item.IconPath}", RetIconPath(Item, 0));
|
Str = Str.replace("{Item.IconPath}", RetIconPath(Item, 0));
|
||||||
return Str;
|
return Str;
|
||||||
};
|
};
|
||||||
@ -960,10 +991,13 @@ function OpenDappCard(Num)
|
|||||||
openModal('DappCardTemplate');
|
openModal('DappCardTemplate');
|
||||||
};
|
};
|
||||||
|
|
||||||
function OpenDapp(Num)
|
function OpenOnlyDapp(Num,HTMLLength)
|
||||||
{
|
{
|
||||||
OpenDapps(Num);
|
if(HTMLLength)
|
||||||
closeModal();
|
{
|
||||||
|
OpenDapps(Num, 0, HTMLLength);
|
||||||
|
closeModal();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function FillDappCategory(Str,Item,Num)
|
function FillDappCategory(Str,Item,Num)
|
||||||
|
@ -658,17 +658,11 @@ function SendTrCreateAcc(Currency,PubKey,Description,Adviser,Smart,bFindAcc,bAdd
|
|||||||
CancelCreateAccount();
|
CancelCreateAccount();
|
||||||
};
|
};
|
||||||
|
|
||||||
function ChangeSmart(NumAccount,WasSmart)
|
function DoChangeSmart(NumAccount,WasSmart,SmartNum)
|
||||||
{
|
{
|
||||||
if(!IsPrivateMode())
|
if(SmartNum !== null && SmartNum != WasSmart)
|
||||||
{
|
{
|
||||||
SetError("Pls, open wallet");
|
var Smart = parseInt(SmartNum);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
var Result = prompt("Enter smart number:", WasSmart);
|
|
||||||
if(Result !== null && Result != WasSmart)
|
|
||||||
{
|
|
||||||
var Smart = parseInt(Result);
|
|
||||||
if(Smart)
|
if(Smart)
|
||||||
{
|
{
|
||||||
GetData("GetDappList", {StartNum:Smart, CountNum:1}, function (Data)
|
GetData("GetDappList", {StartNum:Smart, CountNum:1}, function (Data)
|
||||||
@ -690,6 +684,17 @@ function ChangeSmart(NumAccount,WasSmart)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function ChangeSmart(NumAccount,WasSmart)
|
||||||
|
{
|
||||||
|
if(!IsPrivateMode())
|
||||||
|
{
|
||||||
|
SetError("Pls, open wallet");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
var SmartNum = prompt("Enter smart number:", WasSmart);
|
||||||
|
DoChangeSmart(NumAccount, WasSmart, SmartNum);
|
||||||
|
};
|
||||||
|
|
||||||
function SetSmartToAccount(NumAccount,Smart)
|
function SetSmartToAccount(NumAccount,Smart)
|
||||||
{
|
{
|
||||||
var OperationID = 0;
|
var OperationID = 0;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
{
|
{
|
||||||
InitMainServer();
|
InitMainServer();
|
||||||
|
|
||||||
document.body.className="univers "+localStorage["idSelStyle"];
|
document.body.className="univers "+Storage.getItem("idSelStyle");
|
||||||
var i=document.URL.indexOf("#");
|
var i=document.URL.indexOf("#");
|
||||||
if(i>0)
|
if(i>0)
|
||||||
{
|
{
|
||||||
|
@ -69,12 +69,14 @@
|
|||||||
$("idConsoleSend").value=Data.Type;
|
$("idConsoleSend").value=Data.Type;
|
||||||
$("idProcessTX").checked=Data.ProcessTX;
|
$("idProcessTX").checked=Data.ProcessTX;
|
||||||
$("idProcessWEB").checked=Data.ProcessWEB;
|
$("idProcessWEB").checked=Data.ProcessWEB;
|
||||||
|
$("idProcessST").checked=Data.ProcessST;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("idConsoleText").value=Data;
|
$("idConsoleText").value=Data;
|
||||||
$("idProcessTX").checked=0;
|
$("idProcessTX").checked=0;
|
||||||
$("idProcessWEB").checked=0;
|
$("idProcessWEB").checked=0;
|
||||||
|
$("idProcessST").checked=0;
|
||||||
$("idConsoleSend").value="ServerCode";
|
$("idConsoleSend").value="ServerCode";
|
||||||
}
|
}
|
||||||
if(bRun)
|
if(bRun)
|
||||||
@ -101,7 +103,7 @@
|
|||||||
|
|
||||||
if(Name)
|
if(Name)
|
||||||
{
|
{
|
||||||
var Data={Code:$("idConsoleText").value,Type:$("idConsoleSend").value,ProcessTX:$("idProcessTX").checked,ProcessWEB:$("idProcessWEB").checked};
|
var Data={Code:$("idConsoleText").value,Type:$("idConsoleSend").value,ProcessTX:$("idProcessTX").checked,ProcessWEB:$("idProcessWEB").checked,ProcessST:$("idProcessST").checked};
|
||||||
CodeList[Name]=Data;
|
CodeList[Name]=Data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,9 +211,11 @@
|
|||||||
{
|
{
|
||||||
var bProcessTX = $("idProcessTX").checked;
|
var bProcessTX = $("idProcessTX").checked;
|
||||||
var bProcessWEB = $("idProcessWEB").checked;
|
var bProcessWEB = $("idProcessWEB").checked;
|
||||||
|
var bProcessST = $("idProcessST").checked;
|
||||||
|
|
||||||
|
|
||||||
SetStatus("");
|
SetStatus("");
|
||||||
GetData("SendDirectCode",{Code:Value,TX:bProcessTX,WEB:bProcessWEB }, function (Data)
|
GetData("SendDirectCode",{Code:Value,TX:bProcessTX,WEB:bProcessWEB,ST:bProcessST }, function (Data)
|
||||||
{
|
{
|
||||||
if(Data)
|
if(Data)
|
||||||
{
|
{
|
||||||
@ -403,7 +407,7 @@
|
|||||||
LoadValues();
|
LoadValues();
|
||||||
SaveArrToSelect();
|
SaveArrToSelect();
|
||||||
|
|
||||||
document.body.className="univers "+localStorage["idSelStyle"];
|
document.body.className="univers "+Storage.getItem("idSelStyle");
|
||||||
|
|
||||||
|
|
||||||
SetStatus("");
|
SetStatus("");
|
||||||
@ -427,6 +431,7 @@
|
|||||||
|
|
||||||
$("idProcessTX").checked=(localStorage["idConsoleProcessTX"]==="true");
|
$("idProcessTX").checked=(localStorage["idConsoleProcessTX"]==="true");
|
||||||
$("idProcessWEB").checked=(localStorage["idConsoleProcessWEB"]==="true");
|
$("idProcessWEB").checked=(localStorage["idConsoleProcessWEB"]==="true");
|
||||||
|
$("idProcessST").checked=(localStorage["idConsoleProcessST"]==="true");
|
||||||
if(localStorage["idConsolePeriodRun"])
|
if(localStorage["idConsolePeriodRun"])
|
||||||
$("idPeriodRun").value=localStorage["idConsolePeriodRun"];
|
$("idPeriodRun").value=localStorage["idConsolePeriodRun"];
|
||||||
}
|
}
|
||||||
@ -443,6 +448,8 @@
|
|||||||
|
|
||||||
localStorage["idConsoleProcessTX"]=$("idProcessTX").checked;
|
localStorage["idConsoleProcessTX"]=$("idProcessTX").checked;
|
||||||
localStorage["idConsoleProcessWEB"]=$("idProcessWEB").checked;
|
localStorage["idConsoleProcessWEB"]=$("idProcessWEB").checked;
|
||||||
|
localStorage["idConsoleProcessST"]=$("idProcessST").checked;
|
||||||
|
|
||||||
|
|
||||||
localStorage["idConsolePeriodRun"]=$("idPeriodRun").value;
|
localStorage["idConsolePeriodRun"]=$("idPeriodRun").value;
|
||||||
}
|
}
|
||||||
@ -506,6 +513,7 @@
|
|||||||
<INPUT type="number" id="idPeriodRun" style="width: 50px;" onchange="SaveValues();" value="1">sec
|
<INPUT type="number" id="idPeriodRun" style="width: 50px;" onchange="SaveValues();" value="1">sec
|
||||||
TX process:<INPUT type="checkbox" id="idProcessTX">
|
TX process:<INPUT type="checkbox" id="idProcessTX">
|
||||||
WEB process:<INPUT type="checkbox" id="idProcessWEB">
|
WEB process:<INPUT type="checkbox" id="idProcessWEB">
|
||||||
|
Static process:<INPUT type="checkbox" id="idProcessST">
|
||||||
|
|
||||||
|
|
||||||
<BR>
|
<BR>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
{
|
{
|
||||||
InitMainServer();
|
InitMainServer();
|
||||||
|
|
||||||
document.body.className="univers "+localStorage["idSelStyle"];
|
document.body.className="univers "+Storage.getItem("idSelStyle");
|
||||||
var i=document.URL.indexOf("#");
|
var i=document.URL.indexOf("#");
|
||||||
if(i>0)
|
if(i>0)
|
||||||
{
|
{
|
||||||
@ -305,4 +305,4 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
<div class="wallet-wrapper" style="padding-top: 10px;">
|
<div class="wallet-wrapper" style="padding-top: 10px;">
|
||||||
<button class="btn btn--full-width wallet-settings__generate" id="idKeyEdit" onclick="SelectTab('TabWalletSet')">Edit</button>
|
<button class="btn btn--full-width wallet-settings__generate" id="idKeyEdit" onclick="SelectTab('TabWalletSet')">Edit</button>
|
||||||
|
|
||||||
<div class="wallet-settings__btns-wrapper">
|
<div class="wallet-settings__btns-wrapper nomobile">
|
||||||
<button class="btn btn--white" onclick="downloadKey('idPrivKeyEdit')" id="idSave2">Save key</button>
|
<button class="btn btn--white" onclick="downloadKey('idPrivKeyEdit')" id="idSave2">Save key</button>
|
||||||
<label for="load-key2" class="btn btn--white" onchange="UploadKey('load-key2')" id="idLoad2">
|
<label for="load-key2" class="btn btn--white" onchange="UploadKey('load-key2')" id="idLoad2">
|
||||||
<input class="hidden" id="load-key2" type="file">
|
<input class="hidden" id="load-key2" type="file">
|
||||||
@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
<div class="prod-card__footer">
|
<div class="prod-card__footer">
|
||||||
<div class="prod-card__footer-wrap" >
|
<div class="prod-card__footer-wrap" >
|
||||||
<a onclick="OpenDapps({SmartObj.Num},{Item.Num})" class="prod-card__link prod-card__link--dapp">
|
<a onclick="OpenDapps({SmartObj.Num},{Item.Num},{SmartObj.HTMLLength})" class="prod-card__link prod-card__link--dapp">
|
||||||
<img src="{SmartObj.IconPath}" alt="." width="32" height="32">
|
<img src="{SmartObj.IconPath}" alt="." width="32" height="32">
|
||||||
<span class="prod-card__dapp-name mob-hidden">{SmartObj.Name}</span>
|
<span class="prod-card__dapp-name mob-hidden">{SmartObj.Name}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -414,7 +414,7 @@
|
|||||||
<div class="prod-card__second-line">
|
<div class="prod-card__second-line">
|
||||||
<div class="prod-card__second-line-left">
|
<div class="prod-card__second-line-left">
|
||||||
<div class="prod-card__heading">
|
<div class="prod-card__heading">
|
||||||
<a class="prod-card__link" onclick="OpenDapp({Item.Num})">{Item.Name}</a>
|
<a class="prod-card__link" onclick="OpenOnlyDapp({Item.Num},{Item.HTMLLength})">{Item.Name}</a>
|
||||||
<!--<span class="lighter-grey-text">Without token generate</span>-->
|
<!--<span class="lighter-grey-text">Without token generate</span>-->
|
||||||
<!--<span class="dapp-modal__ok-token">Token generate</span>-->
|
<!--<span class="dapp-modal__ok-token">Token generate</span>-->
|
||||||
</div>
|
</div>
|
||||||
@ -426,7 +426,7 @@
|
|||||||
<!--</ol> -->
|
<!--</ol> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="prod-card__second-line-img">
|
<div class="prod-card__second-line-img">
|
||||||
<a class="prod-card__link" onclick="OpenDapp({Item.Num})"><img src="{Item.IconPath}" width="32"></a>
|
<a class="prod-card__link" onclick="OpenOnlyDapp({Item.Num},{Item.HTMLLength})"><img src="{Item.IconPath}" width="32"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@ -551,7 +551,7 @@
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<div class="modal__btns-wrap">
|
<div class="modal__btns-wrap">
|
||||||
<button class="btn" onclick="OpenDapp({Item.Num})">Open DApp</button>
|
<button class="btn" onclick="OpenOnlyDapp({Item.Num},{Item.HTMLLength})">Open DApp</button>
|
||||||
<button class="btn btn--white" onclick="closeModal()">Back</button>
|
<button class="btn btn--white" onclick="closeModal()">Back</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -633,6 +633,17 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section class="modal password-modal" id="idSmartEnter">
|
||||||
|
<h2 class="password-modal__title">Enter number of dapp</h2>
|
||||||
|
<p class="password-modal__subtitle">Enter the dapps number that will be added to your account. Attention make sure that you trust this dapp, otherwise you may lose all funds in this account.</p>
|
||||||
|
|
||||||
|
<input type="number" class="password-modal__input" placeholder="Dapp number" id="idSmartNum">
|
||||||
|
<a class="btn btn--270 btn--float" onclick="DoSetSmartLocal()">OK</a>
|
||||||
|
<a class="btn btn--270 btn--float btn--white" onclick="closeModal()">Cancel</a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<div class="fixed-status">
|
<div class="fixed-status">
|
||||||
<div class="fixed-status__wrap">
|
<div class="fixed-status__wrap">
|
||||||
<div id="idStatus" class="fixed-status__status"> </div>
|
<div id="idStatus" class="fixed-status__status"> </div>
|
||||||
@ -640,7 +651,7 @@
|
|||||||
<option value="TERA-MAIN">TERA MAIN</option>
|
<option value="TERA-MAIN">TERA MAIN</option>
|
||||||
<option value="TERA-TEST3">TERA TEST3</option>
|
<option value="TERA-TEST3">TERA TEST3</option>
|
||||||
</select>
|
</select>
|
||||||
<button class="grey-btn reconnect" onclick="ConnectWebWallet()" title="Reconnect"><span>RECONNECT</span></button>
|
<button class="grey-btn reconnect" onclick="ChangeNetwork()" title="Reconnect"><span>RECONNECT</span></button>
|
||||||
<!--рудименты-->
|
<!--рудименты-->
|
||||||
<span id="idNetwork" style="display: none"></span>
|
<span id="idNetwork" style="display: none"></span>
|
||||||
<span id="idSignJSON"></span>
|
<span id="idSignJSON"></span>
|
||||||
|
@ -625,12 +625,14 @@ global.HTTPCaller.SendTransactionHex = function(Params) {
|
|||||||
};
|
};
|
||||||
global.HTTPCaller.SendDirectCode = function(Params, response) {
|
global.HTTPCaller.SendDirectCode = function(Params, response) {
|
||||||
var Result;
|
var Result;
|
||||||
if (Params.TX || Params.WEB) {
|
if (Params.TX || Params.WEB || Params.ST) {
|
||||||
var RunProcess;
|
var RunProcess;
|
||||||
if (Params.TX)
|
if (Params.TX)
|
||||||
RunProcess = global.TX_PROCESS;
|
RunProcess = global.TX_PROCESS;
|
||||||
if (Params.WEB)
|
if (Params.WEB)
|
||||||
RunProcess = global.WEB_PROCESS;
|
RunProcess = global.WEB_PROCESS;
|
||||||
|
if (Params.ST)
|
||||||
|
RunProcess = global.STATIC_PROCESS;
|
||||||
if (RunProcess && RunProcess.RunRPC) {
|
if (RunProcess && RunProcess.RunRPC) {
|
||||||
RunProcess.RunRPC("EvalCode", Params.Code, function(Err, Ret) {
|
RunProcess.RunRPC("EvalCode", Params.Code, function(Err, Ret) {
|
||||||
Result = { result: !Err, sessionid: sessionid, text: Ret, };
|
Result = { result: !Err, sessionid: sessionid, text: Ret, };
|
||||||
|
Loading…
Reference in New Issue
Block a user