From 615205de86e403a7b1e11b94b5415610bb80507c Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:37:20 +0300 Subject: [PATCH] Adds country name to channel name --- src/components/ChannelItem.svelte | 14 +++++++++----- src/components/ChannelPopup.svelte | 2 +- src/components/EditButton.svelte | 2 +- .../channels/[country]/[name]/+page.server.js | 1 + src/pages/channels/[country]/[name]/+page.svelte | 6 +++--- src/store.js | 7 +++++++ 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/ChannelItem.svelte b/src/components/ChannelItem.svelte index 815caa468..5a5b1e514 100644 --- a/src/components/ChannelItem.svelte +++ b/src/components/ChannelItem.svelte @@ -16,7 +16,11 @@ let prevUrl = '/' const onOpened = () => { prevUrl = window.location.href - window.history.pushState({}, `${channel.name} • iptv-org`, `/channels/${country}/${name}`) + window.history.pushState( + {}, + `${channel.displayName} • iptv-org`, + `/channels/${country}/${name}` + ) } const onClose = () => { window.history.pushState({}, `iptv-org`, prevUrl) @@ -24,7 +28,7 @@ const showStreams = () => open( StreamsPopup, - { streams, title: channel.name }, + { streams, title: channel.displayName }, { transitionBgProps: { duration: 0 }, transitionWindowProps: { duration: 0 } } ) const showChannelData = () => { @@ -74,7 +78,7 @@ loading="lazy" referrerpolicy="no-referrer" src={channel.logo} - alt={channel.name} + alt={channel.displayName} /> {/if} @@ -88,9 +92,9 @@ href="/channels/{country}/{name}" tabindex="0" class="font-normal text-gray-600 dark:text-white hover:underline hover:text-blue-500 line-clamp-1" - title={channel.name} + title={channel.displayName} > - {channel.name} + {channel.displayName} {#if channel.is_closed}