From ab1009b9bfca32cce499c7173272a918cb0c320c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CDaisyWu=E2=80=9D?= <“18682150237@163.com”> Date: Thu, 12 Sep 2024 11:34:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Google=20Home=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lan/lan_en.json | 9 ++++++++- lan/lan_keys.json | 9 ++++++++- lan/lan_zh.json | 9 ++++++++- lib/mine/mineSet/google_home/google_home_logic.dart | 7 ++++--- lib/mine/mineSet/google_home/google_home_page.dart | 9 +++------ lib/mine/mineSet/mineSet/mineSet_page.dart | 11 +++++------ 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/lan/lan_en.json b/lan/lan_en.json index 7bfa2b3c..1348acdd 100755 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -911,5 +911,12 @@ "支持的国家": "Supported countries", "支持的国家值":"United States, Canada, United Kingdom, Germany, France, Italy, Spain, Australia, New Zealand, India, Japan", "操作流程": "Operation process", - "操作流程值": "1. Open the Alexa app and search for the Skye Smart Lock skill\n2. Click Enable Skill and log in to your Skye account\n3. Say 'Alexa, discover devices' to Alexa\n4. After discovering the device, you can use the voice command to control the lock" + "操作流程值": "1. Open the Alexa app and search for the Skye Smart Lock skill\n2. Click Enable Skill and log in to your Skye account\n3. Say 'Alexa, discover devices' to Alexa\n4. After discovering the device, you can use the voice command to control the lock", + "Google Home": "Google Home", + "Action name": "Action name", + "ScienerSmart": "ScienerSmart", + "支持的语言": "Supported languages", + "英语": "English", + "Google Home操作流程的值": "1. Open the Google Home app and click the '+' in the upper left corner\n2. Click 'Set up device' and select 'Works with Google'\n3. Search for 'ScienerSmart' and log in to your Skye account\n4. After discovering the device, you can use the voice command to control the lock", + "开启": "Open" } diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 9bb0e557..bc6c69fd 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -947,5 +947,12 @@ "支持的国家":"支持的国家", "支持的国家值":"支持的国家值", "操作流程":"操作流程", - "操作流程值":"操作流程值" + "操作流程值":"操作流程值", + "Google Home":"Google Home", + "Action name":"Action name", + "ScienerSmart":"ScienerSmart", + "支持的语言":"支持的语言", + "英语":"英语", + "Google Home操作流程的值":"Google Home操作流程的值", + "开启":"开启" } diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 81fb3c14..46c339be 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -907,5 +907,12 @@ "支持的国家": "支持的国家", "支持的国家值": "美国、加拿大、英国、澳大利亚、印度、德国、法国、意大利、西班牙、日本", "操作流程": "操作流程", - "操作流程值":"1 用智能锁APP添加锁和网关\n\n2 在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Alexa \n\n3 在Alexa中添加Skill,并用智能锁APP的账号和密码进行授权。授权成功后就可以发现账号下的设备\n\n4 在Alexa app里找到锁,开启语音开锁的功能,并设置语言密码\n\n5 可以通过Alexa操作锁了" + "操作流程值":"1 用智能锁APP添加锁和网关\n\n2 在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Alexa \n\n3 在Alexa中添加Skill,并用智能锁APP的账号和密码进行授权。授权成功后就可以发现账号下的设备\n\n4 在Alexa app里找到锁,开启语音开锁的功能,并设置语言密码\n\n5 可以通过Alexa操作锁了", + "Google Home": "Google Home", + "Action name": "Action name", + "ScienerSmart": "ScienerSmart", + "支持的语言": "支持的语言", + "英语": "英语", + "Google Home操作流程的值": "1.用智能锁APP添加锁和网关\n\n2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home \n\n3.安装Google Home APP,点击左上角的“+”按钮\n\n4.在设置页面,选择“与Google协同工作”\n\n5.搜索“ScienerSmart”,并用智能锁APP的账号和密码进行授权\n\n6.在智能锁APP里设置安全码,使用Google Home开锁时提供此安全码", + "开启": "开启" } diff --git a/lib/mine/mineSet/google_home/google_home_logic.dart b/lib/mine/mineSet/google_home/google_home_logic.dart index 28618b68..79660710 100644 --- a/lib/mine/mineSet/google_home/google_home_logic.dart +++ b/lib/mine/mineSet/google_home/google_home_logic.dart @@ -1,3 +1,4 @@ +import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart'; import 'package:star_lock/mine/mineSet/google_home/google_home_state.dart'; import 'package:star_lock/network/api_repository.dart'; @@ -16,11 +17,11 @@ class GoogleHomeLogic extends BaseGetXController { state.isGoogleHome.value = !state.isGoogleHome.value; state.isGoogleHome.refresh(); if (state.isGoogleHome.value) { - state.isOpenedText.value = '关闭'; + state.isOpenedText.value = '关闭'.tr; } else { - state.isOpenedText.value = '开启'; + state.isOpenedText.value = '开启'.tr; } - showToast('操作成功'); + showToast('操作成功'.tr); } } } diff --git a/lib/mine/mineSet/google_home/google_home_page.dart b/lib/mine/mineSet/google_home/google_home_page.dart index 36b458e4..a0301e9d 100644 --- a/lib/mine/mineSet/google_home/google_home_page.dart +++ b/lib/mine/mineSet/google_home/google_home_page.dart @@ -49,8 +49,8 @@ class _GoogleHomePageState extends State { return Column( children: [ CommonItem( - leftTitel: 'Action name', - rightTitle: 'ScienerSmart', + leftTitel: 'Action name'.tr, + rightTitle: 'ScienerSmart'.tr, ), SizedBox( height: 20.h, @@ -84,10 +84,7 @@ class _GoogleHomePageState extends State { children: [ _buildInfoSection('支持的语言'.tr, '英语'.tr), SizedBox(height: 20.h), - _buildInfoSection( - '操作流程'.tr, - '1.用智能锁APP添加锁和网关\n\n2.在APP里开启锁的远程开锁功能(这个功能默认是关闭的)。如果没有这个选项,则锁不支持Google Home \n\n3.安装Google Home APP,点击左上角的“+”按钮\n\n4.在设置页面,选择“与Google协同工作”\n\n5.搜索“ScienerSmart”,并用智能锁APP的账号和密码进行授权\n\n6.在智能锁APP里设置安全码,使用Google Home开锁时提供此安全码' - .tr), + _buildInfoSection('操作流程'.tr, 'Google Home操作流程的值'.tr), ], ), ); diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index 101b3092..bdcb4c28 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -296,10 +296,9 @@ class _MineSetPageState extends State })), */ Obx(() => CommonItem( - leftTitel:'隐藏无效开锁权限'.tr, - rightTitle: (state.hideExpiredAccessFlag.value == 1 - ? '已开启'.tr - : '已关闭'.tr), + leftTitel: '隐藏无效开锁权限'.tr, + rightTitle: + (state.hideExpiredAccessFlag.value == 1 ? '已开启'.tr : '已关闭'.tr), isHaveLine: true, isHaveDirection: true, action: () { @@ -344,7 +343,7 @@ class _MineSetPageState extends State }); }), CommonItem( - leftTitel: 'Google Home', + leftTitel: 'Google Home'.tr, rightTitle: '', isHaveLine: true, isHaveDirection: true, @@ -369,7 +368,7 @@ class _MineSetPageState extends State leftTitel: '客服'.tr, isHaveLine: widget.showAbout, isHaveDirection: true, - action: (){ + action: () { WechatManageTool.getAppInfo(CustomerTool.openCustomerService); }, ),