You've already forked pigallery2
							
							
				mirror of
				https://github.com/bpatrik/pigallery2.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	Fix item hiding in config #569
This commit is contained in:
		| @@ -182,20 +182,28 @@ export class TemplateComponent implements OnInit, OnChanges, OnDestroy, ISetting | |||||||
|             } |             } | ||||||
|           } |           } | ||||||
|  |  | ||||||
|  |           const forcedVisibility = !(state.tags?.priority > this.settingsService.configPriority || | ||||||
|  |             //if this value should not change in Docker, lets hide it | ||||||
|  |             (this.settingsService.configPriority === ConfigPriority.basic && | ||||||
|  |               state.tags?.dockerSensitive && this.settingsService.settings.value.Environment.isDocker)); | ||||||
|  |  | ||||||
|           if (state.isConfigArrayType) { |           if (state.isConfigArrayType) { | ||||||
|             for (let i = 0; i < state.value?.length; ++i) { |             for (let i = 0; i < state.value?.length; ++i) { | ||||||
|               if (state.value[i].__state && |               for (const k of Object.keys(state.value[i].__state)) { | ||||||
|                 Object.keys(state.value[i].__state).findIndex(k => !(st.value[i].__state[k].shouldHide && st.value[i].__state[k].shouldHide())) === -1) { |                 if (!Utils.equalsFilter( | ||||||
|                 return true; |                   state.value[i]?.__state[k]?.value, | ||||||
|               } |                   state.default[i] ? state.default[i][k] : undefined, | ||||||
|             } |                   ['default', '__propPath', '__created', '__prototype', '__rootConfig'])) { | ||||||
|  |  | ||||||
|                   return false; |                   return false; | ||||||
|                 } |                 } | ||||||
|           return ( |               } | ||||||
|             (state.tags?.priority > this.settingsService.configPriority || |             } | ||||||
|               (this.settingsService.configPriority === ConfigPriority.basic && |             return !forcedVisibility; | ||||||
|                 state.tags?.dockerSensitive && this.settingsService.settings.value.Environment.isDocker)) && //if this value should not change in Docker, lets hide it |           } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |           return ( !forcedVisibility  && | ||||||
|             Utils.equalsFilter(state.value, state.default, |             Utils.equalsFilter(state.value, state.default, | ||||||
|               ['__propPath', '__created', '__prototype', '__rootConfig']) && |               ['__propPath', '__created', '__prototype', '__rootConfig']) && | ||||||
|             Utils.equalsFilter(state.original, state.default, |             Utils.equalsFilter(state.original, state.default, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user