mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
add clearnet functionality to frontend (#2814)
* add clearnet functionality to frontend * add pattern and add sync db on rpcs * add domain pattern * show acme name instead of url if known * dont blow up if domain not present after delete * use common name for letsencrypt * normalize urls * refactor start-os ui net service * backend migration and rpcs for serverInfo.host * fix cors * implement clearnet for main startos ui * ability to add and remove tor addresses, including vanity * add guard to prevent duplicate addresses * misc bugfixes * better heuristics for launching UIs * fix ipv6 mocks * fix ipv6 display bug * rewrite url selection for launch ui --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -77,6 +77,14 @@ impl<T> Watch<T> {
|
||||
pub async fn changed(&mut self) {
|
||||
futures::future::poll_fn(|cx| self.poll_changed(cx)).await
|
||||
}
|
||||
pub async fn wait_for<F: FnMut(&T) -> bool>(&mut self, mut f: F) {
|
||||
loop {
|
||||
if self.peek(&mut f) {
|
||||
break;
|
||||
}
|
||||
self.changed().await;
|
||||
}
|
||||
}
|
||||
pub fn send_if_modified<F: FnOnce(&mut T) -> bool>(&self, modify: F) -> bool {
|
||||
self.shared.mutate(|shared| {
|
||||
let changed = modify(&mut shared.data);
|
||||
|
||||
Reference in New Issue
Block a user