diff --git a/changes/changelog.d/1294.enhancement b/changes/changelog.d/1294.enhancement new file mode 100644 index 0000000000000000000000000000000000000000..3399782c01551664ed3f8d3c3e9f6f6bb0d9ed51 --- /dev/null +++ b/changes/changelog.d/1294.enhancement @@ -0,0 +1 @@ +Added ability to choose fediverse addresses from channel subscription page/podcast screen (#1294) \ No newline at end of file diff --git a/changes/changelog.d/1295.bugfix b/changes/changelog.d/1295.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..fad762cbc0e55963064f1191473bc1aa575d123f --- /dev/null +++ b/changes/changelog.d/1295.bugfix @@ -0,0 +1 @@ +Fixed an issue where modals would prevent users being able to interact with channels (#1295) \ No newline at end of file diff --git a/front/src/components/RemoteSearchForm.vue b/front/src/components/RemoteSearchForm.vue index 24f2f5ffca364dc5c5f147a586405ef18847e758..3f91726ad92459406259da68b88fc1da77684dd8 100644 --- a/front/src/components/RemoteSearchForm.vue +++ b/front/src/components/RemoteSearchForm.vue @@ -1,5 +1,14 @@ <template> - <div> + <div v-if="type === 'both' || type === undefined" class="two ui buttons"> + <button class="ui left floated labeled icon button" @click.prevent="changeType('rss')"><i class="feed icon"></i> + <translate translate-context="Content/Search/Input.Label/Noun">RSS</translate> + </button> + <div class="or"></div> + <button class="ui right floated right labeled icon button" @click.prevent="changeType('artists')"><i class="globe icon"></i> + <translate translate-context="Content/Search/Input.Label/Noun">Fediverse</translate> + </button> + </div> + <div v-else> <form id="remote-search" :class="['ui', {loading: isLoading}, 'form']" @submit.stop.prevent="submit"> <div v-if="errors.length > 0" role="alert" class="ui negative message"> <h3 class="header"><translate translate-context="Content/*/Error message.Title">Error while fetching object</translate></h3> @@ -14,7 +23,7 @@ <p v-if="type === 'rss'"> <translate translate-context="Content/Fetch/Paragraph">Paste here the RSS url or the fediverse address to subscribe to its feed.</translate> </p> - <p v-else> + <p v-else-if="type === 'artists'"> <translate translate-context="Content/Fetch/Paragraph">Use this form to retrieve an object hosted somewhere else in the fediverse.</translate> </p> <input type="text" name="object-id" id="object-id" :placeholder="labels.fieldPlaceholder" v-model="id" required> @@ -54,7 +63,7 @@ export default { if (this.type === 'rss') { this.rssSubscribe() - } else { + } else if (this.type === 'artists') { this.createFetch() } } @@ -109,6 +118,9 @@ export default { }, methods: { + changeType(newType) { + this.type = newType + }, submit () { if (this.type === 'rss') { return this.rssSubscribe() diff --git a/front/src/components/audio/artist/Card.vue b/front/src/components/audio/artist/Card.vue index 46533fed9345d5b4f7d2c5cb0e3ded8c4808937d..f51c48bd6a007d58d01c827a5b24601dc52969fd 100644 --- a/front/src/components/audio/artist/Card.vue +++ b/front/src/components/audio/artist/Card.vue @@ -15,7 +15,8 @@ <tags-list label-classes="tiny" :truncate-size="20" :limit="2" :show-more="false" :tags="artist.tags"></tags-list> </div> <div class="extra content"> - <translate translate-context="*/*/*" :translate-params="{count: artist.tracks_count}" :translate-n="artist.tracks_count" translate-plural="%{ count } tracks">%{ count } track</translate> + <translate v-if="artist.content_category === 'music'" translate-context="*/*/*" :translate-params="{count: artist.tracks_count}" :translate-n="artist.tracks_count" translate-plural="%{ count } tracks">%{ count } track</translate> + <translate v-else translate-context="*/*/*" :translate-params="{count: artist.tracks_count}" :translate-n="artist.tracks_count" translate-plural="%{ count } episodes">%{ count } episode</translate> <play-button class="right floated basic icon" :dropdown-only="true" :is-playable="artist.is_playable" :dropdown-icon-classes="['ellipsis', 'horizontal', 'large really discrete']" :artist="artist"></play-button> </div> </div> diff --git a/front/src/components/library/Podcasts.vue b/front/src/components/library/Podcasts.vue index 410c91aad60353eda3689506bb4549272738d71a..e4683407a83d87faf51acf273e55321f02daa499 100644 --- a/front/src/components/library/Podcasts.vue +++ b/front/src/components/library/Podcasts.vue @@ -94,11 +94,11 @@ </h2> <div class="scrolling content" ref="modalContent"> <remote-search-form - type="rss" + type="both" :show-submit="false" :standalone="false" @subscribed="showSubscribeModal = false; fetchData()" - :redirect="false"></remote-search-form> + :redirect="true"></remote-search-form> </div> <div class="actions"> <button class="ui basic deny button"> diff --git a/front/src/components/semantic/Modal.vue b/front/src/components/semantic/Modal.vue index 5ae134b218639d40caa07af5383741ef649dd657..785aebece036b0e8961550a6ea9ee12f3571fdf1 100644 --- a/front/src/components/semantic/Modal.vue +++ b/front/src/components/semantic/Modal.vue @@ -29,6 +29,7 @@ export default { if (this.control) { $(this.$el).modal('hide') } + this.focusTrap.deactivate() $(this.$el).remove() }, methods: { diff --git a/front/src/views/channels/SubscriptionsList.vue b/front/src/views/channels/SubscriptionsList.vue index 27f92ca1fce51ce85462b0a6ee903906270de2cb..6ac12fd9da60dc29d0b4fb616f5d4ebbefbe7ba0 100644 --- a/front/src/views/channels/SubscriptionsList.vue +++ b/front/src/views/channels/SubscriptionsList.vue @@ -16,11 +16,11 @@ </h2> <div class="scrolling content" ref="modalContent"> <remote-search-form - type="rss" + type="both" :show-submit="false" :standalone="false" @subscribed="showSubscribeModal = false; reloadWidget()" - :redirect="false"></remote-search-form> + :redirect="true"></remote-search-form> </div> <div class="actions"> <button class="ui basic deny button">