diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 9234895e..45eff6b9 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -36,7 +36,7 @@ $routes->addPlaceholder('slug', '[a-zA-Z0-9\-]{1,128}'); $routes->addPlaceholder('base64', '[A-Za-z0-9\.\_]+\-{0,2}'); $routes->addPlaceholder('platformType', '\bpodcasting|\bsocial|\bfunding'); $routes->addPlaceholder('postAction', '\bfavourite|\breblog|\breply'); -$routes->addPlaceholder('embeddablePlayerTheme', '\blight|\bdark|\blight-transparent|\bdark-transparent'); +$routes->addPlaceholder('embedTheme', '\blight|\bdark|\blight-transparent|\bdark-transparent'); $routes->addPlaceholder( 'uuid', '[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}', @@ -154,17 +154,13 @@ $routes->group('@(:podcastHandle)', function ($routes): void { $routes->get('oembed.xml', 'EpisodeController::oembedXML/$1/$2', [ 'as' => 'episode-oembed-xml', ]); - $routes->group('embeddable-player', function ($routes): void { - $routes->get('/', 'EpisodeController::embeddablePlayer/$1/$2', [ - 'as' => 'embeddable-player', + $routes->group('embed', function ($routes): void { + $routes->get('/', 'EpisodeController::embed/$1/$2', [ + 'as' => 'embed', ]); - $routes->get( - '(:embeddablePlayerTheme)', - 'EpisodeController::embeddablePlayer/$1/$2/$3', - [ - 'as' => 'embeddable-player-theme', - ], - ); + $routes->get('(:embedTheme)', 'EpisodeController::embed/$1/$2/$3', [ + 'as' => 'embed-theme', + ],); }); }); diff --git a/app/Controllers/EpisodeController.php b/app/Controllers/EpisodeController.php index d5ddd9f7..0b439a61 100644 --- a/app/Controllers/EpisodeController.php +++ b/app/Controllers/EpisodeController.php @@ -138,7 +138,7 @@ class EpisodeController extends BaseController return $cachedView; } - public function embeddablePlayer(string $theme = 'light-transparent'): string + public function embed(string $theme = 'light-transparent'): string { header('Content-Security-Policy: frame-ancestors http://*:* https://*:*'); @@ -150,13 +150,13 @@ class EpisodeController extends BaseController $session = Services::session(); $session->start(); if (isset($_SERVER['HTTP_REFERER'])) { - $session->set('embeddable_player_domain', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)); + $session->set('embed_domain', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)); } $locale = service('request') ->getLocale(); - $cacheName = "page_podcast#{$this->podcast->id}_episode#{$this->episode->id}_embeddable_player_{$theme}_{$locale}"; + $cacheName = "page_podcast#{$this->podcast->id}_episode#{$this->episode->id}_embed_{$theme}_{$locale}"; if (! ($cachedView = cache($cacheName))) { $themeData = EpisodeModel::$themes[$theme]; @@ -173,7 +173,7 @@ class EpisodeController extends BaseController ); // The page cache is set to a decade so it is deleted manually upon podcast update - return view('embeddable_player', $data, [ + return view('embed', $data, [ 'cache' => $secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode : DECADE, @@ -196,7 +196,7 @@ class EpisodeController extends BaseController 'author_url' => $this->podcast->link, 'html' => '', 'width' => 600, 'height' => 144, @@ -226,7 +226,7 @@ class EpisodeController extends BaseController 'html', htmlentities( '', ), ); diff --git a/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php b/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php index 660f6578..febec481 100644 --- a/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php +++ b/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php @@ -41,7 +41,7 @@ class AddPodcastsPlatforms extends Migration 'constraint' => 1, 'default' => 0, ], - 'is_on_embeddable_player' => [ + 'is_on_embed' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, diff --git a/app/Entities/Episode.php b/app/Entities/Episode.php index c01219dd..5f2689b8 100644 --- a/app/Entities/Episode.php +++ b/app/Entities/Episode.php @@ -78,7 +78,7 @@ use RuntimeException; * * @property Person[] $persons; * @property Soundbite[] $soundbites; - * @property string $embeddable_player_url; + * @property string $embed_url; */ class Episode extends Entity { @@ -96,7 +96,7 @@ class Episode extends Entity protected string $audio_file_opengraph_url; - protected string $embeddable_player_url; + protected string $embed_url; protected Image $image; @@ -422,18 +422,12 @@ class Episode extends Entity return url_to('episode', $this->getPodcast()->handle, $this->attributes['slug']); } - public function getEmbeddablePlayerUrl(string $theme = null): string + public function getEmbedUrl(string $theme = null): string { return base_url( $theme - ? route_to( - 'embeddable-player-theme', - $this->getPodcast() - ->handle, - $this->attributes['slug'], - $theme, - ) - : route_to('embeddable-player', $this->getPodcast()->handle, $this->attributes['slug']), + ? route_to('embed-theme', $this->getPodcast() ->handle, $this->attributes['slug'], $theme,) + : route_to('embed', $this->getPodcast()->handle, $this->attributes['slug']), ); } diff --git a/app/Entities/Platform.php b/app/Entities/Platform.php index 34965c94..0d43f89f 100644 --- a/app/Entities/Platform.php +++ b/app/Entities/Platform.php @@ -21,7 +21,7 @@ use CodeIgniter\Entity\Entity; * @property string|null $link_url * @property string|null $link_content * @property bool|null $is_visible - * @property bool|null $is_on_embeddable_player + * @property bool|null $is_on_embed */ class Platform extends Entity { @@ -37,6 +37,6 @@ class Platform extends Entity 'link_url' => '?string', 'link_content' => '?string', 'is_visible' => '?boolean', - 'is_on_embeddable_player' => '?boolean', + 'is_on_embed' => '?boolean', ]; } diff --git a/app/Helpers/components_helper.php b/app/Helpers/components_helper.php index 2fd41ade..00474d3c 100644 --- a/app/Helpers/components_helper.php +++ b/app/Helpers/components_helper.php @@ -106,9 +106,9 @@ if (! function_exists('publication_pill')) { { $class = match ($publicationStatus) { 'published' => 'text-pine-600 border-pine-600 bg-pine-50', - 'scheduled' => 'text-red-600 border-red-600 bg-red-50', - 'not_published' => 'text-gray-600 border-gray-600 bg-gray-50', - default => 'text-gray-600 border-gray-600 bg-gray-50', + 'scheduled' => 'text-red-600 border-red-600 bg-red-50', + 'not_published' => 'text-gray-600 border-gray-600 bg-gray-50', + default => 'text-gray-600 border-gray-600 bg-gray-50', }; $label = lang('Episode.publication_status.' . $publicationStatus); @@ -292,7 +292,10 @@ if (! function_exists('audio_player')) { if (! function_exists('relative_time')) { function relative_time(Time $time, string $class = ''): string { - $translatedDate = lang('Common.mediumDate', [$time]); + $formatter = new IntlDateFormatter(service( + 'request' + )->getLocale(), IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); + $translatedDate = $time->toLocalizedString($formatter->getPattern()); $datetime = $time->format(DateTime::ISO8601); return << 'No', 'cancel' => 'Cancel', 'optional' => 'Optional', - 'more' => 'More', - 'no_data' => 'No data found!', 'close' => 'Close', - 'edit' => 'Edit', - 'copy' => 'Copy', - 'copied' => 'Copied!', 'home' => 'Home', 'explicit' => 'Explicit', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Powered by {castopod}', - 'pageInfo' => 'Page {currentPage} out of {pageCount}', 'go_back' => 'Go back', 'play_episode_button' => [ 'play' => 'Play', diff --git a/app/Language/en/Episode.php b/app/Language/en/Episode.php index 8df38652..74c32b3f 100644 --- a/app/Language/en/Episode.php +++ b/app/Language/en/Episode.php @@ -19,7 +19,7 @@ return [ one {# person} other {# persons} }', - 'persons_list' => 'Persons for {episodeTitle}', + 'persons_list' => 'Persons', 'back_to_episodes' => 'Back to episodes of {podcast}', 'comments' => 'Comments', 'activity' => 'Activity', diff --git a/app/Language/en/Podcast.php b/app/Language/en/Podcast.php index 9896a00a..c3dd5040 100644 --- a/app/Language/en/Podcast.php +++ b/app/Language/en/Podcast.php @@ -9,21 +9,7 @@ declare(strict_types=1); */ return [ - 'all_podcasts' => 'All podcasts', - 'no_podcast' => 'No podcast found!', - 'create' => 'Create podcast', - 'import' => 'Import podcast', - 'new_episode' => 'New Episode', 'feed' => 'RSS Podcast feed', - 'view' => 'View podcast', - 'edit' => 'Edit podcast', - 'delete' => 'Delete podcast', - 'see_episodes' => 'See episodes', - 'see_contributors' => 'See contributors', - 'go_to_page' => 'Go to page', - 'latest_episodes' => 'Latest episodes', - 'see_all_episodes' => 'See all episodes', - 'by' => 'By {publisher}', 'season' => 'Season {seasonNumber}', 'list_of_episodes_year' => '{year} episodes ({episodeCount})', 'list_of_episodes_season' => diff --git a/app/Language/fr/Common.php b/app/Language/fr/Common.php index c5694c39..6c28fe3f 100644 --- a/app/Language/fr/Common.php +++ b/app/Language/fr/Common.php @@ -13,18 +13,11 @@ return [ 'no' => 'Non', 'cancel' => 'Annuler', 'optional' => 'Optionnel', - 'more' => 'Plus', - 'no_data' => 'Aucune donnée trouvée !', 'close' => 'Fermer', 'edit' => 'Modifier', - 'copy' => 'Copier', - 'copied' => 'Copié !', 'home' => 'Accueil', 'explicit' => 'Explicite', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Propulsé par {castopod}', - 'actions' => 'Actions', - 'pageInfo' => 'Page {currentPage} sur {pageCount}', 'go_back' => 'Retour en arrière', 'play_episode_button' => [ 'play' => 'Lire', diff --git a/app/Language/fr/Episode.php b/app/Language/fr/Episode.php index ee8a1e4b..fc848d9f 100644 --- a/app/Language/fr/Episode.php +++ b/app/Language/fr/Episode.php @@ -19,7 +19,7 @@ return [ one {# intervenant·e} other {# intervenant·e·s} }', - 'persons_list' => 'Liste des intervenant·e·s', + 'persons_list' => 'Intervenant·e·s', 'back_to_episodes' => 'Retour aux épisodes de {podcast}', 'comments' => 'Commentaires', 'activity' => 'Activité', diff --git a/app/Language/fr/Podcast.php b/app/Language/fr/Podcast.php index d9d0a35d..d74d1f8d 100644 --- a/app/Language/fr/Podcast.php +++ b/app/Language/fr/Podcast.php @@ -9,21 +9,7 @@ declare(strict_types=1); */ return [ - 'all_podcasts' => 'Tous les podcasts', - 'no_podcast' => 'Aucun podcast trouvé !', - 'create' => 'Créer un podcast', - 'import' => 'Importer un podcast', - 'new_episode' => 'Créer un épisode', 'feed' => 'Podcast RSS feed', - 'view' => 'Voir le podcast', - 'edit' => 'Modifier le podcast', - 'delete' => 'Supprimer le podcast', - 'see_episodes' => 'Voir les épisodes', - 'see_contributors' => 'Voir les contributeurs', - 'go_to_page' => 'Aller à la page', - 'latest_episodes' => 'Derniers épisodes', - 'see_all_episodes' => 'Voir tous les épisodes', - 'by' => 'Par {publisher}', 'season' => 'Saison {seasonNumber}', 'list_of_episodes_year' => 'Épisodes de {year} ({episodeCount})', 'list_of_episodes_season' => @@ -52,5 +38,5 @@ return [ one {# intervenant·e} other {# intervenant·e·s} }', - 'persons_list' => 'Liste des intervenant·e·s', + 'persons_list' => 'Intervenant·e·s', ]; diff --git a/app/Models/PlatformModel.php b/app/Models/PlatformModel.php index 5eb57279..fb88923c 100644 --- a/app/Models/PlatformModel.php +++ b/app/Models/PlatformModel.php @@ -102,7 +102,7 @@ class PlatformModel extends Model ! ($found = cache("podcast#{$podcastId}_platforms_{$platformType}_withLinks")) ) { $found = $this->select( - 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embeddable_player', + 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embed', ) ->join( 'podcasts_platforms', @@ -127,7 +127,7 @@ class PlatformModel extends Model $cacheName = "podcast#{$podcastId}_platforms_{$platformType}"; if (! ($found = cache($cacheName))) { $found = $this->select( - 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embeddable_player', + 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embed', ) ->join('podcasts_platforms', 'podcasts_platforms.platform_slug = platforms.slug') ->where('podcasts_platforms.podcast_id', $podcastId) diff --git a/app/Resources/js/embed.ts b/app/Resources/js/embed.ts index 4689cf43..9bad2538 100644 --- a/app/Resources/js/embed.ts +++ b/app/Resources/js/embed.ts @@ -35,6 +35,14 @@ import { import "@vime/core/themes/default.css"; import "@vime/core/themes/light.css"; +// Register Castopod's icons library +const library: HTMLVmIconLibraryElement | null = document.querySelector( + 'vm-icon-library[name="castopod-icons"]' +); +if (library) { + library.resolver = (iconName) => `/assets/icons/${iconName}.svg`; +} + // Vime elements for audio player customElements.define("vm-player", VmPlayer); customElements.define("vm-file", VmFile); @@ -68,11 +76,3 @@ customElements.define("vm-menu-radio-group", VmMenuRadioGroup); customElements.define("vm-menu-radio", VmMenuRadio); customElements.define("vm-settings", VmSettings); customElements.define("vm-skeleton", VmSkeleton); - -// Register Castopod's icons library -const library: HTMLVmIconLibraryElement | null = document.querySelector( - 'vm-icon-library[name="castopod-icons"]' -); -if (library) { - library.resolver = (iconName) => `/assets/icons/${iconName}.svg`; -} diff --git a/app/Resources/js/modules/ThemePicker.ts b/app/Resources/js/modules/ThemePicker.ts index 57b0a75b..d302e463 100644 --- a/app/Resources/js/modules/ThemePicker.ts +++ b/app/Resources/js/modules/ThemePicker.ts @@ -1,9 +1,8 @@ const ThemePicker = (): void => { const buttons: NodeListOf | null = document.querySelectorAll("button[data-type='theme-picker']"); - const iframe: HTMLIFrameElement | null = document.querySelector( - `iframe[id="embeddable_player"]` - ); + const iframe: HTMLIFrameElement | null = + document.querySelector(`iframe[id="embed"]`); const iframeTextArea: HTMLFormElement | null = document.querySelector(`[id="iframe"]`); const urlTextArea: HTMLFormElement | null = diff --git a/app/Resources/js/modules/play-episode-button.ts b/app/Resources/js/modules/play-episode-button.ts index d8c51fd4..44f4a873 100644 --- a/app/Resources/js/modules/play-episode-button.ts +++ b/app/Resources/js/modules/play-episode-button.ts @@ -206,7 +206,8 @@ export class PlayEpisodeButton extends LitElement { } button:focus { - box-shadow: 0 0 0 2px #e7f9e4, 0 0 0 calc(2px + 2px) #009486; + outline: none; + box-shadow: 0 0 0 2px #e7f9e4, 0 0 0 4px #009486; } button.playing { diff --git a/app/Resources/styles/formInputTabs.css b/app/Resources/styles/formInputTabs.css index 38d323df..fac80a18 100644 --- a/app/Resources/styles/formInputTabs.css +++ b/app/Resources/styles/formInputTabs.css @@ -31,6 +31,6 @@ } .form-input-tabs > input:checked + label { - @apply font-semibold opacity-100 text-pine-700; + @apply font-semibold opacity-100 text-pine-500; } } diff --git a/app/Resources/styles/index.css b/app/Resources/styles/index.css index ac4f5db5..7ac86a77 100644 --- a/app/Resources/styles/index.css +++ b/app/Resources/styles/index.css @@ -8,7 +8,6 @@ @import "./switch.css"; @import "./charts.css"; @import "./post.css"; -@import "./tabs.css"; @import "./radioToggler.css"; @import "./formInputTabs.css"; @import "./stickyHeader.css"; diff --git a/app/Resources/styles/tabs.css b/app/Resources/styles/tabs.css deleted file mode 100644 index 4389ead4..00000000 --- a/app/Resources/styles/tabs.css +++ /dev/null @@ -1,38 +0,0 @@ -@layer components { - .tabset { - @apply grid grid-cols-3; - } - - .tabset > input[type="radio"] { - @apply absolute -left-full; - } - - .tabset .tab-panel { - @apply hidden; - } - - /* Logic for 3 tabs at most */ - .tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child, - .tabset > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2), - .tabset > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3) { - @apply block; - } - - /* Styling */ - .tabset > label { - @apply relative inline-block w-full px-4 py-3 text-center cursor-pointer opacity-70 hover:opacity-100; - } - - .tabset > input:checked + label::after { - @apply absolute inset-x-0 bottom-0 w-1/3 h-1 mx-auto bg-pine-500; - content: ""; - } - - .tabset > input:checked + label { - @apply font-semibold opacity-100 text-pine-700; - } - - .tabset .tab-panels { - @apply col-span-3 p-6; - } -} diff --git a/modules/Admin/Config/Routes.php b/modules/Admin/Config/Routes.php index 626803b7..d259ce90 100644 --- a/modules/Admin/Config/Routes.php +++ b/modules/Admin/Config/Routes.php @@ -320,10 +320,10 @@ $routes->group( ], ); $routes->get( - 'embeddable-player', - 'EpisodeController::embeddablePlayer/$1/$2', + 'embed', + 'EpisodeController::embed/$1/$2', [ - 'as' => 'embeddable-player-add', + 'as' => 'embed-add', 'filter' => 'permission:podcast_episodes-edit', ], ); diff --git a/modules/Admin/Controllers/EpisodeController.php b/modules/Admin/Controllers/EpisodeController.php index 078fad1c..31295321 100644 --- a/modules/Admin/Controllers/EpisodeController.php +++ b/modules/Admin/Controllers/EpisodeController.php @@ -822,7 +822,7 @@ class EpisodeController extends BaseController return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]); } - public function embeddablePlayer(): string + public function embed(): string { helper(['form']); @@ -836,7 +836,7 @@ class EpisodeController extends BaseController 0 => $this->podcast->title, 1 => $this->episode->title, ]); - return view('episode/embeddable_player', $data); + return view('episode/embed', $data); } public function attemptCommentCreate(): RedirectResponse diff --git a/modules/Admin/Controllers/PodcastPlatformController.php b/modules/Admin/Controllers/PodcastPlatformController.php index bc49bc37..d22b626c 100644 --- a/modules/Admin/Controllers/PodcastPlatformController.php +++ b/modules/Admin/Controllers/PodcastPlatformController.php @@ -85,11 +85,8 @@ class PodcastPlatformController extends BaseController 'is_visible' => array_key_exists('visible', $podcastPlatform) && $podcastPlatform['visible'] === 'yes', - 'is_on_embeddable_player' => - array_key_exists( - 'on_embeddable_player', - $podcastPlatform, - ) && $podcastPlatform['on_embeddable_player'] === 'yes', + 'is_on_embed' => + array_key_exists('on_embed', $podcastPlatform,) && $podcastPlatform['on_embed'] === 'yes', ]; } diff --git a/modules/Admin/Language/en/Breadcrumb.php b/modules/Admin/Language/en/Breadcrumb.php index a8df8411..9a1ef1c2 100644 --- a/modules/Admin/Language/en/Breadcrumb.php +++ b/modules/Admin/Language/en/Breadcrumb.php @@ -41,5 +41,5 @@ return [ 'listening-time' => 'listening time', 'time-periods' => 'time periods', 'soundbites' => 'soundbites', - 'embeddable-player' => 'embeddable player', + 'embed' => 'embeddable player', ]; diff --git a/modules/Admin/Language/en/Common.php b/modules/Admin/Language/en/Common.php index c5048cb9..f3a6a913 100644 --- a/modules/Admin/Language/en/Common.php +++ b/modules/Admin/Language/en/Common.php @@ -21,7 +21,6 @@ return [ 'copied' => 'Copied!', 'home' => 'Home', 'explicit' => 'Explicit', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Powered by {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} out of {pageCount}', diff --git a/modules/Admin/Language/en/Episode.php b/modules/Admin/Language/en/Episode.php index 990297f8..073af021 100644 --- a/modules/Admin/Language/en/Episode.php +++ b/modules/Admin/Language/en/Episode.php @@ -160,9 +160,9 @@ return [ 'delete' => 'Delete soundbite', 'bookmark' => 'Click while playing to get current position, click again to get duration.', - 'submit_edit' => 'Save all soundbites', + 'submit' => 'Save soundbites', ], - 'embeddable_player' => [ + 'embed' => [ 'title' => 'Embeddable player', 'label' => 'Pick a theme color, copy the embeddable player to clipboard, then paste it on your website.', diff --git a/modules/Admin/Language/en/EpisodeNavigation.php b/modules/Admin/Language/en/EpisodeNavigation.php index bbc0d298..1945e25b 100644 --- a/modules/Admin/Language/en/EpisodeNavigation.php +++ b/modules/Admin/Language/en/EpisodeNavigation.php @@ -14,6 +14,6 @@ return [ 'episode-view' => 'Home', 'episode-edit' => 'Edit episode', 'episode-persons-manage' => 'Manage persons', - 'embeddable-player-add' => 'Embeddable player', + 'embed-add' => 'Embeddable player', 'soundbites-edit' => 'Soundbites', ]; diff --git a/modules/Admin/Language/en/Platforms.php b/modules/Admin/Language/en/Platforms.php index 27582cda..98180c13 100644 --- a/modules/Admin/Language/en/Platforms.php +++ b/modules/Admin/Language/en/Platforms.php @@ -13,7 +13,7 @@ return [ 'home_url' => 'Go to {platformName} website', 'submit_url' => 'Submit your podcast on {platformName}', 'visible' => 'Display in podcast homepage?', - 'on_embeddable_player' => 'Display on embeddable player?', + 'on_embed' => 'Display on embeddable player?', 'remove' => 'Remove {platformName}', 'submit' => 'Save', 'messages' => [ diff --git a/modules/Admin/Language/fr/Breadcrumb.php b/modules/Admin/Language/fr/Breadcrumb.php index 35598dec..91b6e0d9 100644 --- a/modules/Admin/Language/fr/Breadcrumb.php +++ b/modules/Admin/Language/fr/Breadcrumb.php @@ -41,5 +41,5 @@ return [ 'listening-time' => 'drée d’écoute', 'time-periods' => 'périodes', 'soundbites' => 'extraits sonores', - 'embeddable-player' => 'lecteur intégré', + 'embed' => 'lecteur intégré', ]; diff --git a/modules/Admin/Language/fr/Common.php b/modules/Admin/Language/fr/Common.php index e02f1b02..8788589f 100644 --- a/modules/Admin/Language/fr/Common.php +++ b/modules/Admin/Language/fr/Common.php @@ -21,7 +21,6 @@ return [ 'copied' => 'Copié !', 'home' => 'Accueil', 'explicit' => 'Explicite', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Propulsé par {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} sur {pageCount}', diff --git a/modules/Admin/Language/fr/Episode.php b/modules/Admin/Language/fr/Episode.php index 857b6754..b0cc9c80 100644 --- a/modules/Admin/Language/fr/Episode.php +++ b/modules/Admin/Language/fr/Episode.php @@ -168,9 +168,9 @@ return [ 'delete' => 'Supprimer l’extrait sonore', 'bookmark' => 'Cliquez pour récupérer la position actuelle, cliquez à nouveau pour récupérer la durée.', - 'submit_edit' => 'Enregistrer tous les extraits sonores', + 'submit' => 'Enregistrer les extraits sonnores', ], - 'embeddable_player' => [ + 'embed' => [ 'add' => 'Ajouter un lecteur intégré', 'title' => 'Lecteur intégré', 'label' => diff --git a/modules/Admin/Language/fr/EpisodeNavigation.php b/modules/Admin/Language/fr/EpisodeNavigation.php index 9ba36937..d85c74d2 100644 --- a/modules/Admin/Language/fr/EpisodeNavigation.php +++ b/modules/Admin/Language/fr/EpisodeNavigation.php @@ -14,6 +14,6 @@ return [ 'episode-view' => 'Accueil', 'episode-edit' => 'Modifier l’épisode', 'episode-persons-manage' => 'Gestion des intervenants', - 'embeddable-player-add' => 'Lecteur intégré', + 'embed' => 'Lecteur intégré', 'soundbites-edit' => 'Extraits sonores', ]; diff --git a/modules/Admin/Language/fr/Platforms.php b/modules/Admin/Language/fr/Platforms.php index 1a5a59c4..0c149715 100644 --- a/modules/Admin/Language/fr/Platforms.php +++ b/modules/Admin/Language/fr/Platforms.php @@ -13,7 +13,7 @@ return [ 'home_url' => 'Aller au site {platformName}', 'submit_url' => 'Soumettez votre podcast sur {platformName}', 'visible' => 'Afficher sur la page d’accueil du podcast ?', - 'on_embeddable_player' => 'Afficher sur le lecteur intégré ?', + 'on_embed' => 'Afficher sur le lecteur intégré ?', 'remove' => 'Supprimer {platformName}', 'submit' => 'Enregistrer', 'messages' => [ diff --git a/modules/Analytics/Controllers/EpisodeAnalyticsController.php b/modules/Analytics/Controllers/EpisodeAnalyticsController.php index 9b7a9969..167c5d84 100644 --- a/modules/Analytics/Controllers/EpisodeAnalyticsController.php +++ b/modules/Analytics/Controllers/EpisodeAnalyticsController.php @@ -56,8 +56,8 @@ class EpisodeAnalyticsController extends Controller $serviceName = ''; if (isset($_GET['_from'])) { $serviceName = $_GET['_from']; - } elseif ($session->get('embeddable_player_domain') !== null) { - $serviceName = $session->get('embeddable_player_domain'); + } elseif ($session->get('embed_domain') !== null) { + $serviceName = $session->get('embed_domain'); } elseif ($session->get('referer') !== null && $session->get('referer') !== '- Direct -') { $serviceName = parse_url($session->get('referer'), PHP_URL_HOST); } diff --git a/themes/cp_admin/episode/_sidebar.php b/themes/cp_admin/episode/_sidebar.php index 5067330a..8dba09e1 100644 --- a/themes/cp_admin/episode/_sidebar.php +++ b/themes/cp_admin/episode/_sidebar.php @@ -3,11 +3,11 @@ $podcastNavigation = [ 'dashboard' => [ 'icon' => 'dashboard', - 'items' => ['episode-view', 'episode-edit', 'episode-persons-manage', 'embeddable-player-add', 'soundbites-edit'], + 'items' => ['episode-view', 'episode-edit', 'episode-persons-manage', 'embed-add', 'soundbites-edit'], ], ]; ?> - + extend('_layout') ?> section('title') ?> - + endSection() ?> section('pageTitle') ?> - + endSection() ?> section('content') ?> -

+

$theme): ?>
- +
- embeddable_player_url}\">") ?>" /> - + embed_url}\">") ?>" /> +
- - + +
endSection() ?> diff --git a/themes/cp_admin/episode/list.php b/themes/cp_admin/episode/list.php index db2a4a7e..e035285f 100644 --- a/themes/cp_admin/episode/list.php +++ b/themes/cp_admin/episode/list.php @@ -84,8 +84,8 @@ ], [ 'type' => 'link', - 'title' => lang('Episode.embeddable_player.title'), - 'uri' => route_to('embeddable-player-add', $podcast->id, $episode->id), + 'title' => lang('Episode.embed.title'), + 'uri' => route_to('embed-add', $podcast->id, $episode->id), ], [ 'type' => 'link', diff --git a/themes/cp_admin/episode/publish.php b/themes/cp_admin/episode/publish.php index d9912438..083e578e 100644 --- a/themes/cp_admin/episode/publish.php +++ b/themes/cp_admin/episode/publish.php @@ -28,7 +28,7 @@
- <?= $podcast->actor->display_name ?> + <?= $podcast->actor->display_name ?>

actor->display_name ?> diff --git a/themes/cp_admin/episode/publish_edit.php b/themes/cp_admin/episode/publish_edit.php index de8b9527..eff01066 100644 --- a/themes/cp_admin/episode/publish_edit.php +++ b/themes/cp_admin/episode/publish_edit.php @@ -29,7 +29,7 @@

- <?= $podcast->actor->display_name ?> + <?= $podcast->actor->display_name ?>

actor->display_name ?> diff --git a/themes/cp_admin/episode/soundbites.php b/themes/cp_admin/episode/soundbites.php index d57db65e..1555d147 100644 --- a/themes/cp_admin/episode/soundbites.php +++ b/themes/cp_admin/episode/soundbites.php @@ -8,10 +8,14 @@ endSection() ?> +section('headerRight') ?> + +endSection() ?> + section('content') ?> -

+
- - - - - endSection() ?> diff --git a/themes/cp_admin/my_account/change_password.php b/themes/cp_admin/my_account/change_password.php index 944c4f24..cbafc732 100644 --- a/themes/cp_admin/my_account/change_password.php +++ b/themes/cp_admin/my_account/change_password.php @@ -11,7 +11,7 @@ section('content') ?> -
+ 'link', - 'title' => lang('Episode.embeddable_player.title'), - 'uri' => route_to('embeddable-player-add', $podcast->id, $episode->id), + 'title' => lang('Episode.embed.title'), + 'uri' => route_to('embed-add', $podcast->id, $episode->id), ], [ 'type' => 'link', diff --git a/themes/cp_admin/podcast/platforms.php b/themes/cp_admin/podcast/platforms.php index 2b4cad9a..b6c47a41 100644 --- a/themes/cp_admin/podcast/platforms.php +++ b/themes/cp_admin/podcast/platforms.php @@ -99,7 +99,7 @@ value="link_content ?>" placeholder="type}") ?>" /> - +
diff --git a/themes/cp_app/embeddable_player.php b/themes/cp_app/embed.php similarity index 57% rename from themes/cp_app/embeddable_player.php rename to themes/cp_app/embed.php index c2055939..1fc63441 100644 --- a/themes/cp_app/embeddable_player.php +++ b/themes/cp_app/embed.php @@ -16,46 +16,23 @@ ->asset('js/embed.ts', 'js') ?> - - <?= $episode->title ?> -
-
- - title ?> - - - - + + <?= $episode->title ?> +
+ +
+ number, $episode->season_number, 'text-xs font-semibold !no-underline border px-1 border-gray-500', true) ?> + title ?>
- - number, - $episode->season_number, - 'text-xs font-semibold text-gray-600 !no-underline border px-1 border-gray-500 mr-1', - true, -) ?>

-title ?> -

+
+

title ?>