Phase 0: Fundament für Inhaus
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3) - Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung - Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü - Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person - Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“ - Benutzerverwaltung im Admin, Zugang vorläufig über is_admin - vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/ - PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung - VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7197eaebf2
commit
9c0f8de791
15771 changed files with 1564103 additions and 5 deletions
77
vendor/pragmarx/google2fa-qrcode/src/QRCode/Bacon.php
vendored
Normal file
77
vendor/pragmarx/google2fa-qrcode/src/QRCode/Bacon.php
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
namespace PragmaRX\Google2FAQRCode\QRCode;
|
||||
|
||||
use BaconQrCode\Renderer\Image\ImageBackEndInterface;
|
||||
use BaconQrCode\Renderer\Image\ImagickImageBackEnd;
|
||||
use BaconQrCode\Renderer\Image\SvgImageBackEnd;
|
||||
use BaconQrCode\Renderer\ImageRenderer;
|
||||
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
|
||||
use BaconQrCode\Writer;
|
||||
|
||||
class Bacon implements QRCodeServiceContract
|
||||
{
|
||||
/**
|
||||
* @var ImageBackEndInterface|null
|
||||
*/
|
||||
protected $imageBackEnd;
|
||||
|
||||
public function __construct(?ImageBackEndInterface $imageBackEnd = null)
|
||||
{
|
||||
$this->imageBackEnd = $imageBackEnd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a QR code data url to display inline.
|
||||
*
|
||||
* @param string $string
|
||||
* @param int $size
|
||||
* @param string $encoding Default to UTF-8
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getQRCodeInline($string, $size = 200, $encoding = 'utf-8')
|
||||
{
|
||||
$renderer = new ImageRenderer(
|
||||
(new RendererStyle($size))->withSize($size),
|
||||
$this->getImageBackend()
|
||||
);
|
||||
|
||||
$bacon = new Writer($renderer);
|
||||
|
||||
$data = $bacon->writeString($string, $encoding);
|
||||
|
||||
if ($this->getImageBackend() instanceof ImagickImageBackEnd) {
|
||||
return 'data:image/png;base64,' . base64_encode($data);
|
||||
}
|
||||
|
||||
if ($this->getImageBackend() instanceof SvgImageBackEnd) {
|
||||
return 'data:image/svg+xml;base64,' . base64_encode($data);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function imagickIsAvailable(): bool
|
||||
{
|
||||
return extension_loaded('imagick');
|
||||
}
|
||||
|
||||
public function getImageBackend(): ImageBackEndInterface
|
||||
{
|
||||
if ($this->imageBackEnd === null) {
|
||||
$this->imageBackEnd = $this->imagickIsAvailable()
|
||||
? new ImagickImageBackEnd()
|
||||
: new SvgImageBackEnd();
|
||||
}
|
||||
|
||||
return $this->imageBackEnd;
|
||||
}
|
||||
|
||||
public function setImageBackend(ImageBackEndInterface $imageBackEnd): self
|
||||
{
|
||||
$this->imageBackEnd = $imageBackEnd;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
77
vendor/pragmarx/google2fa-qrcode/src/QRCode/Chillerlan.php
vendored
Normal file
77
vendor/pragmarx/google2fa-qrcode/src/QRCode/Chillerlan.php
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
namespace PragmaRX\Google2FAQRCode\QRCode;
|
||||
|
||||
use chillerlan\QRCode\Common\EccLevel;
|
||||
use chillerlan\QRCode\Common\Version;
|
||||
use chillerlan\QRCode\Output\QRMarkupSVG;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
|
||||
class Chillerlan implements QRCodeServiceContract
|
||||
{
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected $options = [];
|
||||
|
||||
protected function getOptions(): QROptions
|
||||
{
|
||||
return new QROptions($this->buildOptionsArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $options
|
||||
*/
|
||||
public function setOptions(array $options): self
|
||||
{
|
||||
$this->options = $options;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function buildOptionsArray(?int $size = null): array
|
||||
{
|
||||
$defaults = [
|
||||
'version' => Version::AUTO,
|
||||
'outputInterface' => QRMarkupSVG::class,
|
||||
'eccLevel' => EccLevel::L,
|
||||
];
|
||||
|
||||
$options = array_merge($defaults, $this->options);
|
||||
|
||||
// Let this package handle the base64 wrap so output is deterministic
|
||||
// regardless of chillerlan's per-version defaults. See PR #12.
|
||||
$options['outputBase64'] = false;
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a QR code data url to display inline.
|
||||
*
|
||||
* @param string $string
|
||||
* @param int $size
|
||||
* @param string $encoding Default to UTF-8
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getQRCodeInline($string, $size = null, $encoding = null)
|
||||
{
|
||||
$renderer = new QRCode($this->getOptions());
|
||||
|
||||
$svg = $renderer->render($string);
|
||||
|
||||
// chillerlan's render() is typed as mixed in its source, but with
|
||||
// outputInterface=QRMarkupSVG we always get a string back. Guard
|
||||
// here so PHPStan can narrow the type cleanly.
|
||||
if (!is_string($svg)) {
|
||||
throw new \RuntimeException('chillerlan returned a non-string SVG payload.');
|
||||
}
|
||||
|
||||
return 'data:image/svg+xml;base64,' . base64_encode($svg);
|
||||
}
|
||||
}
|
||||
17
vendor/pragmarx/google2fa-qrcode/src/QRCode/QRCodeServiceContract.php
vendored
Normal file
17
vendor/pragmarx/google2fa-qrcode/src/QRCode/QRCodeServiceContract.php
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace PragmaRX\Google2FAQRCode\QRCode;
|
||||
|
||||
interface QRCodeServiceContract
|
||||
{
|
||||
/**
|
||||
* Generates a QR code data url to display inline.
|
||||
*
|
||||
* @param string $string
|
||||
* @param int $size
|
||||
* @param string $encoding Default to UTF-8
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getQRCodeInline($string, $size = 200, $encoding = 'utf-8');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue