S001: first build compiles; fix 5 compile errors in place
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
49825b626e
commit
d2bb67f4ea
5 changed files with 37 additions and 17 deletions
|
|
@ -15,6 +15,7 @@ use crate::app::{App, Launch, WindowRequest};
|
|||
use crate::inject::{self, PageMessage};
|
||||
use crate::keys::Action;
|
||||
use crate::net::download;
|
||||
use crate::spell::Speller;
|
||||
use crate::store::downloads::State as DlState;
|
||||
use crate::store::permissions::{Decision, Kind as Perm};
|
||||
use crate::tabs::{Dialog, Page, Prompt, Tab};
|
||||
|
|
|
|||
|
|
@ -793,7 +793,8 @@ impl App {
|
|||
}
|
||||
}
|
||||
// Mute state survives navigation.
|
||||
let muted = self.tab_mut(id).map(|t| t.muted || self.shared.settings.borrow().site_muted(&util::host_of_str(&t.url))).unwrap_or(false);
|
||||
let shared = self.shared.clone();
|
||||
let muted = self.tab_mut(id).map(|t| t.muted || shared.settings.borrow().site_muted(&util::host_of_str(&t.url))).unwrap_or(false);
|
||||
if muted && let Some(tab) = self.tab_mut(id) {
|
||||
tab.muted = true;
|
||||
if let Some(web) = &tab.web {
|
||||
|
|
@ -1799,7 +1800,6 @@ impl App {
|
|||
// Back/forward mouse buttons navigate.
|
||||
if *state == ElementState::Pressed && matches!(button, winit::event::MouseButton::Back | winit::event::MouseButton::Forward) {
|
||||
let back = *button == winit::event::MouseButton::Back;
|
||||
drop(win);
|
||||
self.run_in(window_id, if back { Command::Back } else { Command::Forward });
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! Single instance per profile: a running Nacre listens on a loopback port; a second launch
|
||||
//! hands its links to it and exits. The port and a random token are in the profile's data folder.
|
||||
|
||||
use std::io::{BufRead, BufReader, Write};
|
||||
use std::io::{BufRead, BufReader, Read, Write};
|
||||
use std::net::{TcpListener, TcpStream};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::mpsc::Sender;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ pub fn pattern_to_regex(pattern: &str) -> String {
|
|||
}
|
||||
let mut out = String::from("^");
|
||||
let (scheme, rest) = pattern.split_once("://").unwrap_or(("*", pattern));
|
||||
out.push_str(if scheme == "*" { "https?" } else { &escape_regex(scheme) });
|
||||
out.push_str(&if scheme == "*" { "https?".to_owned() } else { escape_regex(scheme) });
|
||||
out.push_str(":\\/\\/");
|
||||
let (host, path) = match rest.find('/') {
|
||||
Some(i) => (&rest[..i], &rest[i..]),
|
||||
|
|
|
|||
|
|
@ -944,7 +944,8 @@ fn newtab(ui: &mut Ui, f: &mut Frame, s: &mut Settings) {
|
|||
}
|
||||
});
|
||||
switch_row(ui, "Follows the mouse", "", &mut s.ntp.bg_mouse);
|
||||
row(ui, "Image", if s.ntp.bg_image.is_empty() { "None" } else { &s.ntp.bg_image }, |ui| {
|
||||
let image = if s.ntp.bg_image.is_empty() { "None".to_owned() } else { s.ntp.bg_image.clone() };
|
||||
row(ui, "Image", &image, |ui| {
|
||||
if !s.ntp.bg_image.is_empty() && ui.button("Remove").clicked() {
|
||||
s.ntp.bg_image.clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue