mirror of
https://github.com/creating2morrow/neveko.git
synced 2025-01-03 09:29:39 +00:00
initialize b32 destination on gui home screen
This commit is contained in:
parent
1f94d40f9f
commit
7bd22c8e92
2 changed files with 11 additions and 16 deletions
19
.gitignore
vendored
19
.gitignore
vendored
|
@ -13,24 +13,17 @@ notes.txt
|
||||||
monero-x86_64-linux-gnu-v*/
|
monero-x86_64-linux-gnu-v*/
|
||||||
*.jar
|
*.jar
|
||||||
opt/*
|
opt/*
|
||||||
eventlog.txt
|
*.so
|
||||||
libjcpuid.so
|
*.config
|
||||||
router.config
|
*.log
|
||||||
router.ping
|
*.key
|
||||||
libjbigi.so
|
|
||||||
wrapper.log
|
|
||||||
keyBackup/privateEncryption.key
|
|
||||||
keyBackup/privateSigning.key
|
|
||||||
keyBackup/publicEncryption.key
|
|
||||||
keyBackup/publicSigning.key
|
|
||||||
logs/log-0.txt
|
|
||||||
router.info
|
router.info
|
||||||
router.keys.dat
|
router.keys.dat
|
||||||
prngseed.rnd
|
prngseed.rnd
|
||||||
hostsdb.blockfile
|
hostsdb.blockfile
|
||||||
logs/log-1.txt
|
|
||||||
certificates/
|
certificates/
|
||||||
netDb/*
|
netDb/*
|
||||||
peerProfiles/*
|
peerProfiles/*
|
||||||
*.dat
|
*.dat
|
||||||
ssu2tokens.txt
|
*.txt
|
||||||
|
*.txt.gz
|
||||||
|
|
|
@ -18,6 +18,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct HomeApp {
|
pub struct HomeApp {
|
||||||
|
b32_destination: String,
|
||||||
/// blocks fetched during last wallet refresh
|
/// blocks fetched during last wallet refresh
|
||||||
blocks_fetched: u64,
|
blocks_fetched: u64,
|
||||||
wallet_height: u64,
|
wallet_height: u64,
|
||||||
|
@ -65,6 +66,8 @@ pub struct HomeApp {
|
||||||
|
|
||||||
impl Default for HomeApp {
|
impl Default for HomeApp {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
|
let b32_destination = i2p::get_destination(i2p::ServerTunnelType::App)
|
||||||
|
.unwrap_or(String::from("error: b32 address not found."));
|
||||||
let blocks_fetched = 0;
|
let blocks_fetched = 0;
|
||||||
let connections = Default::default();
|
let connections = Default::default();
|
||||||
let is_core_running = false;
|
let is_core_running = false;
|
||||||
|
@ -100,6 +103,7 @@ impl Default for HomeApp {
|
||||||
egui_extras::RetainedImage::from_image_bytes("./assets/i2p.png", &c_i2p_logo).unwrap();
|
egui_extras::RetainedImage::from_image_bytes("./assets/i2p.png", &c_i2p_logo).unwrap();
|
||||||
let wallet_height = 0;
|
let wallet_height = 0;
|
||||||
Self {
|
Self {
|
||||||
|
b32_destination,
|
||||||
blocks_fetched,
|
blocks_fetched,
|
||||||
connections,
|
connections,
|
||||||
core_timeout_rx,
|
core_timeout_rx,
|
||||||
|
@ -339,10 +343,8 @@ impl eframe::App for HomeApp {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
self.logo_i2p.show(ui);
|
self.logo_i2p.show(ui);
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let i2p_address = i2p::get_destination(i2p::ServerTunnelType::App)
|
|
||||||
.unwrap_or_default();
|
|
||||||
ui.label(
|
ui.label(
|
||||||
RichText::new(format!("- status: {}\n- address: {}", str_i2p_status, i2p_address))
|
RichText::new(format!("- status: {}\n- address: {}", str_i2p_status, self.b32_destination))
|
||||||
.size(16.0)
|
.size(16.0)
|
||||||
.color(color),
|
.color(color),
|
||||||
).on_hover_text(hover_txt);
|
).on_hover_text(hover_txt);
|
||||||
|
|
Loading…
Reference in a new issue