reset states

This commit is contained in:
jb-alvarado 2023-09-08 10:21:34 +02:00
parent 806d533bc2
commit 2ca3aa73b2

View File

@ -475,7 +475,10 @@
role="tab" role="tab"
aria-controls="v-pills-playout" aria-controls="v-pills-playout"
aria-selected="false" aria-selected="false"
@click="advancedGenerator = true; resetCheckboxes()" @click="
advancedGenerator = true;
resetCheckboxes()
"
> >
Advanced Advanced
</button> </button>
@ -730,10 +733,26 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div v-if="!advancedGenerator" class="form-check select-all-div"> <div v-if="!advancedGenerator" class="form-check select-all-div">
<input id="checkAll" class="form-check-input" type="checkbox" v-model="generateFromAll" /> <input
id="checkAll"
class="form-check-input"
type="checkbox"
v-model="generateFromAll"
@change="resetCheckboxes()"
/>
<label class="form-check-label" for="checkAll">All</label> <label class="form-check-label" for="checkAll">All</label>
</div> </div>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Cancel</button> <button
type="button"
class="btn btn-primary"
data-bs-dismiss="modal"
@click="
resetCheckboxes();
resetTemplate()
"
>
Cancel
</button>
<button <button
type="button" type="button"
class="btn btn-primary" class="btn btn-primary"
@ -1184,6 +1203,7 @@ async function generatePlaylist() {
// reset selections // reset selections
resetCheckboxes() resetCheckboxes()
resetTemplate()
playlistIsLoading.value = false playlistIsLoading.value = false
} }
@ -1281,6 +1301,10 @@ function resetCheckboxes() {
} }
} }
function resetTemplate() {
template.value.sources = []
}
function addTemplate() { function addTemplate() {
const last = template.value.sources[template.value.sources.length - 1] const last = template.value.sources[template.value.sources.length - 1]
// @ts-ignore // @ts-ignore