mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-11-04 03:08:25 +00:00 
			
		
		
		
	position of toggle button improved (differentation between twig and vue) + fix fa-eye-slash in vue component
This commit is contained in:
		@@ -2,7 +2,6 @@
 | 
			
		||||
    display: flex;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    margin-right: 20px
 | 
			
		||||
    // margin-left 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.toggle-container {
 | 
			
		||||
@@ -17,6 +16,11 @@
 | 
			
		||||
.toggle{
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    right: 4px;
 | 
			
		||||
    &-twig {
 | 
			
		||||
        position: absolute;
 | 
			
		||||
        right: -25px;
 | 
			
		||||
        bottom: 20px;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.blur {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,18 +2,19 @@ require('./blur.scss');
 | 
			
		||||
 | 
			
		||||
document.querySelectorAll('.confidential').forEach(function (el) {
 | 
			
		||||
    let i = document.createElement('i');
 | 
			
		||||
    const classes = ['fa', 'fa-eye', 'toggle'];
 | 
			
		||||
    const classes = ['fa', 'fa-eye-slash', 'toggle-twig'];
 | 
			
		||||
    i.classList.add(...classes);
 | 
			
		||||
    el.appendChild(i);
 | 
			
		||||
 | 
			
		||||
    const toggleBlur = function(e) {
 | 
			
		||||
        for (let child of el.children) {
 | 
			
		||||
            if (!child.classList.contains('toggle')) {
 | 
			
		||||
            if (!child.classList.contains('toggle-twig')) {
 | 
			
		||||
                child.classList.toggle('blur');
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        i.classList.toggle('fa-eye');
 | 
			
		||||
        i.classList.toggle('fa-eye-slash');
 | 
			
		||||
        i.classList.toggle('fa-eye');
 | 
			
		||||
    }
 | 
			
		||||
    i.addEventListener('click', toggleBlur);
 | 
			
		||||
    toggleBlur();
 | 
			
		||||
});
 | 
			
		||||
});
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
            <slot name="confidential-content"></slot>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="toggle-container">
 | 
			
		||||
            <i class="fa fa-eye toggle" :class="{ toggleIcon }" aria-hidden="true" @click="toggleBlur"></i>
 | 
			
		||||
            <i class="fa toggle" :class="toggleIcon" aria-hidden="true" @click="toggleBlur"></i>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user