mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 02:18:50 -07:00
fix(web): settings switch state when disabled, simplify classes (#5762)
This commit is contained in:
parent
19754d4b21
commit
bda9fd9dfe
@ -42,16 +42,15 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{#if disabled}
|
{#if disabled}
|
||||||
<span class="slider-disable cursor-not-allowed" />
|
<span class="slider slider-disabled cursor-not-allowed" />
|
||||||
{:else}
|
{:else}
|
||||||
<span class="slider cursor-pointer" />
|
<span class="slider slider-enabled cursor-pointer" />
|
||||||
{/if}
|
{/if}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.slider,
|
.slider {
|
||||||
.slider-disable {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -67,8 +66,7 @@
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider:before,
|
.slider:before {
|
||||||
.slider-disable:before {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: '';
|
content: '';
|
||||||
height: 20px;
|
height: 20px;
|
||||||
@ -82,18 +80,18 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked + .slider-disable {
|
|
||||||
background-color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:checked + .slider {
|
|
||||||
background-color: #adcbfa;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:checked + .slider:before {
|
input:checked + .slider:before {
|
||||||
-webkit-transform: translateX(18px);
|
-webkit-transform: translateX(18px);
|
||||||
-ms-transform: translateX(18px);
|
-ms-transform: translateX(18px);
|
||||||
transform: translateX(18px);
|
transform: translateX(18px);
|
||||||
background-color: #4250af;
|
background-color: #4250af;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input:checked + .slider-disabled {
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:checked + .slider-enabled {
|
||||||
|
background-color: #adcbfa;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user