diff --git a/android/app/src/main/java/com/robosats/WebAppInterface.kt b/android/app/src/main/java/com/robosats/WebAppInterface.kt index 20c49100..a30a820c 100644 --- a/android/app/src/main/java/com/robosats/WebAppInterface.kt +++ b/android/app/src/main/java/com/robosats/WebAppInterface.kt @@ -108,31 +108,17 @@ class WebAppInterface(private val context: MainActivity, private val webView: We @JavascriptInterface fun copyToClipboard(message: String) { - // Validate input - if (!isValidInput(message, 10000)) { // Allow longer text for clipboard - Log.e(TAG, "Invalid input for copyToClipboard") - Toast.makeText(context, "Invalid content for clipboard", Toast.LENGTH_SHORT).show() - return - } - try { - // Limit clipboard content size for security - val truncatedMessage = if (message.length > 10000) { - message.substring(0, 10000) + "... (content truncated for security)" - } else { - message - } - // Copy to clipboard val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager - val clip = android.content.ClipData.newPlainText("RoboSats Data", truncatedMessage) + val clip = android.content.ClipData.newPlainText("RoboSats Data", message) clipboard.setPrimaryClip(clip) // Show a toast notification Toast.makeText(context, "Copied to clipboard", Toast.LENGTH_SHORT).show() // Log the action (don't log the content for privacy) - Log.d(TAG, "Text copied to clipboard (${truncatedMessage.length} chars)") + Log.d(TAG, "Text copied to clipboard") } catch (e: Exception) { Log.e(TAG, "Error copying to clipboard", e) Toast.makeText(context, "Failed to copy to clipboard", Toast.LENGTH_SHORT).show() diff --git a/frontend/src/basic/RobotPage/RobotProfile.tsx b/frontend/src/basic/RobotPage/RobotProfile.tsx index 60e03377..1211b7b5 100644 --- a/frontend/src/basic/RobotPage/RobotProfile.tsx +++ b/frontend/src/basic/RobotPage/RobotProfile.tsx @@ -264,17 +264,15 @@ const RobotProfile = ({ {t('Robot Garage')} - {client !== 'mobile' && ( - - )} +