feat: add si cli
This commit is contained in:
@@ -28,7 +28,6 @@ icons = [
|
||||
|
||||
[dependencies]
|
||||
metadata = { path = "../crates/metadata" }
|
||||
paths = { path = "../crates/paths" }
|
||||
settings = { path = "../crates/settings" }
|
||||
signed_app = { path = "../crates/signed_app" }
|
||||
signed_state = { path = "../crates/signed_state" }
|
||||
|
||||
+4
-20
@@ -54,31 +54,15 @@ fn main() {
|
||||
cx.on_action(|_: &Quit, cx| cx.quit());
|
||||
cx.set_app_identity("build.signed.signed", "Signed");
|
||||
|
||||
let store = cx.new(|_| SettingsStore::new(paths::settings_file()));
|
||||
SettingsStore::set_global(store.clone(), cx);
|
||||
|
||||
let settings = store.read(cx).settings().clone();
|
||||
signed_app::AppRoot::apply_appearance_mode(settings.appearance, cx);
|
||||
|
||||
if let Err(error) = std::fs::create_dir_all(paths::nostr_dir()) {
|
||||
tracing::warn!("failed to create nostr dir: {error}");
|
||||
}
|
||||
|
||||
if let Err(error) = std::fs::create_dir_all(paths::repos_dir()) {
|
||||
tracing::warn!("failed to create repos dir: {error}");
|
||||
}
|
||||
|
||||
if let Err(error) = signed_state::init(
|
||||
paths::nostr_dir(),
|
||||
paths::repos_dir().to_path_buf(),
|
||||
settings.local_repos.scan_paths.clone(),
|
||||
cx,
|
||||
) {
|
||||
if let Err(error) = signed_state::init(cx) {
|
||||
tracing::error!("failed to initialize application state: {error:#}");
|
||||
cx.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
let appearance = SettingsStore::global(cx).read(cx).settings().appearance;
|
||||
signed_app::AppRoot::apply_appearance_mode(appearance, cx);
|
||||
|
||||
metadata::init(cx);
|
||||
|
||||
let theme = cx.theme();
|
||||
|
||||
Reference in New Issue
Block a user