diff --git a/changes/changelog.d/1131.enhancement b/changes/changelog.d/1131.enhancement new file mode 100644 index 000000000..eb2f25b0b --- /dev/null +++ b/changes/changelog.d/1131.enhancement @@ -0,0 +1 @@ +More consistent search UX on /albums, /artists, /radios and /playlists (#1131) \ No newline at end of file diff --git a/changes/changelog.d/407.enhancement b/changes/changelog.d/407.enhancement new file mode 100644 index 000000000..c21a34063 --- /dev/null +++ b/changes/changelog.d/407.enhancement @@ -0,0 +1 @@ +Confirm email without requiring the user to validate the form manually (#407) \ No newline at end of file diff --git a/front/src/EmbedFrame.vue b/front/src/EmbedFrame.vue index a8dcce4fa..afee7c82f 100644 --- a/front/src/EmbedFrame.vue +++ b/front/src/EmbedFrame.vue @@ -89,7 +89,6 @@ 0 } else if (this.artist && this.artist.tracks_count) { return this.artist.tracks_count > 0 - } else if (this.artist && this.artist.albums) { + } else if (this.artist && this.artist.albums) { return this.artist.albums.filter((a) => { return a.is_playable === true }).length > 0 + } else if (this.album) { + return this.album.is_playable } else if (this.tracks) { return this.tracks.filter((t) => { return t.uploads && t.uploads.length > 0 @@ -229,6 +231,7 @@ export default { jQuery(self.$el).find('.ui.dropdown').dropdown('hide') }, addNext (next) { + console.log('CLICKED') let self = this let wasEmpty = this.$store.state.queue.tracks.length === 0 this.getPlayableTracks().then((tracks) => { @@ -253,7 +256,6 @@ export default { }, watch: { clicked () { - let self = this this.$nextTick(() => { jQuery(this.$el).find('.ui.dropdown').dropdown({ diff --git a/front/src/components/auth/LoginForm.vue b/front/src/components/auth/LoginForm.vue index f0591a538..3f6eb0edb 100644 --- a/front/src/components/auth/LoginForm.vue +++ b/front/src/components/auth/LoginForm.vue @@ -40,7 +40,7 @@ Reset your password - + diff --git a/front/src/components/forms/PasswordInput.vue b/front/src/components/forms/PasswordInput.vue index fe1a01a9f..2e4f227a5 100644 --- a/front/src/components/forms/PasswordInput.vue +++ b/front/src/components/forms/PasswordInput.vue @@ -3,7 +3,6 @@ @@ -30,7 +29,7 @@ function copyStringToClipboard (str) { } export default { - props: ['value', 'index', 'defaultShow', 'copyButton'], + props: ['value', 'defaultShow', 'copyButton'], data () { return { showPassword: this.defaultShow || false, diff --git a/front/src/components/library/AlbumBase.vue b/front/src/components/library/AlbumBase.vue index 071b13357..7b572e145 100644 --- a/front/src/components/library/AlbumBase.vue +++ b/front/src/components/library/AlbumBase.vue @@ -169,13 +169,16 @@ export default { methods: { async fetchData() { this.isLoading = true + let tracksResponse = axios.get(`tracks/`, {params: {ordering: 'disc_number,position', album: this.id, page_size: 100}}) let albumResponse = await axios.get(`albums/${this.id}/`, {params: {refresh: 'true'}}) let artistResponse = await axios.get(`artists/${albumResponse.data.artist.id}/`) this.artist = artistResponse.data if (this.artist.channel) { this.artist.channel.artist = this.artist } - this.object = backend.Album.clean(albumResponse.data) + tracksResponse = await tracksResponse + this.object = albumResponse.data + this.object.tracks = tracksResponse.data.results this.discs = this.object.tracks.reduce(groupByDisc, []) this.isLoading = false diff --git a/front/src/components/library/Albums.vue b/front/src/components/library/Albums.vue index 60bafe245..647e37b47 100644 --- a/front/src/components/library/Albums.vue +++ b/front/src/components/library/Albums.vue @@ -4,13 +4,18 @@

Browsing albums

-
+
- +
+ + +
@@ -40,7 +45,7 @@
-
+
{ - return backend.Album.clean(album) - }) + self.albums = parsed }) await trackPromise diff --git a/front/src/components/library/Artists.vue b/front/src/components/library/Artists.vue index 19e22089b..98d06e776 100644 --- a/front/src/components/library/Artists.vue +++ b/front/src/components/library/Artists.vue @@ -4,13 +4,18 @@

Browsing artists

-
+
- +
+ + +
@@ -40,7 +45,7 @@
-
+
@@ -134,7 +139,7 @@ export default { } }, methods: { - updateQueryString: _.debounce(function() { + updateQueryString: function() { history.pushState( {}, null, @@ -147,8 +152,8 @@ export default { ordering: this.getOrderingAsString() }).toString() ) - }, 500), - fetchData: _.debounce(function() { + }, + fetchData: function() { var self = this this.isLoading = true let url = FETCH_URL @@ -178,7 +183,7 @@ export default { self.result = null self.isLoading = false }) - }, 500), + }, selectPage: function(page) { this.page = page } @@ -188,26 +193,6 @@ export default { this.updateQueryString() this.fetchData() }, - paginateBy() { - this.updateQueryString() - this.fetchData() - }, - ordering() { - this.updateQueryString() - this.fetchData() - }, - orderingDirection() { - this.updateQueryString() - this.fetchData() - }, - query() { - this.updateQueryString() - this.fetchData() - }, - tags() { - this.updateQueryString() - this.fetchData() - }, "$store.state.moderation.lastUpdate": function () { this.fetchData() } diff --git a/front/src/components/library/Radios.vue b/front/src/components/library/Radios.vue index 1f5b121dc..f96c25272 100644 --- a/front/src/components/library/Radios.vue +++ b/front/src/components/library/Radios.vue @@ -25,11 +25,16 @@ Create your own radio -
+
- +
+ + +
@@ -59,7 +64,7 @@
-
+
@@ -157,7 +162,7 @@ export default { }, }, methods: { - updateQueryString: _.debounce(function() { + updateQueryString: function() { history.pushState( {}, null, @@ -169,8 +174,8 @@ export default { ordering: this.getOrderingAsString() }).toString() ) - }, 500), - fetchData: _.debounce(function() { + }, + fetchData: function() { var self = this this.isLoading = true let url = FETCH_URL @@ -186,7 +191,7 @@ export default { self.result = response.data self.isLoading = false }) - }, 500), + }, selectPage: function(page) { this.page = page } @@ -196,22 +201,6 @@ export default { this.updateQueryString() this.fetchData() }, - paginateBy() { - this.updateQueryString() - this.fetchData() - }, - ordering() { - this.updateQueryString() - this.fetchData() - }, - orderingDirection() { - this.updateQueryString() - this.fetchData() - }, - query() { - this.updateQueryString() - this.fetchData() - } } } diff --git a/front/src/views/auth/EmailConfirm.vue b/front/src/views/auth/EmailConfirm.vue index 26ccc5d70..4e255ffb9 100644 --- a/front/src/views/auth/EmailConfirm.vue +++ b/front/src/views/auth/EmailConfirm.vue @@ -52,6 +52,11 @@ export default { } } }, + mounted () { + if (this.key) { + this.submit() + } + }, methods: { submit() { let self = this diff --git a/front/src/views/playlists/List.vue b/front/src/views/playlists/List.vue index 237c2becc..83b29897f 100644 --- a/front/src/views/playlists/List.vue +++ b/front/src/views/playlists/List.vue @@ -2,17 +2,22 @@

Browsing playlists

-
- + +
- +
+ + +
@@ -38,7 +43,7 @@
-
+
@@ -124,7 +129,7 @@ export default { } }, methods: { - updateQueryString: _.debounce(function() { + updateQueryString: function() { history.pushState( {}, null, @@ -136,8 +141,8 @@ export default { ordering: this.getOrderingAsString() }).toString() ) - }, 250), - fetchData: _.debounce(function() { + }, + fetchData: function() { var self = this this.isLoading = true let url = FETCH_URL @@ -153,7 +158,7 @@ export default { self.result = response.data self.isLoading = false }) - }, 500), + }, selectPage: function(page) { this.page = page } @@ -163,22 +168,6 @@ export default { this.updateQueryString() this.fetchData() }, - paginateBy() { - this.updateQueryString() - this.fetchData() - }, - ordering() { - this.updateQueryString() - this.fetchData() - }, - orderingDirection() { - this.updateQueryString() - this.fetchData() - }, - query() { - this.updateQueryString() - this.fetchData() - } } }