mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-04-17 19:58:27 +00:00
Fix FLEXIAPI-461 Detect the platform family and propose a button adapted for it
This commit is contained in:
parent
f1e63e006f
commit
a2002d429a
9 changed files with 734 additions and 197 deletions
|
|
@ -30,6 +30,7 @@ use Endroid\QrCode\Encoding\Encoding;
|
||||||
use Endroid\QrCode\ErrorCorrectionLevel;
|
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||||
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelHigh;
|
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelHigh;
|
||||||
use Endroid\QrCode\Writer\PngWriter;
|
use Endroid\QrCode\Writer\PngWriter;
|
||||||
|
use hisorange\BrowserDetect\Parser as Browser;
|
||||||
|
|
||||||
class ProvisioningController extends Controller
|
class ProvisioningController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -43,7 +44,8 @@ class ProvisioningController extends Controller
|
||||||
public function wizard(Request $request, string $provisioningToken)
|
public function wizard(Request $request, string $provisioningToken)
|
||||||
{
|
{
|
||||||
return view('provisioning.wizard', [
|
return view('provisioning.wizard', [
|
||||||
'token' => $provisioningToken
|
'token' => $provisioningToken,
|
||||||
|
'platform' => Browser::platformFamily()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,12 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.2",
|
"php": ">=8.2",
|
||||||
"laravel/framework": "^11.45.1",
|
|
||||||
"awobaz/compoships": "^2.4.1",
|
"awobaz/compoships": "^2.4.1",
|
||||||
"doctrine/dbal": "^3.10.1",
|
"doctrine/dbal": "^3.10.1",
|
||||||
"endroid/qr-code": "^5.1",
|
"endroid/qr-code": "^5.1",
|
||||||
"fakerphp/faker": "^1.24.1",
|
"fakerphp/faker": "^1.24.1",
|
||||||
|
"hisorange/browser-detect": "^5.0",
|
||||||
|
"laravel/framework": "^11.45.1",
|
||||||
"laravel/tinker": "^2.10.1",
|
"laravel/tinker": "^2.10.1",
|
||||||
"lcobucci/jwt": "^4.3",
|
"lcobucci/jwt": "^4.3",
|
||||||
"namoshek/laravel-redis-sentinel": "^0.5",
|
"namoshek/laravel-redis-sentinel": "^0.5",
|
||||||
|
|
|
||||||
865
flexiapi/composer.lock
generated
865
flexiapi/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -95,6 +95,10 @@
|
||||||
"Domain used if empty": "Le domaine est utilisé si vide",
|
"Domain used if empty": "Le domaine est utilisé si vide",
|
||||||
"Don’t have the app yet?": "Vous n’avez pas encore l’application ?",
|
"Don’t have the app yet?": "Vous n’avez pas encore l’application ?",
|
||||||
"Download Linphone" : "Télécharger Linphone",
|
"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",
|
"Edit": "Éditer",
|
||||||
"Email Server": "Serveur Mail",
|
"Email Server": "Serveur Mail",
|
||||||
"Email": "Email",
|
"Email": "Email",
|
||||||
|
|
@ -142,7 +146,7 @@
|
||||||
"Limit the number of results": "Limiter le nomber de résultats",
|
"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 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",
|
"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 using a QRCode": "S'authentifier avec un QRCode",
|
||||||
"Login": "Authentification",
|
"Login": "Authentification",
|
||||||
"Manage": "Gérer",
|
"Manage": "Gérer",
|
||||||
|
|
|
||||||
4
flexiapi/public/css/style.css
vendored
4
flexiapi/public/css/style.css
vendored
|
|
@ -104,6 +104,10 @@ pre {
|
||||||
color: var(--second-7);
|
color: var(--second-7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
b,
|
b,
|
||||||
strong {
|
strong {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
<x-mail::panel>
|
<x-mail::panel>
|
||||||
|
|
||||||
{{ __('Don’t have the app yet?') }} [{{ __('Download Linphone')}}](https://www.linphone.org/en/download/)
|
{{ __('Don’t 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)
|
{{ __('Need help?') }} [{{ __('Visit our user guide') }}](https://linphone.org/en/docs)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{{ __('To start using your account, click the button below:') }}
|
{{ __('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') }}
|
{{ __('You can also connect your account to the mobile app by scanning the QR code with the app') }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
@include('parts.sidebar_items', ['items' => $items])
|
@include('parts.sidebar_items', ['items' => $items])
|
||||||
|
|
||||||
<hr />
|
@if (auth()->user())
|
||||||
|
<hr />
|
||||||
@php
|
@php
|
||||||
$items = [];
|
$items = [];
|
||||||
$items['account.telephony'] = ['title' => __('Telephony'), 'icon' => 'phone'];
|
$items['account.telephony'] = ['title' => __('Telephony'), 'icon' => 'phone'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@include('parts.sidebar_items', ['items' => $items])
|
|
||||||
|
|
||||||
|
@include('parts.sidebar_items', ['items' => $items])
|
||||||
|
@endif
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -7,8 +7,29 @@
|
||||||
<a class="btn" href="linphone-config:{{ route('provisioning.provision', ['provisioning_token' => $token]) }}">
|
<a class="btn" href="linphone-config:{{ route('provisioning.provision', ['provisioning_token' => $token]) }}">
|
||||||
{{ __('Open the app') }}
|
{{ __('Open the app') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn secondary" target="_blank" href="https://www.linphone.org/en/download/">
|
@if ($platform == 'GNU/Linux')
|
||||||
{{ __('Download the app') }}
|
<a class="btn secondary" target="_blank" href="https://download.linphone.org/releases/linux/latest_app">
|
||||||
</a>
|
{{ __('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>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue