Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
- Fix: Upload button could be pressed while already uploading
- Fix: Sort by createdAt rather than publishedAt to avoid DRAFT albums being at the bottom

Signed-off-by: Tobias de Bruijn <[email protected]>
  • Loading branch information
TobiasDeBruijn committed Feb 22, 2024
1 parent fba5544 commit 1e658d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/UploadPhotoDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<v-btn
@click="upload"
color="primary"
:disabled="loading"
:loading="loading">
Upload
</v-btn>
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/views/album/AlbumGridView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ export default Vue.extend({
// Sort in descending chronological order -- Newest albums first
albums.sort((a, b) => {
if(a.publishedAt != null && b.publishedAt != null) {
return b.publishedAt - a.publishedAt;
} else {
return b.createdAt - a.createdAt;
}
return b.createdAt - a.createdAt;
});
this.albums = albums;
Expand Down

0 comments on commit 1e658d9

Please sign in to comment.