generate thumbnails

This commit is contained in:
2025-05-26 21:36:40 -04:00
parent c40b6f0fa3
commit 1051799fb3
9 changed files with 53 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
use dioxus::prelude::*;
use crate::rpc::aoba::MediaModel;
use crate::{HOST, rpc::aoba::MediaModel};
#[derive(PartialEq, Clone, Props)]
pub struct MediaItemProps {
@@ -14,9 +14,9 @@ pub fn MediaItem(props: MediaItemProps) -> Element {
let id = props.item.media_id.unwrap().value;
#[cfg(debug_assertions)]
let src = format!("http://localhost:5164/m/{id}");
let src = format!("{HOST}/m/thumb/{id}");
#[cfg(not(debug_assertions))]
let src = format!("https://aoba.app/m/{id}");
let src = format!("https://aoba.app/m/thumb/{id}");
// let url = "https://aoba.app/i/{}";
rsx! {
div{

View File

@@ -11,9 +11,9 @@ use dioxus::prelude::*;
use route::Route;
#[cfg(debug_assertions)]
pub const HOST: &'static str = "http://localhost:5164";
pub const HOST: &'static str = "http://localhost:8080";
#[cfg(debug_assertions)]
pub const RPC_HOST: &'static str = "http://localhost:5164";
pub const RPC_HOST: &'static str = "http://localhost:8080";
#[cfg(not(debug_assertions))]
pub const RPC_HOST: &'static str = "https://grpc.aoba.app:8443";
#[cfg(not(debug_assertions))]