Fix FLEXIAPI-461 Detect the platform family and propose a button adapted for it

Fix FLEXIAPI-463 Add wizard link in all the emails where the account is injected
Update the dependencies
This commit is contained in:
Timothée Jaussoin 2026-03-19 16:01:06 +01:00
parent f1e63e006f
commit 594a3d65eb
9 changed files with 734 additions and 197 deletions

View file

@ -30,6 +30,7 @@ use Endroid\QrCode\Encoding\Encoding;
use Endroid\QrCode\ErrorCorrectionLevel;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelHigh;
use Endroid\QrCode\Writer\PngWriter;
use hisorange\BrowserDetect\Parser as Browser;
class ProvisioningController extends Controller
{
@ -43,7 +44,8 @@ class ProvisioningController extends Controller
public function wizard(Request $request, string $provisioningToken)
{
return view('provisioning.wizard', [
'token' => $provisioningToken
'token' => $provisioningToken,
'platform' => Browser::platformFamily()
]);
}

View file

@ -9,11 +9,12 @@
"license": "MIT",
"require": {
"php": ">=8.2",
"laravel/framework": "^11.45.1",
"awobaz/compoships": "^2.4.1",
"doctrine/dbal": "^3.10.1",
"endroid/qr-code": "^5.1",
"fakerphp/faker": "^1.24.1",
"hisorange/browser-detect": "^5.0",
"laravel/framework": "^11.45.1",
"laravel/tinker": "^2.10.1",
"lcobucci/jwt": "^4.3",
"namoshek/laravel-redis-sentinel": "^0.5",

865
flexiapi/composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -95,6 +95,10 @@
"Domain used if empty": "Le domaine est utilisé si vide",
"Dont have the app yet?": "Vous navez pas encore lapplication ?",
"Download Linphone" : "Télécharger Linphone",
"Download Linphone for GNU/Linux": "Télécharger Linphone pour GNU/Linux",
"Download Linphone for Windows": "Télécharger Linphone pour Windows",
"Download Linphone for MacOS": "Télécharger Linphone pour MacOS",
"Download for another platform": "Télécharger pour une autre plateforme",
"Edit": "Éditer",
"Email Server": "Serveur Mail",
"Email": "Email",
@ -142,7 +146,7 @@
"Limit the number of results": "Limiter le nomber de résultats",
"List of vcard fields to match for SIP domain": "Liste des champs vcard à matcher pour le domaine SIP",
"List of vcard fields to match with user input": "Liste des champs vcard à matcher avec les entrées utilisateur",
"Login to my account":"Connexion à mon compte",
"Login to my account with Linphone":"Connexion à mon compte avec Linphone",
"Login using a QRCode": "S'authentifier avec un QRCode",
"Login": "Authentification",
"Manage": "Gérer",

View file

@ -104,6 +104,10 @@ pre {
color: var(--second-7);
}
p.center {
text-align: center;
}
b,
strong {
font-weight: bold;

View file

@ -7,7 +7,9 @@
<x-mail::panel>
{{ __('Dont have the app yet?') }} [{{ __('Download Linphone')}}](https://www.linphone.org/en/download/)
{{ __('Dont have the app yet?') }} @if (isset($account)) [{{ __('Login to my account with Linphone') }}]({{ $account->provisioning_wizard_url }}) @else [{{ __('Download Linphone')}}](https://www.linphone.org/en/download/) @endif
<br />
{{ __('Need help?') }} [{{ __('Visit our user guide') }}](https://linphone.org/en/docs)

View file

@ -2,7 +2,7 @@
{{ __('To start using your account, click the button below:') }}
[{{ __('Login to my account') }}]({{ $account->provisioning_wizard_url }})
[{{ __('Login to my account with Linphone') }}]({{ $account->provisioning_wizard_url }})
{{ __('You can also connect your account to the mobile app by scanning the QR code with the app') }}

View file

@ -17,13 +17,13 @@
@include('parts.sidebar_items', ['items' => $items])
<hr />
@php
$items = [];
$items['account.telephony'] = ['title' => __('Telephony'), 'icon' => 'phone'];
@endphp
@include('parts.sidebar_items', ['items' => $items])
@if (auth()->user())
<hr />
@php
$items = [];
$items['account.telephony'] = ['title' => __('Telephony'), 'icon' => 'phone'];
@endphp
@include('parts.sidebar_items', ['items' => $items])
@endif
</nav>

View file

@ -7,8 +7,29 @@
<a class="btn" href="linphone-config:{{ route('provisioning.provision', ['provisioning_token' => $token]) }}">
{{ __('Open the app') }}
</a>
<a class="btn secondary" target="_blank" href="https://www.linphone.org/en/download/">
{{ __('Download the app') }}
</a>
@if ($platform == 'GNU/Linux')
<a class="btn secondary" target="_blank" href="https://download.linphone.org/releases/linux/latest_app">
{{ __('Download Linphone for GNU/Linux') }}
</a>
@elseif ($platform == 'Mac')
<a class="btn secondary" target="_blank" href="https://download.linphone.org/releases/macos/latest_app">
{{ __('Download Linphone for MacOS') }}
</a>
@elseif ($platform == 'Windows')
<a class="btn secondary" target="_blank" href="https://download.linphone.org/releases/windows/latest_app">
{{ __('Download Linphone for Windows') }}
</a>
@else
<a class="btn secondary" target="_blank" href="https://www.linphone.org/en/download/">
{{ __('Download Linphone') }}
</a>
@endif
@if (in_array($platform, ['GNU/Linux', 'MacOS', 'Windows']))
<p class="center">
<a target="_blank" href="https://www.linphone.org/en/download/">
{{ __('Download for another platform') }}
</a>
</p>
@endif
</div>
@endsection