Added plain URL for privileged users.
This commit is contained in:
@@ -43,6 +43,14 @@
|
||||
>{{ entity.name }}</h2>
|
||||
</a>
|
||||
|
||||
<a
|
||||
v-if="user?.abilities.some((ability) => ability.plainUrls)"
|
||||
:href="entity.url"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="plainurl"
|
||||
><Icon icon="link" /></a>
|
||||
|
||||
<Heart
|
||||
domain="entities"
|
||||
:item="entity"
|
||||
@@ -154,7 +162,7 @@ import Movies from '#/components/movies/movies.vue';
|
||||
import Domains from '#/components/domains/domains.vue';
|
||||
import Heart from '#/components/stashes/heart.vue';
|
||||
|
||||
const { pageProps, routeParams } = inject('pageContext');
|
||||
const { pageProps, routeParams, user } = inject('pageContext');
|
||||
const { entity } = pageProps;
|
||||
|
||||
const children = ref(null);
|
||||
@@ -163,9 +171,7 @@ const expanded = ref(false);
|
||||
const scrollable = computed(() => children.value?.scrollWidth > children.value?.clientWidth);
|
||||
const domain = routeParams.domain;
|
||||
|
||||
const entityUrl = (() => {
|
||||
return entity.affiliateUrl || entity.url || null;
|
||||
})();
|
||||
const entityUrl = entity.affiliateUrl || entity.url || null;
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -313,6 +319,25 @@ const entityUrl = (() => {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plainurl {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 .25rem;
|
||||
margin-top: -.25rem;
|
||||
|
||||
.icon {
|
||||
width: 1rem;
|
||||
height: auto;
|
||||
padding: .5rem;
|
||||
fill: var(--highlight);
|
||||
}
|
||||
|
||||
&:hover .icon {
|
||||
fill: var(--primary);
|
||||
}
|
||||
}
|
||||
|
||||
@media(--small-20) {
|
||||
.logo {
|
||||
padding: .5rem 1rem;
|
||||
|
||||
Reference in New Issue
Block a user