fix: migrate log upload from 0x0.st to dpaste.org

0x0.st disabled uploads. Switch to dpaste.org with 15-day expiry.
Use form POST instead of multipart, update all 5 locale files.

cc
This commit is contained in:
vicrodh committed 2026-03-31 16:43:28 -06:00
1 parent a87e35d167
commit 527d63ca2c
6 files changed
+12 -15

No files matched your search

+7 -10
View File
@@ -73,21 +73,18 @@ pub fn get_backend_logs() -> Vec<String> {
#[tauri::command]
pub async fn upload_logs_to_paste(content: String) -> Result<String, String> {
let form = reqwest::multipart::Form::new().part(
"file",
reqwest::multipart::Part::text(content)
.file_name("qbz-logs.txt")
.mime_str("text/plain")
.map_err(|e| format!("Failed to create multipart part: {}", e))?,
);
let client = reqwest::Client::builder()
.user_agent("QBZ/1.0")
.build()
.map_err(|e| format!("Failed to create HTTP client: {}", e))?;
let response = client
.post("https://0x0.st")
.multipart(form)
.post("https://dpaste.org/api/")
.form(&[
("content", content.as_str()),
("format", "url"),
("expires", "1296000"), // 15 days
])
.send()
.await
.map_err(|e| format!("Failed to upload logs: {}", e))?;
+1 -1
View File
@@ -1181,7 +1181,7 @@
"logsTitle": "Anwendungs-Logs",
"tabTerminal": "Terminal",
"tabConsole": "Konsole",
"uploadLogs": "Zu 0x0.st hochladen",
"uploadLogs": "Zu dpaste.org hochladen",
"uploadTab": "{tab} hochladen",
"uploadSuccess": "Log-URL in Zwischenablage kopiert",
"uploadError": "Fehler beim Hochladen der Logs",
+1 -1
View File
@@ -1253,7 +1253,7 @@
"logsTitle": "Application Logs",
"tabTerminal": "Terminal",
"tabConsole": "Console",
"uploadLogs": "Upload to 0x0.st",
"uploadLogs": "Upload to dpaste.org",
"uploadTab": "Upload {tab}",
"uploadSuccess": "Log URL copied to clipboard",
"uploadError": "Failed to upload logs",
+1 -1
View File
@@ -1253,7 +1253,7 @@
"logsTitle": "Logs de la Aplicación",
"tabTerminal": "Terminal",
"tabConsole": "Consola",
"uploadLogs": "Subir a 0x0.st",
"uploadLogs": "Subir a dpaste.org",
"uploadTab": "Subir {tab}",
"uploadSuccess": "URL del log copiada al portapapeles",
"uploadError": "Error al subir los logs",
+1 -1
View File
@@ -1206,7 +1206,7 @@
"logsTitle": "Logs de l'application",
"tabTerminal": "Terminal",
"tabConsole": "Console",
"uploadLogs": "Téléverser sur 0x0.st",
"uploadLogs": "Téléverser sur dpaste.org",
"uploadTab": "Téléverser {tab}",
"uploadSuccess": "URL du log copiée dans le presse-papiers",
"uploadError": "Échec du téléversement des logs",
+1 -1
View File
@@ -1246,7 +1246,7 @@
"logsTitle": "Logs do Aplicativo",
"tabTerminal": "Terminal",
"tabConsole": "Console",
"uploadLogs": "Enviar para 0x0.st",
"uploadLogs": "Enviar para dpaste.org",
"uploadTab": "Enviar {tab}",
"uploadSuccess": "URL do log copiada para a área de transferência",
"uploadError": "Falha ao enviar logs",