coolify/app/Livewire/Help.php
rosslh 06072915d1 feat(branding): apply MapleDeploy branding to Coolify fork
Replace all Coolify branding with MapleDeploy across 111 files:
- Logo, favicon, and color palette (Canadian red scale, stone greys)
- Fonts: Overlock for headings, Inter for body (self-hosted woff2/ttf)
- All ~70 page titles updated to "| MapleDeploy"
- Auth pages, navbar, footer, email templates, settings, boarding flow
- Remove Hetzner provider, Coolify Cloud upsells, sponsorship popups
- Disable telemetry (Sentry DSN null, undead.coolify.io ping disabled)
- Point auto-update to MapleDeploy Forgejo registry image
- Redirect help/support links to mapledeploy.ca/contact
- Add AGPL source code link to Forgejo repo in navbar
- OpenAPI docs rebranded to MapleDeploy
2026-02-08 17:34:51 -05:00

56 lines
1.7 KiB
PHP

<?php
namespace App\Livewire;
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\Http;
use Livewire\Attributes\Validate;
use Livewire\Component;
class Help extends Component
{
use WithRateLimiting;
#[Validate(['required', 'min:10', 'max:1000'])]
public string $description;
#[Validate(['required', 'min:3'])]
public string $subject;
public function submit()
{
try {
$this->validate();
$this->rateLimit(3, 30);
$settings = instanceSettings();
$mail = new MailMessage;
$mail->view(
'emails.help',
[
'description' => $this->description,
]
);
$mail->subject("[HELP]: {$this->subject}");
$type = set_transanctional_email_settings($settings);
// MapleDeploy branding: feedback sent to MapleDeploy support
if (blank($type)) {
// No external API — log locally when SMTP not configured
\Illuminate\Support\Facades\Log::info('Feedback from '.auth()->user()?->email.': '.$this->subject.' — '.$this->description);
} else {
send_user_an_email($mail, auth()->user()?->email, 'support@mapledeploy.ca');
}
$this->dispatch('success', 'Feedback sent.', 'We will get in touch with you as soon as possible.');
$this->reset('description', 'subject');
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function render()
{
return view('livewire.help')->layout('layouts.app');
}
}