Added keywords

This commit is contained in:
WardPearce
2024-04-14 18:46:53 +12:00
parent e98e47a7cb
commit 539b48ecbc
5 changed files with 56 additions and 2 deletions
+4 -1
View File
@@ -8,5 +8,8 @@
"materialious/src/lib/i18n/locales"
],
"i18n-ally.extract.autoDetect": true,
"i18n-ally.keystyle": "nested"
"i18n-ally.keystyle": "nested",
"cSpell.words": [
"Materialious"
]
}
@@ -103,6 +103,26 @@
{$_('unsubscribe')}
{/if}
</button>
<button class="border">
<i>share</i>
<span>{$_('player.share.title')}</span>
<menu class="no-wrap">
<a
href="#share"
on:click={async () => {
await navigator.clipboard.writeText(location.href);
}}>{$_('player.share.materialiousLink')}</a
>
<a
href="#share"
on:click={async () => {
await navigator.clipboard.writeText(
`https://www.youtube.com/channel/${data.channel.authorId}`
);
}}>{$_('player.share.youtubeLink')}</a
>
</menu>
</button>
</div>
<div class="tabs left-align scroll">
@@ -72,6 +72,29 @@
<article style="max-height: 200px;" class="scroll no-padding no-elevate no-round">
<p style="white-space: pre-line;word-wrap: break-word;">{data.playlist.description}</p>
</article>
<div class="space"></div>
<button class="border no-margin">
<i>share</i>
<span>{$_('player.share.title')}</span>
<menu class="no-wrap">
<a
href="#share"
on:click={async () => {
await navigator.clipboard.writeText(location.href);
}}>{$_('player.share.materialiousLink')}</a
>
<a
href="#share"
on:click={async () => {
await navigator.clipboard.writeText(
`https://www.youtube.com/playlist?list=${data.playlist.playlistId}`
);
}}>{$_('player.share.youtubeLink')}</a
>
</menu>
</button>
</article>
{#if videos}
@@ -546,6 +546,14 @@
{/if}
{/if}
</div>
<nav class="scroll">
{#if data.video.keywords}
{#each data.video.keywords as keyword}
<a href={`/search/${encodeURIComponent(keyword)}`} class="chip">{keyword}</a>
{/each}
{/if}
</nav>
</details>
</article>
@@ -20,7 +20,7 @@ export async function load({ params, url }) {
error(500, errorMessage);
}
let downloadOptions: { title: string; url: string }[] = [];
let downloadOptions: { title: string; url: string; }[] = [];
if (!video.hlsUrl) {
video.formatStreams.forEach((format) => {