coolify/resources/views/livewire/notifications/telegram.blade.php

63 lines
3.4 KiB
PHP
Raw Normal View History

2023-09-06 14:31:38 +02:00
<div>
<x-notification.navbar />
<form wire:submit='submit' class="flex flex-col gap-4">
2023-09-06 14:31:38 +02:00
<div class="flex items-center gap-2">
<h2>Telegram</h2>
<x-forms.button type="submit">
Save
</x-forms.button>
@if ($team->telegram_enabled)
<x-forms.button class="text-white normal-case btn btn-xs no-animation btn-primary"
wire:click="sendTestNotification">
Send Test Notifications
</x-forms.button>
@endif
</div>
<div class="w-32">
<x-forms.checkbox instantSave id="team.telegram_enabled" label="Enabled" />
2023-09-06 14:31:38 +02:00
</div>
<div class="flex gap-2">
2023-09-08 14:15:28 +02:00
<x-forms.input type="password"
helper="Get it from the <a class='inline-block text-white underline' href='https://t.me/botfather' target='_blank'>BotFather Bot</a> on Telegram."
required id="team.telegram_token" label="Token" />
2023-12-07 19:06:32 +01:00
<x-forms.input helper="Recommended to add your bot to a group chat and add its Chat ID here." required
2023-09-06 14:31:38 +02:00
id="team.telegram_chat_id" label="Chat ID" />
</div>
2023-12-07 19:06:32 +01:00
@if (data_get($team, 'telegram_enabled'))
<h2 class="mt-4">Subscribe to events</h2>
<div class="w-96">
@if (isDev())
<div class="w-64">
<x-forms.checkbox instantSave="saveModel" id="team.telegram_notifications_test"
label="Test" />
<x-forms.input
helper="If you are using Group chat with Topics, you can specify the topics ID. If empty, General topic will be used."
id="team.telegram_notifications_test_message_thread_id" label="Custom Topic ID" />
</div>
@endif
2023-10-05 14:44:17 +02:00
<div class="w-64">
2023-12-07 19:06:32 +01:00
<x-forms.checkbox instantSave="saveModel" id="team.telegram_notifications_status_changes"
label="Container Status Changes" />
2023-09-08 14:15:28 +02:00
<x-forms.input
helper="If you are using Group chat with Topics, you can specify the topics ID. If empty, General topic will be used."
2023-12-07 19:06:32 +01:00
id="team.telegram_notifications_status_changes_message_thread_id" label="Custom Topic ID" />
</div>
<div class="w-64">
<x-forms.checkbox instantSave="saveModel" id="team.telegram_notifications_deployments"
label="Application Deployments" />
<x-forms.input
helper="If you are using Group chat with Topics, you can specify the topics ID. If empty, General topic will be used."
id="team.telegram_notifications_deployments_message_thread_id" label="Custom Topic ID" />
</div>
<div class="w-64">
<x-forms.checkbox instantSave="saveModel" id="team.telegram_notifications_database_backups"
label="Backup Status" />
<x-forms.input
helper="If you are using Group chat with Topics, you can specify the topics ID. If empty, General topic will be used."
id="team.telegram_notifications_database_backups_message_thread_id" label="Custom Topic ID" />
2023-09-08 14:15:28 +02:00
</div>
</div>
@endif
</form>
2023-09-06 14:31:38 +02:00
</div>