Added link to origin pod for track, album, artist, profile, channel and library
This commit is contained in:
parent
b1ae13ab0a
commit
89037a76db
|
@ -20,6 +20,15 @@
|
||||||
<button class="ui floating dropdown circular icon basic button" :title="labels.more" v-dropdown="{direction: 'downward'}">
|
<button class="ui floating dropdown circular icon basic button" :title="labels.more" v-dropdown="{direction: 'downward'}">
|
||||||
<i class="ellipsis vertical icon"></i>
|
<i class="ellipsis vertical icon"></i>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
<a
|
||||||
|
:href="object.fid"
|
||||||
|
v-if="domain != $store.getters['instance/domain']"
|
||||||
|
target="_blank"
|
||||||
|
class="basic item">
|
||||||
|
<i class="external icon"></i>
|
||||||
|
<translate :translate-params="{domain: domain}" translate-context="Content/*/Button.Label/Verb">View on %{ domain }</translate>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
v-if="isEmbedable"
|
v-if="isEmbedable"
|
||||||
|
@ -86,6 +95,7 @@ import EmbedWizard from "@/components/audio/EmbedWizard"
|
||||||
import Modal from '@/components/semantic/Modal'
|
import Modal from '@/components/semantic/Modal'
|
||||||
import ReportMixin from '@/components/mixins/Report'
|
import ReportMixin from '@/components/mixins/Report'
|
||||||
|
|
||||||
|
import {getDomain} from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ReportMixin],
|
mixins: [ReportMixin],
|
||||||
|
@ -108,6 +118,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
domain () {
|
||||||
|
if (this.object) {
|
||||||
|
return getDomain(this.object.fid)
|
||||||
|
}
|
||||||
|
},
|
||||||
labels() {
|
labels() {
|
||||||
return {
|
return {
|
||||||
more: this.$pgettext('*/*/Button.Label/Noun', "More…"),
|
more: this.$pgettext('*/*/Button.Label/Noun', "More…"),
|
||||||
|
|
|
@ -57,6 +57,15 @@
|
||||||
<button class="ui floating dropdown icon button" ref="dropdown" v-dropdown>
|
<button class="ui floating dropdown icon button" ref="dropdown" v-dropdown>
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
<a
|
||||||
|
:href="object.fid"
|
||||||
|
v-if="domain != $store.getters['instance/domain']"
|
||||||
|
target="_blank"
|
||||||
|
class="basic item">
|
||||||
|
<i class="external icon"></i>
|
||||||
|
<translate :translate-params="{domain: domain}" translate-context="Content/*/Button.Label/Verb">View on %{ domain }</translate>
|
||||||
|
</a>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
role="button"
|
role="button"
|
||||||
v-if="publicLibraries.length > 0"
|
v-if="publicLibraries.length > 0"
|
||||||
|
@ -137,6 +146,8 @@ import RadioButton from "@/components/radios/Button"
|
||||||
import TagsList from "@/components/tags/List"
|
import TagsList from "@/components/tags/List"
|
||||||
import ReportMixin from '@/components/mixins/Report'
|
import ReportMixin from '@/components/mixins/Report'
|
||||||
|
|
||||||
|
import {getDomain} from '@/utils'
|
||||||
|
|
||||||
const FETCH_URL = "albums/"
|
const FETCH_URL = "albums/"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -205,6 +216,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
domain () {
|
||||||
|
if (this.object) {
|
||||||
|
return getDomain(this.object.fid)
|
||||||
|
}
|
||||||
|
},
|
||||||
isPlayable() {
|
isPlayable() {
|
||||||
return (
|
return (
|
||||||
this.object.albums.filter(a => {
|
this.object.albums.filter(a => {
|
||||||
|
|
|
@ -44,6 +44,14 @@
|
||||||
<button class="ui floating dropdown circular icon basic button" :title="labels.more" v-dropdown="{direction: 'downward'}">
|
<button class="ui floating dropdown circular icon basic button" :title="labels.more" v-dropdown="{direction: 'downward'}">
|
||||||
<i class="ellipsis vertical icon"></i>
|
<i class="ellipsis vertical icon"></i>
|
||||||
<div class="menu" style="right: 0; left: auto">
|
<div class="menu" style="right: 0; left: auto">
|
||||||
|
<a
|
||||||
|
:href="track.fid"
|
||||||
|
v-if="domain != $store.getters['instance/domain']"
|
||||||
|
target="_blank"
|
||||||
|
class="basic item">
|
||||||
|
<i class="external icon"></i>
|
||||||
|
<translate :translate-params="{domain: domain}" translate-context="Content/*/Button.Label/Verb">View on %{ domain }</translate>
|
||||||
|
</a>
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
v-if="publicLibraries.length > 0"
|
v-if="publicLibraries.length > 0"
|
||||||
|
@ -116,6 +124,7 @@
|
||||||
import time from "@/utils/time"
|
import time from "@/utils/time"
|
||||||
import axios from "axios"
|
import axios from "axios"
|
||||||
import url from "@/utils/url"
|
import url from "@/utils/url"
|
||||||
|
import {getDomain} from '@/utils'
|
||||||
import logger from "@/logging"
|
import logger from "@/logging"
|
||||||
import PlayButton from "@/components/audio/PlayButton"
|
import PlayButton from "@/components/audio/PlayButton"
|
||||||
import TrackFavoriteIcon from "@/components/favorites/TrackFavoriteIcon"
|
import TrackFavoriteIcon from "@/components/favorites/TrackFavoriteIcon"
|
||||||
|
@ -190,6 +199,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
domain () {
|
||||||
|
if (this.track) {
|
||||||
|
return getDomain(this.track.fid)
|
||||||
|
}
|
||||||
|
},
|
||||||
publicLibraries () {
|
publicLibraries () {
|
||||||
return this.libraries.filter(l => {
|
return this.libraries.filter(l => {
|
||||||
return l.privacy_level === 'everyone'
|
return l.privacy_level === 'everyone'
|
||||||
|
|
|
@ -51,3 +51,9 @@ export function checkRedirectToLogin (store, router) {
|
||||||
router.push({name: 'login', query: {next: router.currentRoute.fullPath}})
|
router.push({name: 'login', query: {next: router.currentRoute.fullPath}})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getDomain (url) {
|
||||||
|
let parser = document.createElement("a")
|
||||||
|
parser.href = url
|
||||||
|
return parser.hostname
|
||||||
|
}
|
|
@ -9,6 +9,14 @@
|
||||||
<button class="ui pointing dropdown icon small basic right floated button" ref="dropdown" v-dropdown="{direction: 'downward'}" style="position: absolute; right: 1em; top: 1em;">
|
<button class="ui pointing dropdown icon small basic right floated button" ref="dropdown" v-dropdown="{direction: 'downward'}" style="position: absolute; right: 1em; top: 1em;">
|
||||||
<i class="ellipsis vertical icon"></i>
|
<i class="ellipsis vertical icon"></i>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
<a
|
||||||
|
:href="object.fid"
|
||||||
|
v-if="object.domain != $store.getters['instance/domain']"
|
||||||
|
target="_blank"
|
||||||
|
class="basic item">
|
||||||
|
<i class="external icon"></i>
|
||||||
|
<translate :translate-params="{domain: object.domain}" translate-context="Content/*/Button.Label/Verb">View on %{ domain }</translate>
|
||||||
|
</a>
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
class="basic item"
|
class="basic item"
|
||||||
|
|
|
@ -84,6 +84,14 @@
|
||||||
<i class="code icon"></i>
|
<i class="code icon"></i>
|
||||||
<translate translate-context="Content/*/Button.Label/Verb">Embed</translate>
|
<translate translate-context="Content/*/Button.Label/Verb">Embed</translate>
|
||||||
</a>
|
</a>
|
||||||
|
<a
|
||||||
|
:href="object.url"
|
||||||
|
v-if="object.actor.domain != $store.getters['instance/domain']"
|
||||||
|
target="_blank"
|
||||||
|
class="basic item">
|
||||||
|
<i class="external icon"></i>
|
||||||
|
<translate :translate-params="{domain: object.actor.domain}" translate-context="Content/*/Button.Label/Verb">View on %{ domain }</translate>
|
||||||
|
</a>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a
|
<a
|
||||||
href=""
|
href=""
|
||||||
|
|
|
@ -7,6 +7,14 @@
|
||||||
<button class="ui pointing dropdown icon small basic right floated button" ref="dropdown" v-dropdown="{direction: 'downward'}" style="position: absolute; right: 1em; top: 1em;">
|
<button class="ui pointing dropdown icon small basic right floated button" ref="dropdown" v-dropdown="{direction: 'downward'}" style="position: absolute; right: 1em; top: 1em;">
|
||||||
<i class="ellipsis vertical icon"></i>
|
<i class="ellipsis vertical icon"></i>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
<a
|
||||||
|
:href="object.fid"
|
||||||
|
v-if="object.actor.domain != $store.getters['instance/domain']"
|
||||||
|
target="_blank"
|
||||||
|
class="basic item">
|
||||||
|
<i class="external icon"></i>
|
||||||
|
<translate :translate-params="{domain: object.actor.domain}" translate-context="Content/*/Button.Label/Verb">View on %{ domain }</translate>
|
||||||
|
</a>
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
class="basic item"
|
class="basic item"
|
||||||
|
|
Loading…
Reference in New Issue