From cc4666371b6c206eb358f252898bd70181246c0c Mon Sep 17 00:00:00 2001 From: Javid Date: Thu, 30 Jul 2026 16:20:39 +0200 Subject: [PATCH 1/6] refine product narrative and landing page UX --- app/DeveloperCodeSamples.tsx | 49 ++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/app/DeveloperCodeSamples.tsx b/app/DeveloperCodeSamples.tsx index b9ede0b..8ef7a0e 100644 --- a/app/DeveloperCodeSamples.tsx +++ b/app/DeveloperCodeSamples.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useState, type KeyboardEvent } from "react"; import { Check, Copy } from "lucide-react"; type Language = "typescript" | "python" | "java"; @@ -126,18 +126,45 @@ export default function DeveloperCodeSamples() { const sample = samples[language]; const copyCode = async () => { - await navigator.clipboard.writeText(source[language]); - setCopied(true); - window.setTimeout(() => setCopied(false), 1600); + try { + await navigator.clipboard.writeText(source[language]); + setCopied(true); + window.setTimeout(() => setCopied(false), 1600); + } catch { + setCopied(false); + } + }; + + const selectWithKeyboard = (event: KeyboardEvent, key: Language) => { + const keys = Object.keys(samples) as Language[]; + const index = keys.indexOf(key); + if (event.key === "ArrowRight" || event.key === "ArrowLeft") { + event.preventDefault(); + const direction = event.key === "ArrowRight" ? 1 : -1; + const next = keys[(index + direction + keys.length) % keys.length]; + setLanguage(next); + document.getElementById(`code-tab-${next}`)?.focus(); + } }; return (
+
پیش‌نمایش طراحی SDK
{(Object.keys(samples) as Language[]).map((key) => ( - ))} @@ -150,11 +177,19 @@ export default function DeveloperCodeSamples() { {copied ? "Copied" : "Copy"}
-
{sample.code}
+
+        {sample.code}
+      
201 CREATED {"{ "}"id": "dev_01J9X2", "status": "online"{" }"} - SDK DESIGN PREVIEW + {copied ? "کد کپی شد" : "SDK DESIGN PREVIEW"}
); From 645cc967fb8b9038c422b5af420f2eda4835b4e0 Mon Sep 17 00:00:00 2001 From: Javid Date: Thu, 30 Jul 2026 16:20:42 +0200 Subject: [PATCH 2/6] update app/DeviceSupportSection.tsx --- app/DeviceSupportSection.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/DeviceSupportSection.tsx b/app/DeviceSupportSection.tsx index 885499f..ac64e2e 100644 --- a/app/DeviceSupportSection.tsx +++ b/app/DeviceSupportSection.tsx @@ -91,7 +91,12 @@ export default function DeviceSupportSection() {
-
+

+ نمونه دسته‌های دستگاه شامل ردیاب خودرو، ردیاب حیوانات، دوربین، دانگل + OBD، سنسور BLE و گیت‌وی صنعتی است. پروتکل‌ها و رابط‌ها شامل MQTT، + HTTP، TCP، UDP، LoRaWAN، CAN bus، OBD-II، ONVIF و RTSP هستند. +

+