Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Adjustments to confirmation popup scroll-area #1585

Merged
merged 5 commits into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions interface/client/styles/popupWindows.import.less
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
right: 0;
padding: 0 @gridHeight;
padding-top: @gridHeight * 3;
background: linear-gradient(transparent 0%, @colorGrayLight 20%);
background: linear-gradient(transparent 0%, @colorGrayLight 35%);

&.dapp-small {
background: linear-gradient(transparent 50%, @colorGrayLight 70%);
background: linear-gradient(transparent 50%, @colorGrayLight 70%);
}
}

Expand All @@ -75,7 +75,7 @@
font-weight: 600;
}

&.update-available {
&.update-available {
-webkit-user-select: all;

.text {
Expand Down Expand Up @@ -183,7 +183,7 @@
}
}

// Parameters
// Parameters
.fees,
.parameters {
font-size: 0.9em;
Expand Down Expand Up @@ -216,7 +216,7 @@
&:hover strong {
word-break: break-all;
}

}
.type {
text-align: right;
Expand All @@ -230,9 +230,9 @@
}

::selection {
color: #FFF;
color: #FFF;
background: @colorLink;
}
}
}

ol li::before {
Expand Down Expand Up @@ -574,7 +574,7 @@
}
.data {
font-size: 0.9em;

pre {
margin: 0 -@defaultMargin;
overflow: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>{{i18n "mist.popupWindows.sendTransactionConfirmation.title.sendTransaction"
<h1>{{i18n "mist.popupWindows.sendTransactionConfirmation.title.createContract"}}</h1>
{{/if}}
{{/if}}

<div class="container">
<div class="transaction-parties">
<div>
Expand All @@ -34,7 +34,7 @@ <h1>{{i18n "mist.popupWindows.sendTransactionConfirmation.title.createContract"}
</div>
{{/if}}
</div>

<div>
{{#if to}}
{{#if TemplateVar.get "toIsContract"}}
Expand Down Expand Up @@ -65,45 +65,11 @@ <h1>{{i18n "mist.popupWindows.sendTransactionConfirmation.title.createContract"}
{{/unless}}
{{/if}}

{{#if data}}

{{#if showFormattedParams}}
<div class="parameters">
<h3>{{{i18n "mist.popupWindows.sendTransactionConfirmation.parameters"}}}
<a href="#" class="toggle-panel">{{{i18n "mist.popupWindows.sendTransactionConfirmation.showRawBytecode"}}}</a>
</h3>
<ol>
{{# each param in params}}
<li>{{> dapp_output output=param }}</li>
{{/each}}
</ol>
</div>
{{else}}
<div class="data">
<h3>{{i18n "mist.popupWindows.sendTransactionConfirmation.data"}}

{{# if params}}
<a href="#" class="toggle-panel">{{{i18n "mist.popupWindows.sendTransactionConfirmation.showDecodedParameters"}}}</a>
{{else}}
{{#if to}}
{{#unless (TemplateVar.get "lookingUpFunctionSignature")}}
<a class="lookup-function-signature simptip-position-bottom simptip-movable" data-tooltip="{{i18n 'mist.popupWindows.sendTransactionConfirmation.lookupDataExplainer'}}"> {{i18n "mist.popupWindows.sendTransactionConfirmation.lookupData"}}
</a>
{{/unless}}
{{/if}}
{{/if}}
</h3>

<pre>{{{formattedData}}}</pre>
</div>
{{/if}}
{{/if}}

<div class="fees">
<ul>
<li>
<div class="value">
{{i18n "mist.popupWindows.sendTransactionConfirmation.estimatedFee"}}
{{i18n "mist.popupWindows.sendTransactionConfirmation.estimatedFee"}}
</div>
<div class="type">
{{#if $eq (TemplateVar.get "estimatedGas") "invalid"}}
Expand All @@ -120,7 +86,7 @@ <h3>{{i18n "mist.popupWindows.sendTransactionConfirmation.data"}}

{{/if}}
</div>
</li>
</li>
<li>
<div class="value">
{{i18n "mist.popupWindows.sendTransactionConfirmation.gasLimit"}}
Expand All @@ -138,23 +104,56 @@ <h3>{{i18n "mist.popupWindows.sendTransactionConfirmation.data"}}
</ul>
</div>

{{#if data}}
{{#if showFormattedParams}}
<div class="parameters">
<h3>{{{i18n "mist.popupWindows.sendTransactionConfirmation.parameters"}}}
<a href="#" class="toggle-panel">{{{i18n "mist.popupWindows.sendTransactionConfirmation.showRawBytecode"}}}</a>
</h3>
<ol>
{{# each param in params}}
<li>{{> dapp_output output=param }}</li>
{{/each}}
</ol>
</div>
{{else}}
<div class="data">
<h3>{{i18n "mist.popupWindows.sendTransactionConfirmation.data"}}

{{# if params}}
<a href="#" class="toggle-panel">{{{i18n "mist.popupWindows.sendTransactionConfirmation.showDecodedParameters"}}}</a>
{{else}}
{{#if to}}
{{#unless (TemplateVar.get "lookingUpFunctionSignature")}}
<a class="lookup-function-signature simptip-position-bottom simptip-movable" data-tooltip="{{i18n 'mist.popupWindows.sendTransactionConfirmation.lookupDataExplainer'}}"> {{i18n "mist.popupWindows.sendTransactionConfirmation.lookupData"}}
</a>
{{/unless}}
{{/if}}
{{/if}}
</h3>

<pre>{{{formattedData}}}</pre>
</div>
{{/if}}
{{/if}}

</div>
<footer>
{{#if TemplateVar.get "unlocking"}}
<h2>{{i18n "mist.popupWindows.sendTransactionConfirmation.unlocking"}}</h2>
{{else}}

<input type="password" placeholder="{{i18n 'mist.popupWindows.sendTransactionConfirmation.enterPassword'}}">

<div class="dapp-modal-buttons">
<button class="cancel" type="button">{{i18n "buttons.cancel"}}</button>
<button class="ok dapp-primary-button" type="submit">{{i18n "mist.popupWindows.sendTransactionConfirmation.buttons.sendTransaction"}}</button>
</div>

{{/if}}
</footer>
{{/with}}

</form>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Template Controllers

var setWindowSize = function(template){
Tracker.afterFlush(function(){
ipc.send('backendAction_setWindowSize', 580, template.$('.popup-windows').height() + 60);
ipc.send('backendAction_setWindowSize', 580, template.$('.popup-windows').height() + 120);
});
}

Expand Down Expand Up @@ -103,7 +103,7 @@ Template['popupWindows_sendTransactionConfirmation'].onCreated(function(){
var data = Session.get('data');

if(data) {


// set window size
setWindowSize(template);
Expand All @@ -127,10 +127,10 @@ Template['popupWindows_sendTransactionConfirmation'].onCreated(function(){
web3.eth.getCode(data.to, function(e, res){
if(!e && res && res.length > 2) {
TemplateVar.set(template, 'toIsContract', true);
setWindowSize(template);
setWindowSize(template);
}
});

if (data.data) {
localSignatureLookup(data.data).then(function(textSignature) {
// Clean version of function signature. Striping params
Expand Down Expand Up @@ -261,7 +261,7 @@ Template['popupWindows_sendTransactionConfirmation'].helpers({
@method (transactionInvalid)
*/
'transactionInvalid': function() {
return TemplateVar.get('estimatedGas') === 'invalid'
return TemplateVar.get('estimatedGas') === 'invalid'
|| TemplateVar.get('estimatedGas') === 0
|| typeof TemplateVar.get('estimatedGas') === 'undefined';
}
Expand Down Expand Up @@ -294,7 +294,7 @@ Template['popupWindows_sendTransactionConfirmation'].events({
*/
'submit form': function(e, template){
e.preventDefault();

var data = Session.get('data'),
pw = template.find('input[type="password"]').value,
gas = web3.fromDecimal(TemplateVar.get('providedGas'));
Expand Down Expand Up @@ -373,7 +373,7 @@ Template['popupWindows_sendTransactionConfirmation'].events({

remoteSignatureLookup(data.data).then(function(textSignature) {
TemplateVar.set(template, 'lookingUpFunctionSignature', false);

// Clean version of function signature. Striping params
TemplateVar.set(template, 'executionFunction', textSignature.replace(/\(.+$/g, ''));
TemplateVar.set(template, 'hasSignature', true);
Expand All @@ -385,10 +385,9 @@ Template['popupWindows_sendTransactionConfirmation'].events({
ipc.send('backendAction_decodeFunctionSignature', textSignature, data.data);
}
}).catch(function(bytesSignature) {
TemplateVar.set(template, 'lookingUpFunctionSignature', false);
TemplateVar.set(template, 'lookingUpFunctionSignature', false);
TemplateVar.set(template, 'executionFunction', bytesSignature);
TemplateVar.set(template, 'hasSignature', false);
});
}
});