mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Add a channel sharing panel
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<v-dialog v-model="dialogOpen" width="720">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn outlined small v-bind="attrs" class="ml-2" v-on="on">
|
||||
{{ $t('channel_sharing_panel.share') }}
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
{{ $t('channel_sharing_panel.title') }}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field readonly :value="value" />
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ChannelSharingPanel',
|
||||
props: ['channelId'],
|
||||
data: () => ({
|
||||
dialogOpen: false
|
||||
}),
|
||||
computed: {
|
||||
value () {
|
||||
const u = new URL(window.location.href)
|
||||
for (const k of u.searchParams.keys()) {
|
||||
u.searchParams.delete(k)
|
||||
}
|
||||
u.hash = ''
|
||||
u.pathname = '/channel/' + this.channelId
|
||||
return u.href
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -11,6 +11,7 @@
|
||||
<span class="text-h5 ml-4">
|
||||
{{ channel.name }}
|
||||
<v-icon v-if="channel.verified">{{ mdiCheckCircleOutline }}</v-icon>
|
||||
<ChannelSharingPanel :channel-id="channel.id" />
|
||||
<br />
|
||||
<span class="text-subtitle-1">
|
||||
<ExpandableNumber :num="channel.subscriberCount" message-key="counts.subscribers" />
|
||||
@@ -47,6 +48,7 @@ import VideoItem from '@/components/Video/VideoItem.vue'
|
||||
import SubscriptionButton from '@/components/SubscriptionButton'
|
||||
import GridRow from '@/components/Grid/GridRow'
|
||||
import GridCol from '@/components/Grid/GridCol'
|
||||
import ChannelSharingPanel from '@/components/ChannelSharingPanel'
|
||||
|
||||
import { LibPiped } from '@/tools/libpiped'
|
||||
|
||||
@@ -153,6 +155,7 @@ export default {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ChannelSharingPanel,
|
||||
ExpandableNumber,
|
||||
GridRow,
|
||||
GridCol,
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
"music_playlists": "Playlists (YouTube Music)"
|
||||
}
|
||||
},
|
||||
"channel_sharing_panel": {
|
||||
"title": "Share this channel",
|
||||
"share": "Share"
|
||||
},
|
||||
"video_sharing_panel": {
|
||||
"title": "Share this video",
|
||||
"share": "Share",
|
||||
|
||||
Reference in New Issue
Block a user