diff --git a/Cargo.lock b/Cargo.lock
index ac1825d2..31a9fae8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4331,7 +4331,7 @@ dependencies = [
[[package]]
name = "ore-app"
-version = "0.0.4"
+version = "0.0.5"
dependencies = [
"async-std",
"async-tungstenite",
diff --git a/Cargo.toml b/Cargo.toml
index 1e45235b..6ea6e099 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ore-app"
-version = "0.0.4"
+version = "0.0.5"
description = "Ore is a digital currency you can mine from anywhere, at home or on your phone."
edition = "2021"
license = "Apache-2.0"
@@ -108,7 +108,7 @@ solana-extra-wasm = { version = "1.17.4", git = "https://github.com/HardhatChad/
[package.metadata.bundle]
name = "Ore"
identifier = "com.ore.app"
-version = "0.0.1"
+version = "0.0.5"
resources = ["public"]
copyright = "Copyright (c) Hardhat Chad 2024. All rights reserved."
category = "Finance"
diff --git a/src/components/download.rs b/src/components/download.rs
index 3eb3b159..32991e57 100644
--- a/src/components/download.rs
+++ b/src/components/download.rs
@@ -4,7 +4,7 @@ use dioxus::prelude::*;
use crate::components::CodeBlock;
const DESKTOP_DOWNLOAD_MAC: &str =
- "https://github.com/HardhatChad/ore-app/releases/download/0.0.4/Ore-MacOS.zip";
+ "https://github.com/HardhatChad/ore-app/releases/download/0.0.5/Ore-MacOS.zip";
#[component]
pub fn Download(cx: Scope) -> Element {
diff --git a/src/components/landing.rs b/src/components/landing.rs
index 5777c7bd..e11f7fe0 100644
--- a/src/components/landing.rs
+++ b/src/components/landing.rs
@@ -11,6 +11,7 @@ use crate::{
components::{ActivityFilter, ActivityIndicator, Footer, OreIcon, OreLogoIcon},
gateway::AsyncResult,
hooks::{use_is_onboarded, use_ore_supply, use_transfers, use_treasury},
+ utils::asset_path,
Route,
};
@@ -69,10 +70,11 @@ fn Navbar(cx: Scope) -> Element {
#[component]
fn Hero(cx: Scope) -> Element {
+ let bg_img = asset_path("smoke.jpg");
render! {
div {
class: "flex flex-col w-full h-screen z-20 bg-cover bg-center",
- style: "background-image: url(/smoke.jpg)",
+ style: "background-image: url({bg_img})",
Navbar {}
div {
class: "flex flex-col gap-y-8 sm:gap-y-10 md:gap-y-12 mx-auto my-auto pb-24 px-4 sm:px-8",
diff --git a/src/main.rs b/src/main.rs
index 2e0fae07..f4bb0a17 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,6 +16,7 @@ mod hooks;
mod metrics;
mod miner;
mod route;
+mod utils;
#[cfg(feature = "web")]
mod worker;
@@ -38,11 +39,13 @@ fn main() {
#[cfg(feature = "desktop")]
fn main() {
+ use utils::asset_path;
env_logger::init();
+ let tailwind_path = asset_path("tailwind.css");
+ let custom_head = format!(r#""#, tailwind_path);
dioxus_desktop::launch_cfg(
App,
- dioxus_desktop::Config::new()
- .with_custom_head(r#""#.to_string()),
+ dioxus_desktop::Config::new().with_custom_head(custom_head),
);
}
diff --git a/src/utils.rs b/src/utils.rs
new file mode 100644
index 00000000..86e4845e
--- /dev/null
+++ b/src/utils.rs
@@ -0,0 +1,9 @@
+#[cfg(feature = "desktop")]
+pub fn asset_path(relative_path: &str) -> String {
+ format!("public/{}", relative_path)
+}
+
+#[cfg(not(feature = "desktop"))]
+pub fn asset_path(relative_path: &str) -> String {
+ relative_path.to_string()
+}