Skip to content

Commit

Permalink
feat: update view template for access denied and custom event
Browse files Browse the repository at this point in the history
  • Loading branch information
pxthinh committed Nov 25, 2023
1 parent 24d14f6 commit 96446d8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
7 changes: 7 additions & 0 deletions lang/en/globals/access_denied.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

return [
'title' => '🔒 <b>Access Denied to Bot</b> 🚫',
'chat_id' => '🛑 <b>Chat ID:</b> <code>:chatId</code> ',
'message' => 'Please contact the administrator for further information, Thank You..',
];
7 changes: 7 additions & 0 deletions lang/en/tools/custom_event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

return [
'title' => 'Go to check the :link for more information about events.',
'instruction' => '<b>Click and configure child events if the option has the ⚙ icon.</b>',
'eventSelection' => 'And select an event to enable or disable notifications:',
];
6 changes: 6 additions & 0 deletions lang/en/tools/custom_event_action.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

return [
'title' => 'Setting actions for the <b>:event</b> event :platformIcon.',
'actionPrompt' => 'Please select an action of this event to enable or disable notifications:',
];
12 changes: 4 additions & 8 deletions resources/views/globals/access_denied.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
* @var $chatId string
*/
$message = '🔒 <b>Access Denied to Bot</b> 🚫';
?>
{!! __('tg-notifier::globals/access_denied.title') !!}

if (!empty($chatId)) {
$message .= "\n\n🛑 <b>Chat ID:</b> <code>{$chatId}</code> \n";
}
$message .= 'Please contact the administrator for further information, Thank You..';
echo $message;
{!! __('tg-notifier::globals/access_denied.chat_id', ['chatId' => $chatId]) !!}
{!! __('tg-notifier::globals/access_denied.message') !!}
6 changes: 3 additions & 3 deletions resources/views/tools/custom_event.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$docsUrl = 'https://docs.gitlab.com/ee/user/project/integrations/webhooks.html';
}
?>
Go to check the <a href="<?= $docsUrl ?>"><?= $platform ?> documentation</a> for more information about events.
{!! __('tg-notifier::tools/custom_event.title', ['link' => "<a href='$docsUrl'>$platform documentation</a>"]) !!}
---
<b>Click and configure child events if the option has the ⚙ icon.</b>
And select an event to enable or disable notifications:
{!! __('tg-notifier::tools/custom_event.instruction') !!}
{!! __('tg-notifier::tools/custom_event.eventSelection') !!}
4 changes: 2 additions & 2 deletions resources/views/tools/custom_event_action.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
$platformIcon = '🦊';
}
?>
Setting actions for the <b><?= $event ?></b> event <?= $platformIcon ?>.
Please select an action of this event to enable or disable notifications:
{!! __('tg-notifier::tools/custom_event_action.title', ['event' => $event, 'platformIcon' => $platformIcon]) !!}
{!! __('tg-notifier::tools/custom_event_action.actionPrompt') !!}

0 comments on commit 96446d8

Please sign in to comment.