script.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. // i18n translations
  2. const i18n = {
  3. en: {
  4. 'nav.features': 'Features',
  5. 'nav.scenarios': 'Use Cases',
  6. 'nav.comparison': 'Why Tappo',
  7. 'nav.pricing': 'Pricing',
  8. 'nav.download': 'Free Download',
  9. 'hero.badge': 'Zero Barrier • Data Security • China Localized',
  10. 'hero.title': 'With the right tools,',
  11. 'hero.titleHighlight': 'simplicity tames complexity',
  12. 'hero.desc': 'Tappo is an intelligent workflow automation software for SMBs. Build automation visually with drag-and-drop and AI assistance — no coding required.',
  13. 'hero.cta': 'Get Started',
  14. 'hero.demo': 'Watch Demo',
  15. 'hero.stat1': 'Local Execution',
  16. 'hero.stat2': 'Data to Cloud',
  17. 'hero.stat3': 'Workflows',
  18. 'workflow.trigger': 'Schedule Trigger',
  19. 'workflow.browser': 'Open Browser',
  20. 'workflow.extract': 'Extract Data',
  21. 'workflow.sync': 'Sync to Feishu',
  22. 'highlights.title': 'Why Choose',
  23. 'highlights.subtitle': 'Three core advantages that make automation accessible',
  24. 'highlights.feature1.title': 'Zero Barrier',
  25. 'highlights.feature1.desc': 'No coding required. Describe your needs in natural language, AI generates workflows. Rich templates, one-click install — no Docker needed.',
  26. 'highlights.feature2.title': 'Data Security',
  27. 'highlights.feature2.desc': 'All data stored locally. Your credentials never leave your machine. Offline capable, fully secure and under your control.',
  28. 'highlights.feature3.title': 'China Localized',
  29. 'highlights.feature3.desc': 'Deep integration with Feishu, DingTalk, WeCom, and WeChat. Local support team with faster response times.',
  30. 'scenarios.title': 'Say Goodbye to',
  31. 'scenarios.subtitle': 'Tappo solves these pain points',
  32. 'scenarios.pain': 'Pain:',
  33. 'scenarios.solution': 'Solution:',
  34. 'scenarios.case1.title': 'Data Collection',
  35. 'scenarios.case1.pain': 'Manual data scraping from multiple platforms is time-consuming and error-prone.',
  36. 'scenarios.case1.solution': 'Automated browser operations, scheduled scraping and data organization.',
  37. 'scenarios.case2.title': 'Cross-System Sync',
  38. 'scenarios.case2.pain': 'Data scattered across systems, manual copy-paste required.',
  39. 'scenarios.case2.solution': 'Workflows connect multiple systems, automatic data synchronization.',
  40. 'scenarios.case3.title': 'Report Generation',
  41. 'scenarios.case3.pain': 'Daily/weekly/monthly reports created repeatedly, wasting time.',
  42. 'scenarios.case3.solution': 'Auto-collect data, generate beautiful charts, scheduled delivery.',
  43. 'features.title': 'Powerful Features',
  44. 'features.f1.title': 'Visual Workflow Editor',
  45. 'features.f1.desc': 'WYSIWYG drag-and-drop interface to build complex business logic without writing code.',
  46. 'features.f2.title': 'AI-Powered Generation',
  47. 'features.f2.desc': 'Tell AI what you want, it builds complete workflow scripts. True natural language programming.',
  48. 'features.f3.title': 'Browser Automation',
  49. 'features.f3.desc': 'Operate browsers like a human — auto click, input, extract web data. Supports complex interactions.',
  50. 'features.f4.title': 'Scheduled Tasks',
  51. 'features.f4.desc': 'Flexible scheduling for daily reports, weekly summaries, and periodic data sync tasks.',
  52. 'features.f5.title': 'Template Marketplace',
  53. 'features.f5.desc': 'Rich pre-built templates covering common scenarios. One-click import, instant productivity.',
  54. 'features.f6.title': 'Charts & Reports',
  55. 'features.f6.desc': 'Built-in chart generation module. Transform collected data into visual reports with multiple chart types.',
  56. 'comparison.title': 'Compared to Traditional Solutions',
  57. 'comparison.dimension': 'Dimension',
  58. 'comparison.traditional': 'Traditional',
  59. 'comparison.row1.dim': 'Installation',
  60. 'comparison.row1.trad': 'Docker deployment, technical skills required',
  61. 'comparison.row1.tappo': 'One-click installer',
  62. 'comparison.row2.dim': 'Learning Curve',
  63. 'comparison.row2.trad': 'Programming/scripting knowledge needed',
  64. 'comparison.row2.tappo': 'Natural language workflow generation',
  65. 'comparison.row3.dim': 'Localization',
  66. 'comparison.row3.trad': 'International products, poor local fit',
  67. 'comparison.row3.tappo': 'Deep China ecosystem integration',
  68. 'comparison.row4.dim': 'Data Security',
  69. 'comparison.row4.trad': 'Depends on cloud or complex deployment',
  70. 'comparison.row4.tappo': '100% local data storage',
  71. 'comparison.row5.dim': 'Support',
  72. 'comparison.row5.trad': 'English community-based',
  73. 'comparison.row5.tappo': 'Local support team',
  74. 'arch.title': 'Cloud Design.',
  75. 'arch.titleHighlight': 'Local Power.',
  76. 'arch.desc': 'Tappo combines the convenience of cloud-based workflow design with the security of local execution.',
  77. 'arch.point1': 'Design workflows anywhere, anytime',
  78. 'arch.point2': 'Local execution with full system access',
  79. 'arch.point3': 'Credentials never leave your machine',
  80. 'arch.point4': 'Offline capable',
  81. 'arch.point5': 'Optional: Cloud remote management',
  82. 'arch.cloud': 'Cloud (Optional)',
  83. 'arch.cloudItem1': 'Workflow Designer',
  84. 'arch.cloudItem2': 'Remote Dashboard',
  85. 'arch.local': 'Local',
  86. 'arch.localItem1': 'Workflow Engine',
  87. 'arch.localItem2': 'Browser / System',
  88. 'arch.localItem3': 'Your Data (100% Local)',
  89. 'pricing.title': 'Flexible',
  90. 'pricing.titleHighlight': 'Pricing',
  91. 'pricing.subtitle': 'Subscription + usage-based plans for different needs',
  92. 'pricing.perMonth': '/month',
  93. 'pricing.free.title': 'Free',
  94. 'pricing.free.price': '$0',
  95. 'pricing.free.f1': 'Core workflow features',
  96. 'pricing.free.f2': 'Local data storage',
  97. 'pricing.free.f3': 'AI workflow generation (limited)',
  98. 'pricing.free.f4': 'Community support',
  99. 'pricing.free.cta': 'Free Download',
  100. 'pricing.enterprise.badge': 'Recommended',
  101. 'pricing.enterprise.title': 'Enterprise',
  102. 'pricing.enterprise.price': 'Contact Us',
  103. 'pricing.enterprise.f1': 'All Free features included',
  104. 'pricing.enterprise.f2': 'AI workflow generation (higher quota)',
  105. 'pricing.enterprise.f3': 'Dedicated support',
  106. 'pricing.enterprise.f4': 'Script development assistance',
  107. 'pricing.enterprise.cta': 'Contact Sales',
  108. 'cta.title': 'Start Your Automation Journey',
  109. 'cta.desc': 'Join the Tappo community. Automate tedious work, unleash your creativity.',
  110. 'cta.btn': 'Download Tappo Free',
  111. 'cta.platforms': 'Windows 10/11 • macOS',
  112. 'footer.slogan': 'With the right tools, simplicity tames complexity.<br>Intelligent workflow automation for SMBs.',
  113. 'footer.product': 'Product',
  114. 'footer.features': 'Features',
  115. 'footer.pricing': 'Pricing',
  116. 'footer.docs': 'Documentation',
  117. 'footer.changelog': 'Changelog',
  118. 'footer.resources': 'Resources',
  119. 'footer.quickstart': 'Quick Start',
  120. 'footer.templates': 'Templates',
  121. 'footer.api': 'API Docs',
  122. 'footer.community': 'Community',
  123. 'footer.contact': 'Contact'
  124. },
  125. zh: {
  126. 'nav.features': '核心功能',
  127. 'nav.scenarios': '应用场景',
  128. 'nav.comparison': '产品优势',
  129. 'nav.pricing': '定价',
  130. 'nav.download': '免费下载',
  131. 'hero.badge': '零门槛 • 数据安全 • 中国本地化',
  132. 'hero.title': '善假于物',
  133. 'hero.titleHighlight': '以简驭繁',
  134. 'hero.desc': 'Tappo 是一款面向中小企业的智能工作流自动化软件,通过可视化拖拽与 AI 辅助,让非技术人员也能轻松实现业务自动化。',
  135. 'hero.cta': '立即开始使用',
  136. 'hero.demo': '观看演示',
  137. 'hero.stat1': '本地执行',
  138. 'hero.stat2': '数据上传云端',
  139. 'hero.stat3': '工作流数量',
  140. 'workflow.trigger': '定时触发',
  141. 'workflow.browser': '打开浏览器',
  142. 'workflow.extract': '抓取数据',
  143. 'workflow.sync': '同步到飞书',
  144. 'highlights.title': '为什么选择',
  145. 'highlights.subtitle': '三大核心优势,让自动化触手可及',
  146. 'highlights.feature1.title': '零门槛上手',
  147. 'highlights.feature1.desc': '无需编程基础,自然语言描述需求,AI 自动生成工作流。预置海量模板,一键复用。安装包一路下一步,无需 Docker。',
  148. 'highlights.feature2.title': '数据安全',
  149. 'highlights.feature2.desc': '所有数据存储在本地,企业核心数据不外泄。支持离线运行,安全可控。你的凭证永远不会离开你的电脑。',
  150. 'highlights.feature3.title': '中国本地化',
  151. 'highlights.feature3.desc': '深度适配飞书、钉钉、企业微信及微信公众号,无缝连接国内企业生态。中国本地支持团队,响应更及时。',
  152. 'scenarios.title': '告别重复劳动',
  153. 'scenarios.subtitle': 'Tappo 帮你解决这些痛点',
  154. 'scenarios.pain': '痛点:',
  155. 'scenarios.solution': '方案:',
  156. 'scenarios.case1.title': '数据采集',
  157. 'scenarios.case1.pain': '手动从多个平台抓取数据,耗时且容易出错。',
  158. 'scenarios.case1.solution': '自动化浏览器操作,定时抓取并整理数据到飞书/钉钉。',
  159. 'scenarios.case2.title': '跨系统同步',
  160. 'scenarios.case2.pain': '数据分散在不同系统,需要人工搬运同步。',
  161. 'scenarios.case2.solution': '工作流串联多系统,实现数据自动同步,告别复制粘贴。',
  162. 'scenarios.case3.title': '报表生成',
  163. 'scenarios.case3.pain': '每日/周/月报表重复制作,浪费大量精力。',
  164. 'scenarios.case3.solution': '自动收集数据,一键生成精美图表报告,定时发送。',
  165. 'features.title': '强大功能',
  166. 'features.f1.title': '可视化工作流编辑器',
  167. 'features.f1.desc': '所见即所得,通过简单的拖拽连接构建复杂的业务逻辑,无需编写代码。',
  168. 'features.f2.title': 'AI 驱动生成',
  169. 'features.f2.desc': '告诉 AI 你想做什么,自动为你构建完整的工作流脚本,真正的自然语言编程。',
  170. 'features.f3.title': '浏览器自动化',
  171. 'features.f3.desc': '像人一样操作浏览器,自动点击、输入、提取网页数据,支持复杂交互场景。',
  172. 'features.f4.title': '定时任务调度',
  173. 'features.f4.desc': '设置灵活的定时计划,自动执行日报、周报、数据同步等周期性任务。',
  174. 'features.f5.title': '模板市场',
  175. 'features.f5.desc': '丰富的预置模板,覆盖常见业务场景,一键导入即可使用,快速上手。',
  176. 'features.f6.title': '图表与报表',
  177. 'features.f6.desc': '内置图表生成模块,将采集的数据直接转化为可视化报表,支持多种图表类型。',
  178. 'comparison.title': '对比传统方案',
  179. 'comparison.dimension': '对比维度',
  180. 'comparison.traditional': '传统方案',
  181. 'comparison.row1.dim': '安装方式',
  182. 'comparison.row1.trad': 'Docker 部署,需技术背景',
  183. 'comparison.row1.tappo': '安装包一路下一步',
  184. 'comparison.row2.dim': '上手难度',
  185. 'comparison.row2.trad': '需要编程/脚本基础',
  186. 'comparison.row2.tappo': '自然语言生成工作流',
  187. 'comparison.row3.dim': '本地化',
  188. 'comparison.row3.trad': '国际化产品,适配差',
  189. 'comparison.row3.tappo': '深度适配中国企业生态',
  190. 'comparison.row4.dim': '数据安全',
  191. 'comparison.row4.trad': '取决于云端或复杂部署',
  192. 'comparison.row4.tappo': '数据完全本地存储',
  193. 'comparison.row5.dim': '支持服务',
  194. 'comparison.row5.trad': '英文社区为主',
  195. 'comparison.row5.tappo': '中国本地支持团队',
  196. 'arch.title': '云端设计',
  197. 'arch.titleHighlight': '本地执行',
  198. 'arch.desc': 'Tappo 结合云端工作流设计器的便捷性与本地执行的安全性,两全其美。',
  199. 'arch.point1': '随时随地设计工作流',
  200. 'arch.point2': '本地执行,完全系统访问权限',
  201. 'arch.point3': '凭证永不离开你的电脑',
  202. 'arch.point4': '支持离线运行',
  203. 'arch.point5': '可选:云端远程管理',
  204. 'arch.cloud': '云端(可选)',
  205. 'arch.cloudItem1': '工作流设计器',
  206. 'arch.cloudItem2': '远程管理面板',
  207. 'arch.local': '本地',
  208. 'arch.localItem1': '工作流引擎',
  209. 'arch.localItem2': '浏览器 / 系统操作',
  210. 'arch.localItem3': '你的数据(完全本地)',
  211. 'pricing.title': '灵活的',
  212. 'pricing.titleHighlight': '定价方案',
  213. 'pricing.subtitle': '订阅制 + 按量套餐,满足不同规模需求',
  214. 'pricing.perMonth': '/月',
  215. 'pricing.free.title': '免费版',
  216. 'pricing.free.price': '¥0',
  217. 'pricing.free.f1': '核心工作流功能',
  218. 'pricing.free.f2': '本地数据存储',
  219. 'pricing.free.f3': 'AI 生成工作流(有限次数)',
  220. 'pricing.free.f4': '社区支持',
  221. 'pricing.free.cta': '免费下载',
  222. 'pricing.enterprise.badge': '推荐',
  223. 'pricing.enterprise.title': '企业版',
  224. 'pricing.enterprise.price': '联系我们',
  225. 'pricing.enterprise.f1': '包含所有免费版功能',
  226. 'pricing.enterprise.f2': 'AI 生成工作流(更高额度)',
  227. 'pricing.enterprise.f3': '专属技术支持',
  228. 'pricing.enterprise.f4': '脚本开发协助',
  229. 'pricing.enterprise.cta': '咨询企业版',
  230. 'cta.title': '立即开启自动化办公新体验',
  231. 'cta.desc': '加入 Tappo 社区,让繁琐的工作自动化,释放你的创造力。',
  232. 'cta.btn': '免费下载 Tappo',
  233. 'cta.platforms': '支持 Windows 10/11 • macOS',
  234. 'footer.slogan': '善假于物,以简驭繁。<br>中小企业智能工作流自动化专家。',
  235. 'footer.product': '产品',
  236. 'footer.features': '核心功能',
  237. 'footer.pricing': '定价',
  238. 'footer.docs': '使用文档',
  239. 'footer.changelog': '更新日志',
  240. 'footer.resources': '资源',
  241. 'footer.quickstart': '快速入门',
  242. 'footer.templates': '模板市场',
  243. 'footer.api': 'API 文档',
  244. 'footer.community': '社区论坛',
  245. 'footer.contact': '联系我们'
  246. }
  247. };
  248. // Current language
  249. let currentLang = localStorage.getItem('tappo-lang') || 'en';
  250. // Apply translations
  251. function applyTranslations(lang) {
  252. const translations = i18n[lang];
  253. document.querySelectorAll('[data-i18n]').forEach(el => {
  254. const key = el.getAttribute('data-i18n');
  255. if (translations[key]) {
  256. if (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') {
  257. el.placeholder = translations[key];
  258. } else {
  259. el.innerHTML = translations[key];
  260. }
  261. }
  262. });
  263. // Update html lang attribute
  264. document.documentElement.lang = lang === 'zh' ? 'zh-CN' : 'en';
  265. // Update lang switch button text
  266. const langText = document.querySelector('.lang-text');
  267. if (langText) {
  268. langText.textContent = lang === 'en' ? '中文' : 'EN';
  269. }
  270. // Update page title
  271. document.title = lang === 'zh'
  272. ? 'Tappo - 善假于物,以简驭繁 | 智能工作流自动化'
  273. : 'Tappo - Intelligent Workflow Automation';
  274. }
  275. // Toggle language
  276. function toggleLang() {
  277. currentLang = currentLang === 'en' ? 'zh' : 'en';
  278. localStorage.setItem('tappo-lang', currentLang);
  279. applyTranslations(currentLang);
  280. }
  281. // Initialize on page load
  282. document.addEventListener('DOMContentLoaded', () => {
  283. applyTranslations(currentLang);
  284. });
  285. // Smooth scroll for anchor links
  286. document.querySelectorAll('a[href^="#"]').forEach(anchor => {
  287. anchor.addEventListener('click', function (e) {
  288. e.preventDefault();
  289. const target = document.querySelector(this.getAttribute('href'));
  290. if (target) {
  291. target.scrollIntoView({ behavior: 'smooth', block: 'start' });
  292. }
  293. });
  294. });
  295. // Navbar background on scroll
  296. const nav = document.querySelector('.nav');
  297. window.addEventListener('scroll', () => {
  298. if (window.scrollY > 50) {
  299. nav.classList.add('scrolled');
  300. } else {
  301. nav.classList.remove('scrolled');
  302. }
  303. });
  304. // Animate elements on scroll
  305. const observerOptions = {
  306. threshold: 0.1,
  307. rootMargin: '0px 0px -50px 0px'
  308. };
  309. const observer = new IntersectionObserver((entries) => {
  310. entries.forEach(entry => {
  311. if (entry.isIntersecting) {
  312. entry.target.style.opacity = '1';
  313. entry.target.style.transform = 'translateY(0)';
  314. }
  315. });
  316. }, observerOptions);
  317. // Apply animation to cards and steps
  318. document.querySelectorAll('.feature-card, .step, .pricing-card').forEach(el => {
  319. el.style.opacity = '0';
  320. el.style.transform = 'translateY(20px)';
  321. el.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
  322. observer.observe(el);
  323. });