-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from opeolluwa/monorepo
Monorepo
- Loading branch information
Showing
53 changed files
with
6,343 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
core/server/assets | ||
|
||
.nx/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use std::net::{IpAddr, Ipv4Addr}; | ||
|
||
use local_ip_address::local_ip; | ||
use utils::pkg::CommandData; | ||
|
||
#[tauri::command] | ||
pub fn server() -> CommandData<String> { | ||
let default_ip_address = IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)); | ||
let local_ip = local_ip().unwrap_or(default_ip_address); | ||
let port = 2105; | ||
let server_address = format!("http://{}:{}", local_ip, port); | ||
CommandData::ok("server address", server_address) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use local_ip_address::local_ip; | ||
use utils::pkg::CommandData; | ||
|
||
#[tauri::command] | ||
pub fn is_connected_to_wifi() -> CommandData<bool> { | ||
// the app would have a local ip address if it is connected to a network | ||
// else it would crash, this is leveraged to check the network status | ||
let has_ip_addr = local_ip().ok(); | ||
if has_ip_addr.is_none() { | ||
return CommandData::ok("wifi status", false); | ||
} | ||
CommandData::ok("server address", true) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.