@ledvance/base 1.2.94 → 1.2.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/localazy.json +15 -1
- package/localazy.keys.json +3 -4
- package/package.json +1 -1
- package/src/i18n/strings.ts +3692 -3286
- package/src/res/index.ts +7 -1
- package/src/res/pic_co_alert_effect.png +0 -0
- package/src/res/pic_co_alert_effect@2x.png +0 -0
- package/src/res/pic_co_alert_effect@3x.png +0 -0
- package/src/res/pic_co_alert_free.png +0 -0
- package/src/res/pic_co_alert_free@2x.png +0 -0
- package/src/res/pic_co_alert_free@3x.png +0 -0
- package/src/res/pic_smoke_alert_effct.png +0 -0
- package/src/res/pic_smoke_alert_effct@2x.png +0 -0
- package/src/res/pic_smoke_alert_effct@3x.png +0 -0
- package/src/res/pic_smoke_alert_free.png +0 -0
- package/src/res/pic_smoke_alert_free@2x.png +0 -0
- package/src/res/pic_smoke_alert_free@3x.png +0 -0
- package/src/res/pic_water_alert_effct.png +0 -0
- package/src/res/pic_water_alert_effct@2x.png +0 -0
- package/src/res/pic_water_alert_effct@3x.png +0 -0
- package/src/res/pic_water_alert_free.png +0 -0
- package/src/res/pic_water_alert_free@2x.png +0 -0
- package/src/res/pic_water_alert_free@3x.png +0 -0
- package/src/utils/common.ts +16 -0
- package/translateKey.txt +14 -0
package/src/res/index.ts
CHANGED
|
@@ -70,5 +70,11 @@ export default {
|
|
|
70
70
|
football_icon: require('./football_icon.png'),
|
|
71
71
|
leverkusen_icon: require('./leverkusen_icon.png'),
|
|
72
72
|
olympic_icon: require('./olympic.png'),
|
|
73
|
-
ic_refresh: require('./refresh.png')
|
|
73
|
+
ic_refresh: require('./refresh.png'),
|
|
74
|
+
ic_co_alert_effect: require('./pic_co_alert_effect.png'),
|
|
75
|
+
ic_co_alert_free: require('./pic_co_alert_free.png'),
|
|
76
|
+
ic_smoke_alert_effect: require('./pic_smoke_alert_effct.png'),
|
|
77
|
+
ic_smoke_alert_free: require('./pic_smoke_alert_free.png'),
|
|
78
|
+
ic_water_alert_effect: require('./pic_water_alert_effct.png'),
|
|
79
|
+
ic_water_alert_free: require('./pic_water_alert_free.png')
|
|
74
80
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/utils/common.ts
CHANGED
|
@@ -377,3 +377,19 @@ export function getIsClosed(item: {weeks: number[], settingTime: number, endTime
|
|
|
377
377
|
}
|
|
378
378
|
return undone
|
|
379
379
|
}
|
|
380
|
+
|
|
381
|
+
type AsyncFunction<T extends any[], R> = (...args: T) => Promise<R>
|
|
382
|
+
|
|
383
|
+
export function withErrorHandling<T extends any[], R>(
|
|
384
|
+
asyncFn: AsyncFunction<T, R>
|
|
385
|
+
): AsyncFunction<T, R> {
|
|
386
|
+
return async (...args: T): Promise<R> => {
|
|
387
|
+
try {
|
|
388
|
+
return await asyncFn(...args);
|
|
389
|
+
} catch (error) {
|
|
390
|
+
console.error(`Error in ${asyncFn.name || 'anonymous function'}:`, error)
|
|
391
|
+
// 可以在这里添加更多的错误处理逻辑,比如发送到错误跟踪服务
|
|
392
|
+
throw error // 重新抛出错误,以便调用者可以选择进一步处理
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
package/translateKey.txt
CHANGED
|
@@ -846,3 +846,17 @@ groups_settings_synchronize_solar_secondtopic
|
|
|
846
846
|
btsolar_groups_inductionsync
|
|
847
847
|
btsolar_groups_inductionsync_description
|
|
848
848
|
recordings_overview_field2_text
|
|
849
|
+
smoke_alerteffect
|
|
850
|
+
CO_alerteffect
|
|
851
|
+
water_alerteffect
|
|
852
|
+
title_watersensor
|
|
853
|
+
title_smokesensor
|
|
854
|
+
title_COsensor
|
|
855
|
+
settings_leakagealarm
|
|
856
|
+
smoke_equipmentselftest
|
|
857
|
+
settings_coalarm
|
|
858
|
+
settings_coalarmrecovery
|
|
859
|
+
settings_smokealarm
|
|
860
|
+
settings_smokealarmrecovery
|
|
861
|
+
sensor_deviceselftest
|
|
862
|
+
sensor_deviceselftestfail
|