mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-05 18:39:38 +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;
|
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{
|
||||||
|
|
Loading…
Reference in a new issue