Commit e64548b9 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: replace form helper functions with components in admin template

parent 65367295
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -81,9 +81,8 @@ class PostController extends FediversePostController

        if (! ($cachedView = cache($cacheName))) {
            $data = [
                'podcast' => $this->podcast,
                'actor' => $this->actor,
                'post' => $this->post,
                'podcast' => $this->podcast,
            ];

            // if user is logged in then send to the authenticated activity view
+0 −3
Original line number Diff line number Diff line
@@ -69,9 +69,6 @@ class EpisodeComment extends UuidEntity
        'is_from_post' => 'boolean',
    ];

    /**
     * Returns the comment's attached episode
     */
    public function getEpisode(): ?Episode
    {
        if ($this->episode_id === null) {
+23 −12
Original line number Diff line number Diff line
@@ -3,23 +3,34 @@
declare(strict_types=1);

/**
 * @copyright  2020 Podlibre
 * @copyright  2021 Podlibre
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
 * @link       https://castopod.org/
 */

return [
    'blocked_actors' => 'Blocked accounts',
    'blocked_domains' => 'Blocked domains',
    'block_lists_form' => [
        'handle' => 'Account handle',
        'handle_hint' => 'Input @username@domain account.',
        'domain' => 'Domain name',
        'submit' => 'Block!',
    'your_handle' => 'Your handle',
    'your_handle_hint' => 'Enter the @username@domain you want to act from.',
    'follow' => [
        'label' => 'Follow',
        'title' => 'Follow {actorDisplayName}',
        'subtitle' => 'You are going to follow:',
        'accountNotFound' => 'The account could not be found.',
        'submit' => 'Proceed to follow',
    ],
    'list' => [
        'actor' => 'Account',
        'domain' => 'Domain name',
        'unblock' => 'Unblock',
    'favourite' => [
        'title' => "Favourite {actorDisplayName}'s post",
        'subtitle' => 'You are going to favourite:',
        'submit' => 'Proceed to favourite',
    ],
    'reblog' => [
        'title' => "Share {actorDisplayName}'s post",
        'subtitle' => 'You are going to share:',
        'submit' => 'Proceed to share',
    ],
    'reply' => [
        'title' => "Reply to {actorDisplayName}'s post",
        'subtitle' => 'You are going to reply to:',
        'submit' => 'Proceed to reply',
    ],
];
+25 −10
Original line number Diff line number Diff line
@@ -3,20 +3,35 @@
declare(strict_types=1);

/**
 * @copyright  2020 Podlibre
 * @copyright  2021 Podlibre
 * @license    https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
 * @link       https://castopod.org/
 */

return [
    'block_lists' => 'Listes de blocage',
    'block_lists_form' => [
        'blocked_users' => 'Utilisateurs bloqués',
        'blocked_users_hint' =>
            'Entrez les pseudonymes @utilisateur@domaine séparés par une virgule.',
        'blocked_domains' => 'Domaines bloqués',
        'blocked_domains_hint' =>
            'Entrez les noms de domaine séparés par une virgule.',
        'submit' => 'Sauvegarder les listes',
    'your_handle' => 'Votre pseudonyme',
    'your_handle_hint' =>
        'Entrez le @utilisateur@domaine avec lequel vous voulez interagir.',
    'follow' => [
        'label' => 'Suivre',
        'title' => 'Suivre {actorDisplayName}',
        'subtitle' => 'Vous allez suivre :',
        'accountNotFound' => 'Le compte n’a pas pu être trouvé.',
        'submit' => 'Poursuivre',
    ],
    'favourite' => [
        'title' => 'Mettez la publication de {actorDisplayName} en favori',
        'subtitle' => 'Vous allez mettre en favori :',
        'submit' => 'Poursuivre',
    ],
    'reblog' => [
        'title' => 'Partagez la publication de {actorDisplayName}',
        'subtitle' => 'Vous allez partager :',
        'submit' => 'Poursuivre',
    ],
    'reply' => [
        'title' => 'Répondre à la publication de {actorDisplayName}',
        'subtitle' => 'Vous allez répondre à :',
        'submit' => 'Poursuivre',
    ],
];
+3 −2
Original line number Diff line number Diff line
@@ -24,11 +24,12 @@ class Component implements ComponentInterface
    {
        helper('viewcomponents');

        // overwrite default attributes if set
        $this->attributes = array_merge($this->attributes, $attributes);

        if ($attributes !== []) {
            $this->hydrate($attributes);
        }
        // overwrite default attributes if set
        $this->attributes = array_merge($this->attributes, $attributes);
    }

    /**
Loading