@@ -12,6 +12,9 @@ modifications and new features added by mvan231
1212---
1313version info
1414---
15+ v1.8
16+ - fixed issue with alert for settings
17+ - settings file removal
1518v1.7
1619- updated to openweather 3.0 API
1720v1.6
2528- added new method to color wind arrows
2629><><><><><><><><><><><*/
2730//check for an update quick before building the widget
28- let needUpdated = await updateCheck ( 1.7 )
31+ let needUpdated = await updateCheck ( 1.8 )
2932
3033/*><><><><><><><><><><><
3134
3235Start of Setup
3336
3437><><><><><><><><><><><*/
35- let fm = FileManager . iCloud ( )
36- let settingsPath = fm . documentsDirectory ( ) + '/weatherOverviewSettings.JSON'
37- log ( settingsPath )
38+ //let fm = FileManager.iCloud()
39+ //let settingsPath = fm.documentsDirectory()+'/weatherOverviewSettings.JSON'
3840let a , settings = { }
3941
40- if ( ! config . runsInWidget && fm . fileExists ( settingsPath ) ) {
42+ settings = { "apiKey" :"3b70d09bec54f8b555452513fd4be001" , "units" :"imperial" , "showWindspeed" :true , "showWindArrow" :true , "showPrecipitation" :true , "showCloudCover" :true , "showHumidity" :true , "showLegend" :true , "showAlerts" :true }
43+
44+ /*if(!config.runsInWidget && fm.fileExists(settingsPath)){
4145 let resetQ = new Alert()
4246 resetQ.title='Want to reset?'
4347 resetQ.message='If you tap "Yes" below, the settings for this widget will be reset and setup will run again'
@@ -48,6 +52,7 @@ if(!config.runsInWidget && fm.fileExists(settingsPath)){
4852 await fm.remove(settingsPath)
4953 }
5054}
55+ */
5156/* REMOVED SETTINGS FILE DUE TO ICLOUD OFFLOADING ISSUES
5257// log(`stored in iCloud? ${fm.isFileStoredIniCloud(settingsPath)}\n\nfile exists ${fm.fileExists(settingsPath)}`)
5358if(fm.fileExists(settingsPath)){
@@ -62,9 +67,7 @@ if(fm.fileExists(settingsPath)){
6267}
6368*/
6469
65- let set = await setup ( )
66-
67- settings = { "apiKey" :"" , "units" :"imperial" , "showWindspeed" :true , "showWindArrow" :true , "showPrecipitation" :true , "showCloudCover" :true , "showHumidity" :true , "showLegend" :true , "showAlerts" :true }
70+ //let set = await setup()
6871
6972//settings variables initialization
7073
0 commit comments