This commit is contained in:
devdatt 2026-02-19 08:42:38 +05:30
parent 2f4c52b344
commit 10346ca2ea
2 changed files with 46 additions and 18 deletions

View File

@ -1094,7 +1094,7 @@ include 'static.php';
/* heading spans full width */
.panel h2 {
grid-column: 1/-1;
text-align: center;
text-align: left;
font-size: 16px;
margin-bottom: 4px;
color: #f8fafc;
@ -1174,6 +1174,31 @@ include 'static.php';
.control:not(:last-child) {
border: none;
}
/* reset button layout */
.panel-actions {
grid-column: 1/-1;
display: flex;
justify-content: flex-end;
margin-top: 6px;
}
.panel-actions button {
padding: 7px 16px;
border-radius: 8px;
border: 1px solid var(--border);
background: linear-gradient(180deg, #0f172a, #020617);
color: var(--text);
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: .2s;
}
.panel-actions button:hover {
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(56, 189, 248, .15);
}
</style>
</head>

View File

@ -242,6 +242,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<input type="range" id="hue" min="-180" max="180" step="1" value="0">
</div>
</div>
<div class="panel-actions">
<button type="button" id="colorReset">Reset</button>
</div>
</div>
<div class="card wide">
@ -382,28 +385,28 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
</div>
</form>
<script>
const controls=["brightness","contrast","saturation","hue"];
const controls = ["brightness", "contrast", "saturation", "hue"];
function update(){
const b=brightness.value;
const c=contrast.value;
const s=saturation.value;
const h=hue.value;
function update() {
const b = brightness.value;
const c = contrast.value;
const s = saturation.value;
const h = hue.value;
brightnessVal.textContent=b;
contrastVal.textContent=c;
saturationVal.textContent=s;
hueVal.textContent=h;
brightnessVal.textContent = b;
contrastVal.textContent = c;
saturationVal.textContent = s;
hueVal.textContent = h;
ffmpegOutput.textContent=
ffmpegOutput.textContent =
`-vf "vpp_qsv=format=nv12:brightness=${b}:contrast=${c}:saturation=${s}:hue=${h}"`;
}
}
controls.forEach(id=>{
document.getElementById(id).addEventListener("input",update);
});
controls.forEach(id => {
document.getElementById(id).addEventListener("input", update);
});
update();
update();
</script>
<?php
if (!empty($saveError)) echo '<p style="color:red;text-align:center;">' . htmlspecialchars($saveError) . '</p>';