diff --git a/Assets/Res/language/language.json b/Assets/Res/language/language.json index 508a3dd..dfc30ea 100644 --- a/Assets/Res/language/language.json +++ b/Assets/Res/language/language.json @@ -586,7 +586,7 @@ }, { "key": "100118", - "zh": "活物检测", + "zh": "Visual Aid", "en": "Person & Pet Detection" }, { @@ -1511,8 +1511,8 @@ }, { "key": "100303", - "zh": "获取到{0}条消杀数据,正在上传,请稍后", - "en": "Uploading {0} elimination records,please wait..." + "zh": "正在同步 {0} 条消杀记录,请稍候", + "en": "Syncing {0} records, please wait…" }, { "key": "100304", @@ -1538,6 +1538,16 @@ "key": "100308", "zh": "已通知设备更新,请在设备端查看进度", "en": "Device update notified. Please view progress on the device." + }, + { + "key": "100309", + "zh": "同步中", + "en": "Syncing" + }, + { + "key": "100310", + "zh": "已同步 {0} 条记录", + "en": "{0} records synced" } diff --git a/Assets/Res/ui/deviceinfopage/deviceInfoPage.prefab b/Assets/Res/ui/deviceinfopage/deviceInfoPage.prefab index a49dbc1..2226113 100644 --- a/Assets/Res/ui/deviceinfopage/deviceInfoPage.prefab +++ b/Assets/Res/ui/deviceinfopage/deviceInfoPage.prefab @@ -1892,7 +1892,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -996} + m_AnchoredPosition: {x: 0, y: -896} m_SizeDelta: {x: -60, y: 100} m_Pivot: {x: 0.5, y: 1} --- !u!222 &7675192394301102632 @@ -1977,7 +1977,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &328119646737946447 RectTransform: m_ObjectHideFlags: 0 @@ -1995,10 +1995,10 @@ RectTransform: - {fileID: 2251259006692246501} m_Father: {fileID: 1366632145333145909} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 100} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 345, y: -150} + m_SizeDelta: {x: 630, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7421177716726337501 CanvasRenderer: @@ -2658,7 +2658,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -872} + m_AnchoredPosition: {x: 0, y: -772} m_SizeDelta: {x: -60, y: 100} m_Pivot: {x: 0.5, y: 1} --- !u!222 &7735897185071609595 @@ -3524,7 +3524,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1802245483932984955 RectTransform: m_ObjectHideFlags: 0 @@ -3539,10 +3539,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1366632145333145909} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 1} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 345, y: -100.5} + m_SizeDelta: {x: 630, y: 1} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2133625135489848517 CanvasRenderer: @@ -3789,7 +3789,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -648} - m_SizeDelta: {x: -60, y: 200} + m_SizeDelta: {x: -60, y: 100} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5767381712955404138 CanvasRenderer: diff --git a/Assets/Res/ui/homepage/homePage.prefab b/Assets/Res/ui/homepage/homePage.prefab index 5cd01d2..5f4a59d 100644 --- a/Assets/Res/ui/homepage/homePage.prefab +++ b/Assets/Res/ui/homepage/homePage.prefab @@ -12639,7 +12639,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -49, y: -35.4} + m_AnchoredPosition: {x: -49, y: -35.399994} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8379037123785794455 @@ -15123,6 +15123,7 @@ MonoBehaviour: tipPoint: {fileID: 81902936719861509} setWifiPage: {fileID: 8038532572982553104, guid: e7ef5081212dfe9469c40678baa2b0ac, type: 3} + scrollRect: {fileID: 7398385099859628837} --- !u!1 &8115864904787809625 GameObject: m_ObjectHideFlags: 0 @@ -17833,7 +17834,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 40.000004, y: -5.0000296} + m_AnchoredPosition: {x: 40, y: -5.0000296} m_SizeDelta: {x: 101, y: 83} m_Pivot: {x: 0, y: 0.5} --- !u!222 &7003777409236910687 diff --git a/Assets/Res/ui/homepage/安全设置.prefab b/Assets/Res/ui/homepage/安全设置.prefab index 88d8640..2b36253 100644 --- a/Assets/Res/ui/homepage/安全设置.prefab +++ b/Assets/Res/ui/homepage/安全设置.prefab @@ -4359,7 +4359,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Person & Pet Detection + m_Text: Visual Aid --- !u!114 &8077729455030778148 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs b/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs index d37cba5..7f3691b 100644 --- a/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs +++ b/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs @@ -1440,6 +1440,8 @@ namespace Kill.UI.Pages mosquitoDatas.Add(mosquitoData); if(waitToPostMosquitoDatas!=null) StopCoroutine(waitToPostMosquitoDatas); + if(mosquitoDatas.Count<=aimMosquitoDataCount) + ToastUI.ShowText($"{LanguageManager.Instance.GetLanguage("100309")} {mosquitoDatas.Count}/aimMosquitoDataCount"); if(mosquitoDatas.Count>=aimMosquitoDataCount&&aimMosquitoDataCount>0) { LoadingUI.Hide(); @@ -1476,6 +1478,7 @@ namespace Kill.UI.Pages Debug.Log("发送灭蚊数据:"+JsonUtility.ToJson(postRecordDatas)); var response = await NetworkCtrl.Instance.Post("/api/v1/stats/device/records", postRecordDatas); ResponseCodeHandler.HandleResponse(response, null, null); + ToastUI.ShowText(LanguageManager.Instance.GetLanguage("100310").Replace("{0}",mosquitoDatas.Count.ToString())); } /// /// 获取所有蚊虫数据 (0xA4) @@ -1497,7 +1500,9 @@ namespace Kill.UI.Pages } Debug.Log($"检测到 {count.Count} 条蚊虫数据,正在请求..."); - + string tip = LanguageManager.Instance.GetLanguage("100303"); + tip = tip.Replace("{0}", count.ToString()); + ToastUI.ShowText(tip); // 在请求前先初始化接收容器,避免通知先于主线程回调到达导致数据丢失 mosquitoDatas = new List(); aimMosquitoDataCount = (int)count.Count; @@ -1509,9 +1514,6 @@ namespace Kill.UI.Pages { if (success) { - string tip=LanguageManager.Instance.GetLanguage("100303"); - tip=tip.Replace("{0}",count.ToString()); - ToastUI.ShowText(tip); Debug.Log($"已请求 {count.Count} 条蚊虫数据,等待接收..."); } else