mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
use number input for corner radius setting
This commit is contained in:
parent
4fa092d22f
commit
e8f9bbe08d
|
|
@ -2040,6 +2040,7 @@ html.y #ops svg circle {
|
||||||
}
|
}
|
||||||
#pathBar input[type=text],
|
#pathBar input[type=text],
|
||||||
.opview select,
|
.opview select,
|
||||||
|
.opview input[type=number],
|
||||||
.opview input[type=text],
|
.opview input[type=text],
|
||||||
.opview input[type=color],
|
.opview input[type=color],
|
||||||
.opview input[type=date] {
|
.opview input[type=date] {
|
||||||
|
|
|
||||||
|
|
@ -1314,7 +1314,7 @@ ebi('op_cfg').innerHTML = (
|
||||||
' <input type="text" id="accent" placeholder="#color"></input>' +
|
' <input type="text" id="accent" placeholder="#color"></input>' +
|
||||||
' <input type="color" id="accent_picker"></input>' +
|
' <input type="color" id="accent_picker"></input>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
' <input tt="' + L.cl_radius +'" type="text" id="radius" placeholder="[0-inf]"></input>' +
|
' <input tt="' + L.cl_radius +'" type="number" id="radius" min="-1" placeholder="[0-inf]"></input>' +
|
||||||
' <a id="fun_tgl" class="tgl btn" tt="' + L.cl_fun + '">🥳</a>\n' +
|
' <a id="fun_tgl" class="tgl btn" tt="' + L.cl_fun + '">🥳</a>\n' +
|
||||||
' </div>\n' +
|
' </div>\n' +
|
||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
|
|
@ -1527,10 +1527,9 @@ ebi('radius').oninput = function () {
|
||||||
if(r === radius)
|
if(r === radius)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(isNaN(r))
|
var usefallback = isNaN(r) || r < 0 || r === '';
|
||||||
r = ''
|
var setV = usefallback ? '' : (r + 'px');
|
||||||
swrite('radius', r);
|
swrite('radius', !usefallback && r);
|
||||||
var setV = this.value == '' ? '' : (r + 'px');
|
|
||||||
document.documentElement.style.setProperty('--radius', setV);
|
document.documentElement.style.setProperty('--radius', setV);
|
||||||
console.log(setV);
|
console.log(setV);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue