🎉 创世提交
This commit is contained in:
14
src-tauri/src/utils/mod.rs
Normal file
14
src-tauri/src/utils/mod.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use crate::handlers::server::get_img_server_url;
|
||||
|
||||
pub mod search;
|
||||
|
||||
pub const UA: &str = concat!("Spark-Store/", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_user_agent() -> String {
|
||||
UA.into()
|
||||
}
|
||||
|
||||
pub fn format_icon_url(category: &str, pkgname: &str) -> String {
|
||||
format!("{}{}/{}/icon.png", get_img_server_url(), category, pkgname)
|
||||
}
|
||||
Reference in New Issue
Block a user