feat: sane defaults for new playlists in the UI.
This commit is contained in:
parent
31f36b6f38
commit
8426d14500
1 changed files with 5 additions and 4 deletions
|
@ -71,17 +71,18 @@
|
||||||
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
const editEnabled = document.querySelector('#SmartplaylistEditEnabled');
|
||||||
if (id === null) {
|
if (id === null) {
|
||||||
selection.selectedIndex = 0;
|
selection.selectedIndex = 0;
|
||||||
editName.value = '';
|
editName.value = 'My New Smartplaylist';
|
||||||
editProgram.value = '';
|
editProgram.value = '(is-favourite)';
|
||||||
editSortProgram.value = '';
|
editSortProgram.value = '(begin *items*)';
|
||||||
editUsers.innerHTML = '';
|
editUsers.innerHTML = '';
|
||||||
for (const u of config.Users) {
|
for (const u of config.Users) {
|
||||||
var o = document.createElement('option');
|
var o = document.createElement('option');
|
||||||
o.value = u[0];
|
o.value = u[0];
|
||||||
o.innerHTML = u[1];
|
o.innerHTML = u[1];
|
||||||
|
o.setAttribute('selected', 'selected');
|
||||||
editUsers.appendChild(o);
|
editUsers.appendChild(o);
|
||||||
}
|
}
|
||||||
editEnabled.checked = false;
|
editEnabled.checked = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
function matchId(p) {
|
function matchId(p) {
|
||||||
|
|
Loading…
Reference in a new issue