Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@
},
"resolutions": {
"glob": "^10.5.0",
"js-yaml": "^4.1.1",
"tmp": "^0.2.4"
"js-yaml": "^4.3.0",
"tmp": "^0.2.4",
"rollup": "^4.59.0",
"ajv": "^6.14.0",
"flatted": "^3.4.2",
"yaml": "^2.8.3",
"postcss": "^8.5.10"
},
"dependencies": {
"@tauri-apps/api": "^2.10.1",
Expand Down Expand Up @@ -75,7 +80,7 @@
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"@vitejs/plugin-vue": "^6.0.4",
"adm-zip": "^0.5.16",
"adm-zip": "^0.6.0",
"cross-env": "^7.0.3",
"czg": "^1.12.0",
"dpdm": "^3.14.0",
Expand All @@ -93,10 +98,10 @@
"node-fetch": "^3.3.2",
"prettier": "^3.8.1",
"tailwindcss": "^4.1.18",
"tar": "^7.5.7",
"tar": "^7.5.18",
"typescript": "^5.8.3",
"typescript-eslint": "^8.54.0",
"vite": "^7.3.1",
"vite": "^7.3.5",
"vue-eslint-parser": "^10.2.0",
"vue-tsc": "^3.2.4"
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ if (!getOpenlistArchMap[platformArch]) {
}

// Rclone version management
let rcloneVersion = 'v1.70.3'
let rcloneVersion = 'v1.72.1'
const rcloneVersionUrl = 'https://github.com/rclone/rclone/releases/latest/download/version.txt'

async function getLatestRcloneVersion() {
try {
const response = await fetch(rcloneVersionUrl, getFetchOptions())
rcloneVersion = (await response.text()).trim().replace('rclone ', '') || '1.70.1'
rcloneVersion = (await response.text()).trim().replace('rclone ', '') || 'v1.72.1'
console.log(`Latest rclone version: ${rcloneVersion}`)
} catch (error) {
console.log('Error fetching latest rclone version:', error.message)
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/src/cmd/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ pub async fn get_binary_version(

let output = cmd
.output()
.map_err(|e| format!("Failed to spawn {:?}: {}", &binary_path, e))?;
.map_err(|e| format!("Failed to spawn {:?}: {}", binary_path, e))?;

if !output.status.success() {
return Err(format!(
"{:?} exited with status: {}",
&binary_path, output.status
binary_path, output.status
));
}

Expand Down
25 changes: 24 additions & 1 deletion src-tauri/src/cmd/rclone_mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ pub fn get_mount_process_id(remote_name: &str) -> String {
format!("rclone_mount_{remote_name}_process")
}

#[cfg(target_os = "macos")]
fn get_libfuse_path() -> Option<String> {
[
"/opt/local/lib/libfuse.2.dylib",
"/opt/homebrew/lib/libfuse.2.dylib",
"/opt/homebrew/lib/libfuse-t.dylib",
]
.iter()
.find(|path| Path::new(path).is_file())
.map(|path| (*path).to_string())
}

#[cfg(not(target_os = "macos"))]
fn get_libfuse_path() -> Option<String> {
None
}

#[tauri::command]
pub async fn rclone_list_config(
remote_type: String,
Expand Down Expand Up @@ -188,6 +205,12 @@ pub async fn mount_remote(

let log_file = log_dir.join("process_rclone.log");

let env_vars = if std::env::var_os("CGOFUSE_LIBFUSE_PATH").is_none() {
get_libfuse_path().map(|path| HashMap::from([(String::from("CGOFUSE_LIBFUSE_PATH"), path)]))
} else {
None
};

let process_config = ProcessConfig {
id: config.id.clone(),
name: config.name.clone(),
Expand All @@ -197,7 +220,7 @@ pub async fn mount_remote(
working_dir: binary_path
.parent()
.map(|p| p.to_string_lossy().into_owned()),
env_vars: None,
env_vars,
};

if PROCESS_MANAGER.is_registered(&config.id) {
Expand Down
1 change: 0 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"resetAdminPassword": "Reset admin password",
"resetAdminPasswordFailed": "Failed to reset admin password. Please check the logs for more details.",
"resetAdminPasswordSuccess": "Admin password reset successfully! The new password has been copied to the clipboard.",
"restart": "Restart",
"startOpenListCore": "Start",
"stopOpenListCore": "Stop",
"title": "Core Management"
Expand Down
1 change: 0 additions & 1 deletion src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"resetAdminPassword": "重置管理员密码",
"resetAdminPasswordFailed": "重置管理员密码失败。请查看日志了解详细信息。",
"resetAdminPasswordSuccess": "管理员密码重置成功!新密码已复制到剪贴板。",
"restart": "重启",
"startOpenListCore": "启动",
"stopOpenListCore": "停止",
"title": "核心管理"
Expand Down
5 changes: 4 additions & 1 deletion src/stores/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export const useAppStore = defineStore('app', () => {
const loadSettings = () => {
return tryCatch(async () => {
const res = await TauriAPI.settings.load()
if (res) settings.value = res
if (res) {
res.rclone.mount_config ||= {}
settings.value = res
}
applyTheme(settings.value.app.theme || 'light')
}, 'Failed to load settings')
}
Expand Down
Loading