Skip to content

Commit

Permalink
[*] improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Jul 15, 2024
1 parent 43cc55a commit 7c5b918
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ It's a `Solana` wallet. Based on Rust and Slint-ui. You can compile it for Linux
- [x] Development mode of TestNet and DevNet
- [x] Send SOL and spl token in MainNet
- [x] Genarate QrCode for address
- [x] Support sending token with memo and setting prioritization fee

### TODO
- [ ] fetch spl token price
Expand Down
3 changes: 2 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
- [x] 测试模式:支持测试网和开发网
- [x] 在主网发送和接收Sol和Token
- [x] 支持给地址生成QrCode
- [x] 支持发送备注和设置优先费用

### TODO
- [ ] 获取 spl token 价格
- [ ] 获取spl token价格
- [ ] 在Android平台复制和粘贴文本

### 安卓平台编译信息
Expand Down
7 changes: 1 addition & 6 deletions src/logic/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,7 @@ pub fn init(ui: &AppWindow) {
if v <= max_prioritization_fee {
SharedString::default()
} else {
slint::format!(
"{}{}, {}",
tr("最大优先费用"),
max_prioritization_fee,
tr("请设置更大的优先费用")
)
slint::format!("{} {}", tr("最大优先费用为"), max_prioritization_fee)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/logic/tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ pub fn tr(text: &str) -> String {
items.insert("优先费用", "Prioritization fee");
items.insert("基础费用", "Base fee");
items.insert("最大优先费用", "Max prioritization fee");
items.insert("最大优先费用为", "Max prioritization fee is");
items.insert("慢", "Slow");
items.insert("正常", "Normal");
items.insert("快", "Fast");
Expand Down
14 changes: 8 additions & 6 deletions ui/base/transaction-fee.slint
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ export component TransactionFee inherits SettingDetail {

title: Logic.tr(Store.is-cn, "交易信息");

if loading-status == LoadingStatus.Loading: Loading {
loading-text: Logic.tr(Store.is-cn, "正在估计交易费用...");
colorize: Theme.secondary-brand-color;
icon-size: Theme.icon-size * 2;
}

SettingDetailInner {
if loading-status == LoadingStatus.Loading: Loading {
height: 150px;
loading-text: Logic.tr(Store.is-cn, "正在估计交易费用...");
colorize: Theme.secondary-brand-color;
icon-size: Theme.icon-size * 2;
}

SettingDetailInnerVbox {
SettingDetailLabel {
text: Logic.tr(Store.is-cn, "区块网络");
Expand Down Expand Up @@ -171,6 +172,7 @@ export component TransactionFee inherits SettingDetail {

HorizontalLayout {
padding-top: Theme.padding * 5;
padding-bottom: Theme.padding * 5;

if loading-status == LoadingStatus.Loading: CancelBtn {
border-radius: Theme.border-radius;
Expand Down
14 changes: 8 additions & 6 deletions ui/base/wait-transaction-confirmed.slint
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ export component WaitTransactionConfirmed inherits SettingDetail {

title: Logic.tr(Store.is-cn, "交易记录");

if loading-status == LoadingStatus.Loading: Loading {
loading-text: Logic.tr(Store.is-cn, "等待交易确认...");
colorize: Theme.secondary-brand-color;
icon-size: Theme.icon-size * 2;
}

SettingDetailInner {
if loading-status == LoadingStatus.Loading: Loading {
height: 150px;
loading-text: Logic.tr(Store.is-cn, "等待交易确认...");
colorize: Theme.secondary-brand-color;
icon-size: Theme.icon-size * 2;
}

SettingDetailInnerVbox {
SettingDetailLabel {
text: Logic.tr(Store.is-cn, "区块网络");
Expand Down Expand Up @@ -86,6 +87,7 @@ export component WaitTransactionConfirmed inherits SettingDetail {

HorizontalLayout {
padding-top: Theme.padding * 5;
padding-bottom: Theme.padding * 5;

if loading-status == LoadingStatus.Loading: CancelBtn {
border-radius: Theme.border-radius;
Expand Down

0 comments on commit 7c5b918

Please sign in to comment.