Skip to content

Commit

Permalink
feat: add api address in release
Browse files Browse the repository at this point in the history
use https://epicapi.rustsoft.cn as api address while in release environment
  • Loading branch information
dvorakchen committed Apr 24, 2024
1 parent 21fec0c commit 54c348c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"build": {
"beforeBuildCommand": "cd src-ui && trunk build",
"beforeBuildCommand": "cd src-ui && trunk build --release",
"beforeDevCommand": "cd src-ui && trunk serve",
"devPath": "http://localhost:1420",
"distDir": "../src-ui/dist"
},
"package": {
"productName": "Dvorak's Epic Games Launcher",
"productName": "Dvorak Epic Games Launcher",
"version": "0.0.1"
},
"tauri": {
Expand Down
4 changes: 4 additions & 0 deletions src-ui/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ pub mod signin_signout;
use crate::storages::get_signed_in_user_info;
use signin_signout::*;

#[cfg(any(debug_assertions, test))]
const SERVER_ADDRESS: &str = "http://127.0.0.1:8080";

#[cfg(not(any(debug_assertions, test)))]
const SERVER_ADDRESS: &str = "https://epicapi.rustsoft.cn";

/// server address combine with path,
///
/// # argument:
Expand Down
2 changes: 1 addition & 1 deletion src-ui/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn is_click_outside(x: f32, y: f32, container: HtmlElement<Div>) -> bool {
}
}

pub const GAME_COVER_IMAGE_PATH: &'static str = "/assets/images/games/";
// pub const GAME_COVER_IMAGE_PATH: &'static str = "/assets/images/games/";

/// Navigation
/// use this navigation to redirects to a new url,
Expand Down

0 comments on commit 54c348c

Please sign in to comment.