feat: polish theme tooling, diagnostics and launcher workflows
Expand the theme editor with multi-select, snapping, context menus, draft recovery and export validation; add theme backups and trust prompts. Add in-app diagnostics and rotating log bundle viewing, hardware-accelerated theme video playback on macOS, and refresh the settings, setup wizard and theme gallery layouts.
This commit is contained in:
1 parent
87202de656
commit
c02b26e8ae
41 files changed
+5574
-865
No files matched your search
+39
-19
@@ -13,25 +13,27 @@ pub mod macos;
|
||||
pub mod osudb;
|
||||
pub mod presence;
|
||||
pub mod state;
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
pub mod theme_server;
|
||||
pub mod utils;
|
||||
use crate::{
|
||||
commands::{
|
||||
check_for_corruption, config_all, config_clear, config_delete, config_exists, config_get,
|
||||
config_set, download_and_extract_theme, download_ezpp_launcher_update,
|
||||
download_ezpp_launcher_update_files, encrypt_string, exit, export_theme, extract_theme,
|
||||
find_osu_installation, get_beatmapsets_count, get_ezpp_launcher_update_files, get_hwid,
|
||||
get_launcher_version, get_osu_release_stream, get_osu_skin, get_osu_version, get_platform,
|
||||
get_skins_count, has_net8, has_osuwinello, has_wmctrl, install_ezpp_launcher_update,
|
||||
backup_theme_folder, check_for_corruption, config_all, config_clear, config_delete,
|
||||
config_exists, config_get, config_set, download_and_extract_theme,
|
||||
download_ezpp_launcher_update, download_ezpp_launcher_update_files, encrypt_string, exit,
|
||||
export_theme, extract_theme, file_size, find_osu_installation, get_beatmapsets_count,
|
||||
get_ezpp_launcher_update_files, get_hwid, get_launcher_version, get_osu_release_stream,
|
||||
get_osu_skin, get_osu_version, get_platform, get_skins_count, has_net8, has_osuwinello,
|
||||
has_wmctrl, install_ezpp_launcher_update, installation_diagnostics,
|
||||
is_open_tablet_driver_path_valid, is_open_tablet_driver_running, is_osu_running,
|
||||
log_frontend, open_logs_folder, open_theme_editor, open_theme_folder, open_url_in_browser,
|
||||
opened_urls, pick_osu_installation, presence_connect, presence_disconnect,
|
||||
presence_is_connected, presence_update_button, presence_update_status,
|
||||
presence_update_user, read_theme_info, replace_ui_files, resolve_osu_folder,
|
||||
run_open_tablet_driver, run_osu, run_osu_updater, save_theme_project, set_logging_enabled,
|
||||
set_osu_config_values, set_osu_user_config_values, stop_open_tablet_driver,
|
||||
theme_asset_base, theme_editor_context, theme_preview_url, valid_osu_folder,
|
||||
list_theme_backups, log_frontend, open_logs_folder, open_theme_editor, open_theme_folder,
|
||||
open_url_in_browser, opened_urls, optimize_theme_media, pick_osu_installation,
|
||||
presence_connect, presence_disconnect, presence_is_connected, presence_update_button,
|
||||
presence_update_status, presence_update_user, read_theme_info, replace_ui_files,
|
||||
resolve_osu_folder, restore_theme_backup, run_open_tablet_driver, run_osu, run_osu_updater,
|
||||
save_theme_project, set_logging_enabled, set_osu_config_values, set_osu_user_config_values,
|
||||
stop_open_tablet_driver, theme_asset_base, theme_editor_context, theme_preview_url,
|
||||
valid_osu_folder,
|
||||
},
|
||||
state::AppState,
|
||||
};
|
||||
@@ -111,10 +113,14 @@ pub fn run() {
|
||||
editor_theme_folder: Mutex::new(None),
|
||||
});
|
||||
|
||||
// WebKitGTK cannot play theme media through the custom asset
|
||||
// protocol, so Linux gets a real loopback HTTP server instead.
|
||||
#[cfg(target_os = "linux")]
|
||||
match commands::theme_root().and_then(theme_server::start) {
|
||||
// WebKit's custom-protocol media pipeline is unreliable (and
|
||||
// loads large WebMs into memory), so Linux and macOS use a real
|
||||
// loopback HTTP server with byte-range support instead.
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
match commands::theme_root().and_then(|root| {
|
||||
let media = theme_server::media_root()?;
|
||||
theme_server::start(root, media)
|
||||
}) {
|
||||
Ok(_) => {}
|
||||
Err(error) => log::warn!(
|
||||
target: "launcher",
|
||||
@@ -127,6 +133,9 @@ pub fn run() {
|
||||
if let Err(error) = macos::round_window(&window, 12.0) {
|
||||
log::warn!(target: "launcher", "Could not round the launcher window: {error}");
|
||||
}
|
||||
if let Err(error) = macos::allow_media_autoplay(&window) {
|
||||
log::warn!(target: "launcher", "{error}");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@@ -142,6 +151,7 @@ pub fn run() {
|
||||
get_skins_count,
|
||||
get_osu_version,
|
||||
get_osu_release_stream,
|
||||
installation_diagnostics,
|
||||
set_osu_config_values,
|
||||
set_osu_user_config_values,
|
||||
run_osu_updater,
|
||||
@@ -155,6 +165,7 @@ pub fn run() {
|
||||
get_launcher_version,
|
||||
exit,
|
||||
get_platform,
|
||||
file_size,
|
||||
check_for_corruption,
|
||||
presence_connect,
|
||||
presence_disconnect,
|
||||
@@ -169,6 +180,9 @@ pub fn run() {
|
||||
download_ezpp_launcher_update,
|
||||
install_ezpp_launcher_update,
|
||||
read_theme_info,
|
||||
backup_theme_folder,
|
||||
list_theme_backups,
|
||||
restore_theme_backup,
|
||||
extract_theme,
|
||||
download_and_extract_theme,
|
||||
save_theme_project,
|
||||
@@ -178,6 +192,7 @@ pub fn run() {
|
||||
theme_editor_context,
|
||||
theme_asset_base,
|
||||
theme_preview_url,
|
||||
optimize_theme_media,
|
||||
config_get,
|
||||
config_set,
|
||||
config_exists,
|
||||
@@ -190,7 +205,9 @@ pub fn run() {
|
||||
is_open_tablet_driver_path_valid,
|
||||
log_frontend,
|
||||
set_logging_enabled,
|
||||
open_logs_folder
|
||||
open_logs_folder,
|
||||
logging::list_log_bundles,
|
||||
logging::read_log_bundle
|
||||
])
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
@@ -208,6 +225,9 @@ pub fn run() {
|
||||
if let Err(error) = macos::round_window(&window, 12.0) {
|
||||
log::warn!(target: "launcher", "Could not round the launcher window: {error}");
|
||||
}
|
||||
if let Err(error) = macos::allow_media_autoplay(&window) {
|
||||
log::warn!(target: "launcher", "{error}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user