Skip to content

Commit fcf629f

Browse files
committed
check for apple tv+
1 parent 314e57d commit fcf629f

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

client/app/components/Content/Subpage.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@
2525
</span>
2626
</div>
2727
<div class="big-teaser-buttons no-select" :class="{'without-watchlist': item.rating != null || ! auth}">
28-
<a v-if="isOnNetflix(item.homepage)" :href="item.homepage" target="_blank" class="button-netflix">
28+
<a v-if="isOn('netflix', item.homepage)" :href="item.homepage" target="_blank" class="button-netflix">
2929
Netflix
3030
</a>
31-
<a v-if="isOnAmazon(item.homepage)" :href="item.homepage" target="_blank" class="button-amazon">
32-
Amazon
31+
<a v-if="isOn('amazon', item.homepage)" :href="item.homepage" target="_blank" class="button-amazon">
32+
Amazon Prime
3333
</a>
34-
<a v-if="isOnDisney(item.homepage)" :href="item.homepage" target="_blank" class="button-disney">
34+
<a v-if="isOn('disney', item.homepage)" :href="item.homepage" target="_blank" class="button-disney">
3535
Disney+
3636
</a>
37+
<a v-if="isOn('apple', item.homepage)" :href="item.homepage" target="_blank" class="button-apple">
38+
Apple TV+
39+
</a>
3740
<span @click="openTrailer()" v-if="item.youtube_key" class="button-trailer"><i class="icon-trailer"></i> {{ lang('watch trailer') }}</span>
3841
<!-- <span class="button-watchlist" v-if="item.rating == null && auth && ! rated" @click="addToWatchlist(item)"><i class="icon-watchlist"></i> {{ lang('add to watchlist') }}</span>-->
3942
<!-- <span class="button-watchlist" v-if="item.watchlist && auth && ! rated" @click="removeItem()"><i class="icon-watchlist-remove"></i> {{ lang('remove from watchlist') }}</span>-->

client/app/helpers/item.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@ export default {
1616
}
1717
},
1818

19-
isOnNetflix(homepage) {
20-
return homepage && homepage.includes('netflix');
21-
},
22-
23-
isOnAmazon(homepage) {
24-
return homepage && homepage.includes('amazon');
25-
},
26-
27-
isOnDisney(homepage) {
28-
return homepage && homepage.includes('disney');
19+
isOn(type, homepage) {
20+
return homepage && homepage.includes(type);
2921
},
3022

3123
genreAsString(genre) {

client/resources/sass/components/_subpage.scss

+18
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,24 @@
154154
}
155155
}
156156

157+
158+
.button-apple {
159+
background: #444444;
160+
color: #fff;
161+
162+
i {
163+
font-style: normal;
164+
}
165+
166+
&:hover {
167+
background: lighten(#444444, 10%);
168+
}
169+
170+
&:active {
171+
background: #444444;
172+
}
173+
}
174+
157175
.icon-trailer {
158176
background: url(../../../public/assets/img/trailer.png);
159177
width: 7px;

0 commit comments

Comments
 (0)