feat: add Hetzner affiliate link to token form
- Add affiliate link when users add their first Hetzner token - Shows in both modal and full-page layouts - Friendly messaging about supporting Coolify and getting credits
This commit is contained in:
parent
8d403cc511
commit
d4b9b61cbd
3 changed files with 256 additions and 26 deletions
|
|
@ -14,15 +14,22 @@
|
|||
<x-forms.input required id="name" label="Token Name"
|
||||
placeholder="e.g., Production Hetzner. tip: add Hetzner project name to identify easier" />
|
||||
|
||||
<x-forms.input required type="password" id="token" label="API Token"
|
||||
placeholder="Enter your API token" />
|
||||
<x-forms.input required type="password" id="token" label="API Token" placeholder="Enter your API token" />
|
||||
|
||||
@if (auth()->user()->currentTeam()->cloudProviderTokens->where('provider', $provider)->isEmpty())
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
Create an API token in the <a
|
||||
href='{{ $provider === 'hetzner' ? 'https://console.hetzner.com/projects' : '#' }}'
|
||||
target='_blank' class='underline dark:text-white'>{{ ucfirst($provider) }} Console</a> → choose
|
||||
href='{{ $provider === 'hetzner' ? 'https://console.hetzner.com/projects' : '#' }}' target='_blank'
|
||||
class='underline dark:text-white'>{{ ucfirst($provider) }} Console</a> → choose
|
||||
Project → Security → API Tokens.
|
||||
@if ($provider === 'hetzner')
|
||||
<br><br>
|
||||
Don't have a Hetzner account? <a href='https://coolify.io/hetzner' target='_blank'
|
||||
class='underline dark:text-white'>Sign up here</a>
|
||||
<br>
|
||||
<span class="text-xs">(Coolify's affiliate link, only new accounts - supports us (€10)
|
||||
and gives you €20)</span>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
@ -42,13 +49,16 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="flex-1 min-w-64">
|
||||
<x-forms.input required type="password" id="token" label="API Token"
|
||||
placeholder="Enter your API token" />
|
||||
<x-forms.input required type="password" id="token" label="API Token" placeholder="Enter your API token" />
|
||||
@if (auth()->user()->currentTeam()->cloudProviderTokens->where('provider', $provider)->isEmpty())
|
||||
<div class="text-sm text-neutral-500 dark:text-neutral-400 mt-2">
|
||||
Create an API token in the <a href='https://console.hetzner.com/projects' target='_blank'
|
||||
class='underline dark:text-white'>Hetzner Console</a> → choose Project → Security → API
|
||||
Tokens.
|
||||
<br>
|
||||
Don't have a Hetzner account? <a href='https://hetzner.cloud/?ref=coolify' target='_blank'
|
||||
class='underline dark:text-white'>Sign up here</a> (official Coolify affiliate link - supports us
|
||||
and gives you credits!)
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue