mirror of https://github.com/FreeTubeApp/FreeTube
Add confirmation popup before unsubscribing
This commit is contained in:
parent
8b16bd5d6d
commit
833355bbbd
|
@ -105,6 +105,10 @@ export default defineComponent({
|
||||||
const currentProfile = deepCopy(profile)
|
const currentProfile = deepCopy(profile)
|
||||||
|
|
||||||
if (this.isProfileSubscribed(profile)) {
|
if (this.isProfileSubscribed(profile)) {
|
||||||
|
// confirmation pop-up
|
||||||
|
if (!confirm('Are you sure you want to unsubscribe?')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => {
|
currentProfile.subscriptions = currentProfile.subscriptions.filter((channel) => {
|
||||||
return channel.id !== this.channelId
|
return channel.id !== this.channelId
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue