mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-31 16:09:26 +00:00
Variable address truncation (for mobile)
This commit is contained in:
parent
0e49e4ad37
commit
5487383068
2 changed files with 10 additions and 3 deletions
|
@ -11,8 +11,9 @@ function destinationsToAddress(destinations){
|
|||
return address;
|
||||
}
|
||||
|
||||
function addressTruncate(address){
|
||||
return address.substring(0, 6) + "..." + address.substring(address.length-6);
|
||||
function addressTruncate(address, range){
|
||||
if(typeof(range) === "undefined") range = 8;
|
||||
return address.substring(0, range) + "..." + address.substring(address.length-range);
|
||||
}
|
||||
|
||||
function check256(str, length) {
|
||||
|
|
|
@ -275,7 +275,13 @@ Rectangle {
|
|||
anchors.leftMargin: 6
|
||||
fontSize: 14 * scaleRatio
|
||||
fontBold: true
|
||||
text: TxUtils.addressTruncate(address)
|
||||
text: {
|
||||
if(isMobile){
|
||||
TxUtils.addressTruncate(address, 6);
|
||||
} else {
|
||||
return TxUtils.addressTruncate(address, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
|
|
Loading…
Reference in a new issue