make confirm dialog a more pleasant size

This commit is contained in:
2024-03-19 22:59:33 -06:00
parent 402c758f0a
commit feac310ef1
2 changed files with 20 additions and 8 deletions
+10 -5
View File
@@ -4,16 +4,21 @@
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
body {
font-size: '0.7em';
}
</style>
</head>
<body>
<h1 id="title-h1"></h1>
<h5 id="title-h1"></h1>
<button id="good">Yes</button>
<span width="10px">
<button id="bad">No</button>
<pre id="miscinfo"></pre>
<br>
<button id="good">Yes</button>
<br>
<button id="bad">No</button>
<script type="module" src="./gb.js"></script>
+10 -3
View File
@@ -86,6 +86,10 @@ let GB_ITERS = 1;
let GB_SEC = 200*GB_ITERS; // [ITER]; 1iter / 5ms = 200iter / sec
let GB_MIN = 60*GB_SEC; // [ITER]
// size of confirm windows
let GB_W_PX = 400;
let GB_H_PX = 300;
let MSG_SIGN_TIMEOUT = 30*GB_MIN;
let TX_SIGN_TIMEOUT = 30*GB_MIN;
@@ -98,6 +102,7 @@ let NETIDS_ALT_DEF : Array<bi_netid> = [NETID_AETEST, NETID_AEMAIN];
let NETIDS_ALL : Array<bi_netid> = [NETID_GDEV, NETID_AETEST, NETID_AEMAIN];
//=============================================================================
//=============================================================================
// API: GLOBAL TYPES
@@ -533,7 +538,7 @@ bi_msg_handler_content
return w2a_ok({signedTransaction: result.signedTransaction});
}
else {
return w2a_err(awcp.ERROR_CODE_RpcRejectedByUserError, "your not pretty enough");
return w2a_err(awcp.ERROR_CODE_RpcRejectedByUserError, "user rejected tx");
}
//if (result.result === 'good') {
// return w2a_ok({signedTransaction: result.signedTransaction});
@@ -846,8 +851,10 @@ gb
browser.runtime.onConnect.addListener(port_talker_toer_lambda);
// does the user want to sign the message
let confirm_window = await browser.windows.create({url : '../pages/gb.html',
type : 'popup'});
let confirm_window = await browser.windows.create({url : '../pages/gb.html',
type : 'popup',
width : GB_W_PX,
height : GB_H_PX});
// @ts-ignore shut the fuck up
let tabid : number = confirm_window.tabs[0].id;