mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-20 23:21:36 +03:00
wee fixes
This commit is contained in:
parent
b7973dec50
commit
f04e02af17
@ -243,18 +243,12 @@ fn initialize(our: Address) {
|
||||
.unwrap();
|
||||
|
||||
// populate state
|
||||
// this will add ourselves to the homepage
|
||||
if let Err(e) = state.fetch() {
|
||||
println!("failed to fetch settings: {e}");
|
||||
homepage::add_to_homepage("Settings", Some(ICON), Some("/"), None);
|
||||
}
|
||||
|
||||
// add ourselves to the homepage
|
||||
homepage::add_to_homepage(
|
||||
"Settings",
|
||||
Some(ICON),
|
||||
Some("/"),
|
||||
Some(&make_widget(&state)),
|
||||
);
|
||||
|
||||
main_loop(&mut state, &mut http_server);
|
||||
}
|
||||
|
||||
@ -518,7 +512,7 @@ fn make_widget(state: &SettingsState) -> String {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/kinode.css">
|
||||
</head>
|
||||
<body style="margin: 0; padding: 8px; width: 100%; height: 100%;">
|
||||
<body style="margin: 0; padding: 8px; width: 100%; height: 100%; padding-bottom: 30px;">
|
||||
<article id="onchain-id">
|
||||
<h3>{}</h3>
|
||||
<details style="word-wrap: break-word;">
|
||||
|
@ -198,7 +198,11 @@ async fn handle_local_request(
|
||||
None,
|
||||
),
|
||||
NetAction::GetPeer(peer) => (
|
||||
NetResponse::Peer(data.pki.get(&peer).map(|p| p.clone())),
|
||||
if peer == ext.our.name {
|
||||
NetResponse::Peer(Some((*ext.our).clone()))
|
||||
} else {
|
||||
NetResponse::Peer(data.pki.get(&peer).map(|p| p.clone()))
|
||||
},
|
||||
None,
|
||||
),
|
||||
NetAction::GetDiagnostics => {
|
||||
|
Loading…
Reference in New Issue
Block a user