Prevent cut modifications when a video that was already uploaded is being modified

pull/322/head
ElementalAlchemist 2 years ago committed by Mike Lang
parent 3578a63ab8
commit 6382fd259b

@ -151,14 +151,16 @@ window.addEventListener("DOMContentLoaded", async (event) => {
});
const addRangeIcon = document.getElementById("add-range-definition");
addRangeIcon.addEventListener("click", (_event) => {
addRangeDefinition();
});
addRangeIcon.addEventListener("keypress", (event) => {
if (event.key === "Enter") {
if (videoInfo.state !== "DONE") {
addRangeIcon.addEventListener("click", (_event) => {
addRangeDefinition();
}
});
});
addRangeIcon.addEventListener("keypress", (event) => {
if (event.key === "Enter") {
addRangeDefinition();
}
});
}
const enableChaptersElem = document.getElementById("enable-chapter-markers");
enableChaptersElem.addEventListener("change", (_event) => {
@ -494,6 +496,16 @@ async function initializeVideoInfo() {
saveButton.classList.add("hidden");
const submitChangesButton = document.getElementById("submit-changes-button");
submitChangesButton.classList.remove("hidden");
document.getElementById("add-range-definition").classList.add("hidden");
const startTimes = document.getElementsByClassName("range-definition-start");
const endTimes = document.getElementsByClassName("range-definition-end");
for (const timeField of startTimes) {
timeField.disabled = true;
}
for (const timeField of endTimes) {
timeField.disabled = true;
}
}
if (modifiedAdvancedOptions) {

Loading…
Cancel
Save