Disable some buttons on disabled albums

Also apply strikethrough to their public links.
Though similar with albums that have their public links explicitly
disabled, despite having strikethrough, they're still clickable.
Of course they'll just lead to 404 page regardless.
This commit is contained in:
Bobby Wibowo 2020-06-03 09:20:40 +07:00
parent 7f58d80cff
commit f305b08077
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
4 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1730,7 +1730,7 @@ page.getAlbums = (params = {}) => {
${params.all ? `<th>${album.userid ? (users[album.userid] || '') : ''}</th>` : ''}
<th>${album.uploads}</th>
<td>${album.prettyDate}</td>
<td><a ${album.public ? '' : 'class="is-linethrough" '}href="${albumUrl}" target="_blank">${albumUrl}</a></td>
<td><a ${enabled && album.public ? '' : 'class="is-linethrough" '}href="${albumUrl}" target="_blank">${albumUrl}</a></td>
<td class="has-text-right" data-id="${album.id}">
<a class="button is-small is-primary is-outlined" title="Edit album" data-action="edit-album">
<span class="icon is-small">
@ -1747,12 +1747,12 @@ page.getAlbums = (params = {}) => {
<i class="icon-clipboard"></i>
</span>
</a>
<a class="button is-small is-warning is-outlined" title="Download album" ${album.download ? `href="api/album/zip/${album.identifier}?v=${album.editedAt}"` : 'disabled'}>
<a class="button is-small is-warning is-outlined" title="Download album" ${enabled && album.download ? `href="api/album/zip/${album.identifier}?v=${album.editedAt}"` : 'disabled'}>
<span class="icon is-small">
<i class="icon-download"></i>
</span>
</a>
<a class="button is-small is-dangerish is-outlined" title="Disable album" data-action="disable-album">
<a class="button is-small is-dangerish is-outlined" title="Disable album" data-action="disable-album"${enabled ? '' : ' disabled'}>
<span class="icon is-small">
<i class="icon-trash"></i>
</span>

View File

@ -1,5 +1,5 @@
{
"1": "1590986654",
"1": "1591150759",
"2": "1589010026",
"3": "1581416390",
"4": "1581416390",