ui: tx info modal title
This commit is contained in:
parent
01b5b21488
commit
2c1be806a9
3 changed files with 20 additions and 17 deletions
|
@ -67,6 +67,7 @@ wallets:
|
|||
tx_finalizing: Finalizing
|
||||
tx_confirmed: Confirmed
|
||||
txs: Transactions
|
||||
tx: Transaction
|
||||
input_finalize_desc: 'Enter message to finalize the transaction:'
|
||||
messages: Messages
|
||||
transport: Transport
|
||||
|
|
|
@ -67,6 +67,7 @@ wallets:
|
|||
tx_finalizing: Завершение
|
||||
tx_confirmed: Подтверждено
|
||||
txs: Транзакции
|
||||
tx: Транзакция
|
||||
input_finalize_desc: 'Введите полученное сообщение для завершения транзакции:'
|
||||
messages: Сообщения
|
||||
transport: Транспорт
|
||||
|
|
|
@ -210,6 +210,24 @@ impl WalletTransactions {
|
|||
}
|
||||
}
|
||||
|
||||
/// Show transaction information [`Modal`].
|
||||
fn show_tx_info_modal(&mut self, wallet: &Wallet, tx: &WalletTransaction) {
|
||||
self.tx_info_response_edit = "".to_string();
|
||||
self.tx_info_finalize_edit = "".to_string();
|
||||
self.tx_info_finalize_error = false;
|
||||
self.tx_info_id = Some(tx.data.id);
|
||||
// Setup slate and message from transaction.
|
||||
if let Some((slate, message)) = wallet.read_slate_by_tx(tx) {
|
||||
self.tx_info_response_edit = message;
|
||||
self.tx_info_slate = Some(slate);
|
||||
}
|
||||
// Show transaction information modal.
|
||||
Modal::new(TX_INFO_MODAL)
|
||||
.position(ModalPosition::CenterTop)
|
||||
.title(t!("wallets.tx"))
|
||||
.show();
|
||||
}
|
||||
|
||||
/// Draw transaction item.
|
||||
fn tx_item_ui(&mut self,
|
||||
ui: &mut egui::Ui,
|
||||
|
@ -422,23 +440,6 @@ impl WalletTransactions {
|
|||
});
|
||||
}
|
||||
|
||||
/// Show transaction information [`Modal`].
|
||||
fn show_tx_info_modal(&mut self, wallet: &Wallet, tx: &WalletTransaction) {
|
||||
self.tx_info_response_edit = "".to_string();
|
||||
self.tx_info_finalize_edit = "".to_string();
|
||||
self.tx_info_finalize_error = false;
|
||||
self.tx_info_id = Some(tx.data.id);
|
||||
// Setup slate and message from transaction.
|
||||
if let Some((slate, message)) = wallet.read_slate_by_tx(tx) {
|
||||
self.tx_info_response_edit = message;
|
||||
self.tx_info_slate = Some(slate);
|
||||
}
|
||||
// Show transaction information modal.
|
||||
Modal::new(TX_INFO_MODAL)
|
||||
.position(ModalPosition::CenterTop)
|
||||
.show();
|
||||
}
|
||||
|
||||
/// Draw transaction info [`Modal`] content.
|
||||
fn tx_info_modal_ui(&mut self,
|
||||
ui: &mut egui::Ui,
|
||||
|
|
Loading…
Reference in a new issue