forked from Public/monero-gui
Variable address truncation (for mobile)
This commit is contained in:
@@ -11,8 +11,9 @@ function destinationsToAddress(destinations){
|
|||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addressTruncate(address){
|
function addressTruncate(address, range){
|
||||||
return address.substring(0, 6) + "..." + address.substring(address.length-6);
|
if(typeof(range) === "undefined") range = 8;
|
||||||
|
return address.substring(0, range) + "..." + address.substring(address.length-range);
|
||||||
}
|
}
|
||||||
|
|
||||||
function check256(str, length) {
|
function check256(str, length) {
|
||||||
|
|||||||
@@ -275,7 +275,13 @@ Rectangle {
|
|||||||
anchors.leftMargin: 6
|
anchors.leftMargin: 6
|
||||||
fontSize: 14 * scaleRatio
|
fontSize: 14 * scaleRatio
|
||||||
fontBold: true
|
fontBold: true
|
||||||
text: TxUtils.addressTruncate(address)
|
text: {
|
||||||
|
if(isMobile){
|
||||||
|
TxUtils.addressTruncate(address, 6);
|
||||||
|
} else {
|
||||||
|
return TxUtils.addressTruncate(address, 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea{
|
MouseArea{
|
||||||
|
|||||||
Reference in New Issue
Block a user