change update interval checking method
This commit is contained in:
		
							parent
							
								
									a0f8a7b0b3
								
							
						
					
					
						commit
						c2f5daac98
					
				
					 3 changed files with 16 additions and 22 deletions
				
			
		|  | @ -165,6 +165,9 @@ | |||
| 	"settings_filters_content": { | ||||
| 		"message": "Filter" | ||||
| 	}, | ||||
| 	"settings_update_duration_description": { | ||||
| 		"message": "Update Check" | ||||
| 	}, | ||||
| 
 | ||||
| 	"JSON_parse_error": { | ||||
| 		"message": "There is a mistake in your JSON formatting. Please correct the error before saving." | ||||
|  |  | |||
|  | @ -103,22 +103,9 @@ | |||
| 							</side> | ||||
| 						</section> | ||||
| 						<section class="input-group"> | ||||
| 							<label class="input-description"> | ||||
| 								<legend | ||||
| 									for="duration" | ||||
| 									class="flow-text" | ||||
| 								></legend> | ||||
| 								<label | ||||
| 									for="settings_update_duration_description" | ||||
| 								></label> | ||||
| 							</label> | ||||
| 							<div class="input-field"> | ||||
| 								<input | ||||
| 									type="number" | ||||
| 									data-store="settings,sync,duration" | ||||
| 									data-store-location="1" | ||||
| 								/> | ||||
| 								<label for="settings_update_duration_prompt"></label> | ||||
| 								<input type="number" data-store="settings,sync,duration" data-store-location="1" placeholder=" " min=".25" step=".25" /> | ||||
| 								<label for="settings_update_duration_description"></label> | ||||
| 							</div> | ||||
| 						</section> | ||||
| 						<section class="input-group"> | ||||
|  | @ -132,12 +119,7 @@ | |||
| 								></label> | ||||
| 							</label> | ||||
| 							<div class="input-field"> | ||||
| 								<input | ||||
| 									type="password" | ||||
| 									data-store="settings,analysis,api,key" | ||||
| 									data-store-location="1" | ||||
| 									placeholder=" " | ||||
| 								/> | ||||
| 								<input type="password" data-store="settings,analysis,api,key" data-store-location="1" placeholder=" " class="validate" required /> | ||||
| 								<label for="API_Key"></label> | ||||
| 							</div> | ||||
| 						</section> | ||||
|  |  | |||
|  | @ -350,8 +350,17 @@ export default class windowman { | |||
| 						element[`event`] = function () { | ||||
| 							let UI_item = {}; | ||||
| 							UI_item[`source`] = this.getAttribute(`data-store`); | ||||
| 
 | ||||
| 							if (element[`type`].includes(`num`) || element[`type`].includes(`range`)) { | ||||
| 								if ((this.hasAttribute(`min`)) ? this.value < parseFloat(this.getAttribute(`min`)) : false) { | ||||
| 									this.value = this.getAttribute(`min`); | ||||
| 								} else if((this.hasAttribute(`max`)) ? this.value > parseFloat(this.getAttribute(`max`)) : false) { | ||||
| 									this.value = this.getAttribute(`max`); | ||||
| 								}; | ||||
| 							}; | ||||
| 
 | ||||
| 							UI_item[`value`] = element[`type`].includes(`num`) | ||||
| 								? parseFloat(this.value) % 1 != 0 | ||||
| 								? this.value % parseInt(this.value) != 0 | ||||
| 									? parseFloat(this.value) | ||||
| 									: parseInt(this.value) | ||||
| 								: this.value; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue