fix(theseus): Fixed multiple bugs (#1304)

* fix(theseus): Resolve log tab freezing entire app (#1127, #1237)
Switched to `vue-typed-virtual-list` due to freezing issues in WebKit caused by `vue-virtual-scroller`, which were difficult to resolve with the previous library.

* fix(theseus): Double opening of Socials Share link (#1136, #1074)

* fix(theseus): Proper symlinks resolution (#1236)
Ensures correct symlink resolution for specific mods, the mods directory, and the entire profile directory.

* fix(theseus): Correctly recognize NeoForge mods (#1215)

* fix(theseus): Corrected `Environments` and `Loaders` filters (#899)

* fix(theseus): Remove `_JAVA_OPTIONS` when testing JRE (#1171)

* fix(theseus): Fixed opening files using `show_in_folder`
Previously, opening a mod would display the contents of the JAR file instead of its location.

* fix(theseus): Hide `.DS_Store` files (#1274, #1002, #1174)

* fix(theseus): Corrected tooltip color

* fix(theseus): Fixed white mode issues (#1144, #1010)

* fix: Corrected `Slider` min and max value handling (#1008)

* fix: Fixed rebase problems

* fix: Fixed `:deep` usage warning

* chore: Updated eslint plugins to fix conflicts with Prettier
This commit is contained in:
Norbiros
2024-07-20 02:20:12 +02:00
committed by GitHub
parent f1713647cf
commit 797e1f1f21
18 changed files with 441 additions and 426 deletions

View File

@@ -82,7 +82,7 @@ pub async fn should_disable_mouseover() -> bool {
}
#[tauri::command]
pub fn show_in_folder(path: PathBuf) -> Result<()> {
pub fn show_in_folder(mut path: PathBuf) -> Result<()> {
{
#[cfg(target_os = "windows")]
{
@@ -101,19 +101,26 @@ pub fn show_in_folder(path: PathBuf) -> Result<()> {
{
use std::fs::metadata;
if path.to_string_lossy().to_string().contains(',') {
// see https://gitlab.freedesktop.org/dbus/dbus/-/issues/76
let new_path = match metadata(&path)?.is_dir() {
true => path,
false => {
let mut path2 = path.clone();
path2.pop();
path2
}
};
Command::new("xdg-open").arg(&new_path).spawn()?;
} else {
let path_string = path.to_string_lossy().to_string();
if metadata(&path)?.is_dir() {
Command::new("xdg-open").arg(&path).spawn()?;
} else if path_string.contains(',') {
// see https://gitlab.freedesktop.org/dbus/dbus/-/issues/76
path.pop();
Command::new("xdg-open").arg(&path).spawn()?;
} else {
Command::new("dbus-send")
.args([
"--session",
"--dest=org.freedesktop.FileManager1",
"--type=method_call",
"/org/freedesktop/FileManager1",
"org.freedesktop.FileManager1.ShowItems",
format!("array:string:file://{}", path_string).as_str(),
"string:\"\"",
])
.spawn()?;
}
}