realign #only-updates filter and rename as it's not linked to prefs
This commit is contained in:
		
							parent
							
								
									ebef35c28c
								
							
						
					
					
						commit
						119a3803ec
					
				|  | @ -227,7 +227,7 @@ | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <label id="onlyUpdates" class="hidden"> |     <label id="only-updates" class="hidden"> | ||||||
|       <input type="checkbox" |       <input type="checkbox" | ||||||
|              data-filter=".can-update, .update-problem, .update-done" |              data-filter=".can-update, .update-problem, .update-done" | ||||||
|              data-filter-hide=":not(.updatable):not(.update-done), .no-update:not(.update-problem)"> |              data-filter-hide=":not(.updatable):not(.update-done), .no-update:not(.update-problem)"> | ||||||
|  |  | ||||||
|  | @ -392,8 +392,8 @@ Object.assign(document.body, { | ||||||
|     this.ondragend(); |     this.ondragend(); | ||||||
|     if (event.dataTransfer.files.length) { |     if (event.dataTransfer.files.length) { | ||||||
|       event.preventDefault(); |       event.preventDefault(); | ||||||
|       if ($('#onlyUpdates input').checked) { |       if ($('#only-updates input').checked) { | ||||||
|         $('#onlyUpdates input').click(); |         $('#only-updates input').click(); | ||||||
|       } |       } | ||||||
|       importFromFile({file: event.dataTransfer.files[0]}); |       importFromFile({file: event.dataTransfer.files[0]}); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -392,6 +392,13 @@ select { | ||||||
|   background-color: hsla(0, 0%, 50%, .2); |   background-color: hsla(0, 0%, 50%, .2); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #only-updates { | ||||||
|  |   position: relative; | ||||||
|  |   left: -5px; | ||||||
|  |   margin-top: 2px; | ||||||
|  |   margin-bottom: 2px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| .checkmate { | .checkmate { | ||||||
|   position: relative; |   position: relative; | ||||||
|   height: 12px; |   height: 12px; | ||||||
|  |  | ||||||
|  | @ -108,7 +108,7 @@ function reportUpdateState(state, style, details) { | ||||||
|       entry.classList.add('can-update'); |       entry.classList.add('can-update'); | ||||||
|       entry.updatedCode = style; |       entry.updatedCode = style; | ||||||
|       $('.update-note', entry).textContent = ''; |       $('.update-note', entry).textContent = ''; | ||||||
|       $('#onlyUpdates').classList.remove('hidden'); |       $('#only-updates').classList.remove('hidden'); | ||||||
|       break; |       break; | ||||||
|     case BG.updater.SKIPPED: { |     case BG.updater.SKIPPED: { | ||||||
|       if (entry.classList.contains('can-update')) { |       if (entry.classList.contains('can-update')) { | ||||||
|  | @ -151,12 +151,12 @@ function reportUpdateState(state, style, details) { | ||||||
| function renderUpdatesOnlyFilter({show, check} = {}) { | function renderUpdatesOnlyFilter({show, check} = {}) { | ||||||
|   const numUpdatable = $$('.can-update').length; |   const numUpdatable = $$('.can-update').length; | ||||||
|   const mightUpdate = numUpdatable > 0 || $('.update-problem'); |   const mightUpdate = numUpdatable > 0 || $('.update-problem'); | ||||||
|   const checkbox = $('#onlyUpdates input'); |   const checkbox = $('#only-updates input'); | ||||||
|   show = show !== undefined ? show : mightUpdate; |   show = show !== undefined ? show : mightUpdate; | ||||||
|   check = check !== undefined ? show && check : checkbox.checked && mightUpdate; |   check = check !== undefined ? show && check : checkbox.checked && mightUpdate; | ||||||
| 
 | 
 | ||||||
|   $('#onlyUpdates').classList.toggle('hidden', !show); |   $('#only-updates').classList.toggle('hidden', !show); | ||||||
|   checkbox.checked = check; |   checkbox.checked = check && show; | ||||||
|   checkbox.dispatchEvent(new Event('change')); |   checkbox.dispatchEvent(new Event('change')); | ||||||
| 
 | 
 | ||||||
|   const btnApply = $('#apply-all-updates'); |   const btnApply = $('#apply-all-updates'); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user