@@ -244,13 +244,25 @@ WatchFace({
244244 makeProgress ( i , EDIT_TYPES . indexOf ( groups [ i ] . getProperty ( hmUI . prop . CURRENT_TYPE ) ) )
245245 }
246246 for ( let i of PROGRESSES . keys ( ) ) {
247- hmUI . createWidget ( hmUI . widget . IMG_CLICK , {
248- x : [ 0 , DW / 2 ] [ i % 2 ] ,
249- y : [ 0 , DH - DW / 2 - I_SIZE - I_SPACE_V ] [ Math . floor ( i / 2 ) % 2 ] ,
250- w : DW / 2 ,
251- h : DW / 2 + I_SIZE + I_SPACE_V ,
252- type : groups [ i ] . getProperty ( hmUI . prop . CURRENT_TYPE )
253- } )
247+ if ( groups [ i ] . getProperty ( hmUI . prop . CURRENT_TYPE ) === hmUI . data_type . PAI_WEEKLY ) {
248+ hmUI . createWidget ( hmUI . widget . IMG , {
249+ x : [ 0 , DW / 2 ] [ i % 2 ] ,
250+ y : [ 0 , DH - DW / 2 - I_SIZE - I_SPACE_V ] [ Math . floor ( i / 2 ) % 2 ] ,
251+ w : DW / 2 ,
252+ h : DW / 2 + I_SIZE + I_SPACE_V ,
253+ //type: groups[i].getProperty(hmUI.prop.CURRENT_TYPE)
254+ } ) . addEventListener ( hmUI . event . CLICK_UP , function ( info ) {
255+ hmApp . startApp ( { url : 'pai_app_Screen' , native : true } )
256+ } ) ;
257+ } else {
258+ hmUI . createWidget ( hmUI . widget . IMG_CLICK , {
259+ x : [ 0 , DW / 2 ] [ i % 2 ] ,
260+ y : [ 0 , DH - DW / 2 - I_SIZE - I_SPACE_V ] [ Math . floor ( i / 2 ) % 2 ] ,
261+ w : DW / 2 ,
262+ h : DW / 2 + I_SIZE + I_SPACE_V ,
263+ type : groups [ i ] . getProperty ( hmUI . prop . CURRENT_TYPE )
264+ } )
265+ }
254266 }
255267
256268 // Center widget
0 commit comments