From fc1e3e84d0d8174442e2519462b8cda7c32d8ce3 Mon Sep 17 00:00:00 2001 From: Maurice Renck Date: Fri, 6 Dec 2024 11:53:29 +0100 Subject: [PATCH] fix: deprecated fields now only visible when activated --- blueprints/sections/empty.yml | 5 +++++ blueprints/sections/empty2.yml | 5 +++++ blueprints/sections/podcasterimage.yml | 5 +++++ blueprints/sections/podcastermp3.yml | 4 ++++ blueprints/tabs/episode.yml | 19 +++---------------- index.php | 7 +++++++ vendor/composer/installed.php | 8 ++++---- 7 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 blueprints/sections/empty.yml create mode 100644 blueprints/sections/empty2.yml create mode 100644 blueprints/sections/podcasterimage.yml create mode 100644 blueprints/sections/podcastermp3.yml diff --git a/blueprints/sections/empty.yml b/blueprints/sections/empty.yml new file mode 100644 index 0000000..0f7339f --- /dev/null +++ b/blueprints/sections/empty.yml @@ -0,0 +1,5 @@ +type: fields +label: " " +fields: + podcasterEmpty: + type: hidden diff --git a/blueprints/sections/empty2.yml b/blueprints/sections/empty2.yml new file mode 100644 index 0000000..3c62b7a --- /dev/null +++ b/blueprints/sections/empty2.yml @@ -0,0 +1,5 @@ +type: fields +label: " " +fields: + podcasterEmpty2: + type: hidden diff --git a/blueprints/sections/podcasterimage.yml b/blueprints/sections/podcasterimage.yml new file mode 100644 index 0000000..b3d38be --- /dev/null +++ b/blueprints/sections/podcasterimage.yml @@ -0,0 +1,5 @@ +type: files +label: Cover Image DEPRECATED - COMPATIBILITY MODE ACTIVE +multiple: false +max: 1 +template: podcaster-cover diff --git a/blueprints/sections/podcastermp3.yml b/blueprints/sections/podcastermp3.yml new file mode 100644 index 0000000..ddea03c --- /dev/null +++ b/blueprints/sections/podcastermp3.yml @@ -0,0 +1,4 @@ +type: files +label: Episode mp3 DEPRECATED - COMPATIBILITY MODE ACTIVE +max: 1 +template: podcaster-episode diff --git a/blueprints/tabs/episode.yml b/blueprints/tabs/episode.yml index e6b3959..52f2445 100644 --- a/blueprints/tabs/episode.yml +++ b/blueprints/tabs/episode.yml @@ -49,23 +49,10 @@ columns: cover: true ratio: 1/1 uploads: podcaster-cover - podcasterFieldNote: - type: info - theme: negative - label: Be aware! - text: The following two fields are here for backwards compatibility. Please do not use them for new episodes. If you edit an existing episode, fill the fields above and empty the ones below this message. - podcasterMp3: - type: files - label: Episode mp3 (DEPRECATED) - max: 1 - template: podcaster-episode - podcasterCover: - type: files - label: Cover Image (DEPRECATED) - multiple: false - max: 1 - template: podcaster-cover + podcasterMp3: sections/podcastermp3 + podcasterCover: sections/podcasterimage + - width: 2/3 sections: podcasterInfo: diff --git a/index.php b/index.php index 424efd7..33b8e8d 100644 --- a/index.php +++ b/index.php @@ -22,6 +22,13 @@ 'files/podcaster-episode' => __DIR__ . '/blueprints/files/podcaster-episode.yml', 'files/podcaster-cover' => __DIR__ . '/blueprints/files/podcaster-cover.yml', + + 'sections/podcastermp3' => function () { + return (option('mauricerenck.podcaster.compatibilityMode', false)) ? __DIR__ . '/blueprints/sections/podcastermp3.yml' : __DIR__ . '/blueprints/sections/empty.yml'; + }, + 'sections/podcasterimage' => function () { + return (option('mauricerenck.podcaster.compatibilityMode', false)) ? __DIR__ . '/blueprints/sections/podcasterimage.yml' : __DIR__ . '/blueprints/sections/empty2.yml'; + }, ], 'templates' => [ 'podcasterfeed' => __DIR__ . '/templates/podcasterfeed.php', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 0190b67..0683c06 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,8 +1,8 @@ array( 'name' => 'mauricerenck/podcaster', - 'pretty_version' => '3.2.6', - 'version' => '3.2.6.0', + 'pretty_version' => '3.2.9', + 'version' => '3.2.9.0', 'reference' => NULL, 'type' => 'kirby-plugin', 'install_path' => __DIR__ . '/../../', @@ -38,8 +38,8 @@ 'dev_requirement' => false, ), 'mauricerenck/podcaster' => array( - 'pretty_version' => '3.2.6', - 'version' => '3.2.6.0', + 'pretty_version' => '3.2.9', + 'version' => '3.2.9.0', 'reference' => NULL, 'type' => 'kirby-plugin', 'install_path' => __DIR__ . '/../../',