Fix/318 319 321 322

This commit is contained in:
Timothée Jaussoin 2025-06-09 12:33:05 +00:00
parent 9b58c3b0b1
commit b590995b4e
4 changed files with 10 additions and 5 deletions

View file

@ -339,6 +339,11 @@ class Account extends Authenticatable
return null;
}
public function getProvisioningLinphoneUriAttribute(): string
{
return str_replace('https://', 'linphone-config:', route('provisioning.provision', ['provisioning_token' => $this->provisioning_token]));
}
public static function dtmfProtocolsRule()
{
return implode(',', array_keys(self::$dtmfProtocols));

View file

@ -59,8 +59,8 @@ class RecoveryController extends Controller
$rules = [
'email' => 'required_without:phone|email|exists:accounts,email',
'phone' => 'required_without:email|starts_with:+',
'h-captcha-response' => captchaConfigured() ? 'required_if:email|HCaptcha' : '',
'account_recovery_token' => 'required_if:phone',
'h-captcha-response' => captchaConfigured() ? 'required_with:email|HCaptcha' : '',
'account_recovery_token' => 'required_with:phone',
];
$account = null;

View file

@ -16,7 +16,7 @@
{{ __('Types') }}
</a>
@endif
<a class="btn" href="{{ route('admin.account.create') }}">
<a class="btn" @if ($space && $space->isFull())disabled @endif href="{{ route('admin.account.create') }}">
<i class="ph">user-plus</i>
{{ __('New user') }}
</a>

View file

@ -1,9 +1,9 @@
To connect your account to the application, click on the following button:
<x-mail::button :url="route('provisioning.provision', ['provisioning_token' => $account->provisioning_token, 'reset_password' => true])" color="primary">
<x-mail::button :url="$account->provisioning_linphone_uri" color="primary">
Connect my account
</x-mail::button>
You can also configure your device by scanning the QR code with the mobile app, or by pasting the link below into the desktop application.
![QRCode]({{ route('provisioning.qrcode', ['provisioning_token' => $account->provisioning_token, 'reset_password' => true]) }})
![QRCode]({{ route('provisioning.qrcode', ['provisioning_token' => $account->provisioning_token]) }})