mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-05-30 21:51:40 +00:00
Add Watch on YouTube button
This commit is contained in:
parent
64a2718e31
commit
f0fdd84bae
@ -35,6 +35,25 @@
|
|||||||
<font-awesome-icon icon="rss" />
|
<font-awesome-icon icon="rss" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<!-- Watch on YouTube button: For large screens -->
|
||||||
|
<a
|
||||||
|
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||||
|
:href="`https://youtube.com/channel/${this.channel.id}`"
|
||||||
|
class="btn lt-lg:hidden ml-3"
|
||||||
|
>
|
||||||
|
<i18n-t keypath="player.watch_on" tag="strong">
|
||||||
|
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||||
|
</i18n-t>
|
||||||
|
</a>
|
||||||
|
<!-- Watch on YouTube button: For small screens -->
|
||||||
|
<a
|
||||||
|
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||||
|
:href="`https://youtube.com/channel/${this.channel.id}`"
|
||||||
|
class="btn lg:hidden ml-3"
|
||||||
|
>
|
||||||
|
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="flex mt-4 mb-2">
|
<div class="flex mt-4 mb-2">
|
||||||
<button
|
<button
|
||||||
v-for="(tab, index) in tabs"
|
v-for="(tab, index) in tabs"
|
||||||
|
@ -20,9 +20,28 @@
|
|||||||
<button class="btn mr-1" @click="downloadPlaylistAsTxt">
|
<button class="btn mr-1" @click="downloadPlaylistAsTxt">
|
||||||
{{ $t("actions.download_as_txt") }}
|
{{ $t("actions.download_as_txt") }}
|
||||||
</button>
|
</button>
|
||||||
<a class="btn" :href="getRssUrl">
|
<a class="btn mr-1" :href="getRssUrl">
|
||||||
<font-awesome-icon icon="rss" />
|
<font-awesome-icon icon="rss" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<!-- Watch on YouTube button: For large screens -->
|
||||||
|
<a
|
||||||
|
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||||
|
:href="`https://www.youtube.com/playlist?list=${this.$route.query.list}`"
|
||||||
|
class="btn lt-lg:hidden"
|
||||||
|
>
|
||||||
|
<i18n-t keypath="player.watch_on" tag="strong">
|
||||||
|
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||||
|
</i18n-t>
|
||||||
|
</a>
|
||||||
|
<!-- Watch on YouTube button: For small screens -->
|
||||||
|
<a
|
||||||
|
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||||
|
:href="`https://www.youtube.com/playlist?list=${this.$route.query.list}`"
|
||||||
|
class="btn lg:hidden"
|
||||||
|
>
|
||||||
|
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -96,6 +96,16 @@
|
|||||||
@change="onChange($event)"
|
@change="onChange($event)"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="pref" for="chkShowWatchOnYouTube">
|
||||||
|
<strong v-t="'actions.show_watch_on_youtube'" />
|
||||||
|
<input
|
||||||
|
id="chkShowWatchOnYouTube"
|
||||||
|
v-model="showWatchOnYouTube"
|
||||||
|
class="checkbox"
|
||||||
|
type="checkbox"
|
||||||
|
@change="onChange($event)"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<label class="pref" for="chkStoreSearchHistory">
|
<label class="pref" for="chkStoreSearchHistory">
|
||||||
<strong v-t="'actions.store_search_history'" />
|
<strong v-t="'actions.store_search_history'" />
|
||||||
<input
|
<input
|
||||||
@ -368,6 +378,7 @@ export default {
|
|||||||
minimizeComments: false,
|
minimizeComments: false,
|
||||||
minimizeDescription: false,
|
minimizeDescription: false,
|
||||||
minimizeRecommendations: false,
|
minimizeRecommendations: false,
|
||||||
|
showWatchOnYouTube: false,
|
||||||
watchHistory: false,
|
watchHistory: false,
|
||||||
searchHistory: false,
|
searchHistory: false,
|
||||||
hideWatched: false,
|
hideWatched: false,
|
||||||
@ -504,6 +515,7 @@ export default {
|
|||||||
this.minimizeComments = this.getPreferenceBoolean("minimizeComments", false);
|
this.minimizeComments = this.getPreferenceBoolean("minimizeComments", false);
|
||||||
this.minimizeDescription = this.getPreferenceBoolean("minimizeDescription", false);
|
this.minimizeDescription = this.getPreferenceBoolean("minimizeDescription", false);
|
||||||
this.minimizeRecommendations = this.getPreferenceBoolean("minimizeRecommendations", false);
|
this.minimizeRecommendations = this.getPreferenceBoolean("minimizeRecommendations", false);
|
||||||
|
this.showWatchOnYouTube = this.getPreferenceBoolean("showWatchOnYouTube", false);
|
||||||
this.watchHistory = this.getPreferenceBoolean("watchHistory", false);
|
this.watchHistory = this.getPreferenceBoolean("watchHistory", false);
|
||||||
this.searchHistory = this.getPreferenceBoolean("searchHistory", false);
|
this.searchHistory = this.getPreferenceBoolean("searchHistory", false);
|
||||||
this.selectedLanguage = this.getPreferenceString("hl", await this.defaultLanguage);
|
this.selectedLanguage = this.getPreferenceString("hl", await this.defaultLanguage);
|
||||||
@ -563,6 +575,7 @@ export default {
|
|||||||
localStorage.setItem("minimizeComments", this.minimizeComments);
|
localStorage.setItem("minimizeComments", this.minimizeComments);
|
||||||
localStorage.setItem("minimizeDescription", this.minimizeDescription);
|
localStorage.setItem("minimizeDescription", this.minimizeDescription);
|
||||||
localStorage.setItem("minimizeRecommendations", this.minimizeRecommendations);
|
localStorage.setItem("minimizeRecommendations", this.minimizeRecommendations);
|
||||||
|
localStorage.setItem("showWatchOnYouTube", this.showWatchOnYouTube);
|
||||||
localStorage.setItem("watchHistory", this.watchHistory);
|
localStorage.setItem("watchHistory", this.watchHistory);
|
||||||
localStorage.setItem("searchHistory", this.searchHistory);
|
localStorage.setItem("searchHistory", this.searchHistory);
|
||||||
if (!this.searchHistory) localStorage.removeItem("search_history");
|
if (!this.searchHistory) localStorage.removeItem("search_history");
|
||||||
|
@ -108,7 +108,25 @@
|
|||||||
>
|
>
|
||||||
<font-awesome-icon icon="rss" />
|
<font-awesome-icon icon="rss" />
|
||||||
</a>
|
</a>
|
||||||
<!-- watch on youtube button -->
|
<!-- Watch on YouTube button: For large screens -->
|
||||||
|
<a
|
||||||
|
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||||
|
:href="`https://youtu.be/${getVideoId()}`"
|
||||||
|
class="btn lt-lg:hidden"
|
||||||
|
>
|
||||||
|
<i18n-t keypath="player.watch_on" tag="strong">
|
||||||
|
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||||
|
</i18n-t>
|
||||||
|
</a>
|
||||||
|
<!-- Watch on YouTube button: For small screens -->
|
||||||
|
<a
|
||||||
|
v-if="this.getPreferenceBoolean('showWatchOnYouTube', false)"
|
||||||
|
:href="`https://youtu.be/${getVideoId()}`"
|
||||||
|
class="btn lg:hidden"
|
||||||
|
>
|
||||||
|
<font-awesome-icon class="mx-1.5" :icon="['fab', 'youtube']" />
|
||||||
|
</a>
|
||||||
|
<!-- Share Dialog -->
|
||||||
<button class="btn" @click="showShareModal = !showShareModal">
|
<button class="btn" @click="showShareModal = !showShareModal">
|
||||||
<i18n-t class="lt-lg:hidden" keypath="actions.share" tag="strong"></i18n-t>
|
<i18n-t class="lt-lg:hidden" keypath="actions.share" tag="strong"></i18n-t>
|
||||||
<font-awesome-icon class="mx-1.5" icon="fa-share" />
|
<font-awesome-icon class="mx-1.5" icon="fa-share" />
|
||||||
|
@ -90,6 +90,7 @@
|
|||||||
"delete_account": "Delete Account",
|
"delete_account": "Delete Account",
|
||||||
"logout": "Logout from this device",
|
"logout": "Logout from this device",
|
||||||
"minimize_recommendations_default": "Minimize Recommendations by default",
|
"minimize_recommendations_default": "Minimize Recommendations by default",
|
||||||
|
"show_watch_on_youtube": "Show Watch on YouTube button",
|
||||||
"invalidate_session": "Logout all devices",
|
"invalidate_session": "Logout all devices",
|
||||||
"different_auth_instance": "Use a different instance for authentication",
|
"different_auth_instance": "Use a different instance for authentication",
|
||||||
"instance_auth_selection": "Autentication Instance Selection",
|
"instance_auth_selection": "Autentication Instance Selection",
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
faServer,
|
faServer,
|
||||||
faDonate,
|
faDonate,
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { faGithub, faBitcoin } from "@fortawesome/free-brands-svg-icons";
|
import { faGithub, faBitcoin, faYoutube } from "@fortawesome/free-brands-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
||||||
library.add(
|
library.add(
|
||||||
faEye,
|
faEye,
|
||||||
@ -31,6 +31,7 @@ library.add(
|
|||||||
faCheck,
|
faCheck,
|
||||||
faHeart,
|
faHeart,
|
||||||
faHeadphones,
|
faHeadphones,
|
||||||
|
faYoutube,
|
||||||
faRss,
|
faRss,
|
||||||
faChevronLeft,
|
faChevronLeft,
|
||||||
faLevelDownAlt,
|
faLevelDownAlt,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user