Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Jun 2, 2024
1 parent 64ff8fc commit 912c55f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ storybook-static

# cargo
/target/
/.cargo/
.cargo/

.direnv/
result*
33 changes: 6 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tauri-build = { version = "2.0.0-beta.17", default-features = false , features =

[dependencies]
tauri = { version = "2.0.0-beta.22", features = [] }
tauri-plugin-holochain = { git = "https://github.com/darksoil-studio/tauri-plugin-holochain", branch = "develop" }
tauri-plugin-holochain = { git = "https://github.com/darksoil-studio/tauri-plugin-holochain", branch = "main" }
holochain_types = { version = "0.3.1-rc" }
lair_keystore = { version = "0.4.0" }
holochain_client = { version = "0.5.0-rc" }
Expand Down
18 changes: 8 additions & 10 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use holochain_types::prelude::*;
use lair_keystore::dependencies::sodoken::{BufRead, BufWrite};
use tauri_plugin_log::{Target, TargetKind};
use std::{collections::HashMap, path::PathBuf};
use tauri::Manager;
use tauri_plugin_holochain::{HolochainExt, HolochainPluginConfig};
Expand Down Expand Up @@ -29,19 +30,16 @@ pub fn vec_to_locked(mut pass_tmp: Vec<u8>) -> std::io::Result<BufRead> {
}
}


fn internal_ip() -> String {
if cfg!(mobile) {
std::option_env!("INTERNAL_IP")
.expect("Environment variable INTERNAL_IP was not set")
.to_string()
} else {
String::from("localhost")
}
std::option_env!("INTERNAL_IP")
.expect("Environment variable INTERNAL_IP was not set")
.to_string()
}

fn bootstrap_url() -> Url2 {
// Resolved at compile time to be able to point to local services
if cfg!(debug_assertions) {
if tauri::is_dev() {
let internal_ip = internal_ip();
let port = std::option_env!("BOOTSTRAP_PORT")
.expect("Environment variable BOOTSTRAP_PORT was not set");
Expand All @@ -53,7 +51,7 @@ fn bootstrap_url() -> Url2 {

fn signal_url() -> Url2 {
// Resolved at compile time to be able to point to local services
if cfg!(debug_assertions) {
if tauri::is_dev() {
let internal_ip = internal_ip();
let signal_port =
std::option_env!("SIGNAL_PORT").expect("Environment variable INTERNAL_IP was not set");
Expand All @@ -64,7 +62,7 @@ fn signal_url() -> Url2 {
}

fn holochain_dir() -> PathBuf {
if cfg!(debug_assertions) {
if tauri::is_dev() {
let tmp_dir =
tempdir::TempDir::new("plenty").expect("Could not create temporary directory");

Expand Down
11 changes: 9 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"identifier": "studio.darksoil.plenty",
"build": {
"beforeBuildCommand": "pnpm -F ui build && pnpm happ:build",
"beforeBuildCommand": "pnpm -F ui build && pnpm happ:build-debug",
"devUrl": "http://localhost:1420",
"frontendDist": "../ui/dist"
},
Expand All @@ -15,6 +15,13 @@
},
"bundle": {
"active": true,
"targets": "all"
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"localize:build": "lit-localize build"
},
"dependencies": {
"@darksoil-studio/notifications": "github:darksoil-studio/notifications#25b4ad9691737a61ccd750b2ce7d0b177e4811c8&path:ui",
"@darksoil-studio/notifications": "github:darksoil-studio/notifications#ee1a910858d9235d6f9a68af9f72248f930c33cc&path:ui",
"@holochain-open-dev/elements": "^0.300.0-rc",
"@holochain-open-dev/file-storage": "github:holochain-open-dev/file-storage#7761b9e0057d14048a93a859bd6dc6170db24607&path:ui",
"@holochain-open-dev/profiles": "github:holochain-open-dev/profiles#decbb755bfa4432d672a58783eb7d4985fcadcba&path:ui",
Expand Down

0 comments on commit 912c55f

Please sign in to comment.