Doll preview

This commit is contained in:
2025-12-20 22:01:26 +08:00
parent 9f41829d0e
commit a8a578ca3d
10 changed files with 938 additions and 17 deletions

View File

@@ -1,10 +1,10 @@
use crate::{
models::app_data::AppData,
remotes::dolls::{CreateDollDto, DollDto, DollsRemote, UpdateDollDto},
remotes::friends::{
FriendRemote, FriendRequestResponseDto, FriendshipResponseDto, SendFriendRequestDto,
UserBasicDto,
},
remotes::dolls::{DollsRemote, CreateDollDto, UpdateDollDto, DollDto},
services::cursor::start_cursor_tracking,
state::{init_app_data, FDOLL},
};
@@ -192,6 +192,20 @@ async fn delete_doll(id: String) -> Result<(), String> {
.map_err(|e| e.to_string())
}
#[tauri::command]
fn recolor_gif_base64(
white_color_hex: String,
black_color_hex: String,
apply_texture: bool,
) -> Result<String, String> {
services::sprite_recolor::recolor_gif_base64(
white_color_hex.as_str(),
black_color_hex.as_str(),
apply_texture,
)
.map_err(|e| e.to_string())
}
#[tauri::command]
fn quit_app() -> Result<(), String> {
let app_handle = get_app_handle();
@@ -221,6 +235,7 @@ pub fn run() {
create_doll,
update_doll,
delete_doll,
recolor_gif_base64,
quit_app
])
.setup(|app| {