{{ __('Admin · Add-ons') }}

{{ __('Install an') }} {{ __('add-on') }}.

{{ __('Add-ons merge extra features into this installation — Instagram is the first. Verify your purchase code, upload the package, and it installs in place. Your data and settings are untouched.') }}

{{ __('Core') }} v{{ $coreVersion }}
{{-- Different thing from BILLING add-ons — say so, because both live in admin and an operator hunting for one should not land on the other. --}}
{{ __('Looking for the paid feature packs customers buy on top of a plan?') }} {{ __('Those are plan add-ons (billing)') }}{{ __('. This page installs code.') }}
{{-- ═══ Instagram (Instaflow) — connect by URL + secret ══════════════ Instaflow is its OWN deployment. No package upload — the operator clicks Connect on this card, a modal takes the URL + shared secret, and we run a handshake so both sides prove they share the secret. --}} @php // Two connect cards share this page — auto-open THIS modal only for // its own validation failures, never the email card's (which flags // its errors under mailtrixy_* keys and its own flash below). $instaflowError = session('error') || $errors->hasAny(['instaflow', 'instaflow_url', 'instaflow_secret', 'instaflow_brand']); // ONE ENGINE AT A TIME: if the native Instagram add-on is installed // (addon/instagram/ present), the remote InstaMagic connect row is // BLOCKED — the operator must remove the add-on first. Matches the // server-side guard in ExtensionController::connectInstaflow(). $nativeInstagramInstalled = is_dir(base_path('addon/instagram')); @endphp
@if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
{{ __('Instagram') }} @if ($instaflowConnected) {{ __('Connected') }} @elseif ($instaflowUrl) {{ __('Not connected') }} @endif @if ($nativeInstagramInstalled) {{ __('Blocked — native add-on active') }} @endif

{{ __('Runs as a separate :igbrand deployment. Connect by URL + secret — no upload.', ['igbrand' => ig_brand_name()]) }}

@if ($instaflowUrl)
{{ $instaflowUrl }}
@endif
@if ($nativeInstagramInstalled) {{-- One engine at a time — remote connect disabled while the native add-on is installed. --}}
{{ __('Native Instagram add-on is installed. Remove it below to connect a remote :igbrand.', ['igbrand' => ig_brand_name()]) }}
@else @endif
{{-- Connect modal — opened by the card's Connect button. --}} {{-- ═══ Email (MailTrixy) — connect by URL + secret ═══════════════════ MailTrixy is its OWN deployment, same shape as Instaflow: no package upload — the operator clicks Connect on this card, a modal takes the URL + shared secret, and we run a handshake so both sides prove they share the secret. No native email add-on exists, so no engine guard. --}} @php $mailtrixyError = session('mailtrixy_error') || $errors->hasAny(['mailtrixy_url', 'mailtrixy_secret', 'mailtrixy_brand']); @endphp
@if (session('mailtrixy_status'))
{{ session('mailtrixy_status') }}
@endif @if (session('mailtrixy_error'))
{{ session('mailtrixy_error') }}
@endif
{{ __('Email') }} @if ($mailtrixyConnected) {{ __('Connected') }} @elseif ($mailtrixyUrl) {{ __('Not connected') }} @endif

{{ __('Connecting links the :mailbrand email platform so mail lands in the team inbox — by URL + secret, no upload.', ['mailbrand' => mailtrixy_brand_name()]) }}

@if ($mailtrixyUrl)
{{ $mailtrixyUrl }}
@endif
{{-- Connect modal — opened by the email card's Connect button. --}} {{-- ═══ STEP 1 — licence ═══════════════════════════════════════════ --}}
1

{{ __('Verify your purchase code') }}

{{ __('The same :brand licence that unlocks updates. Add-ons are tied to it.', ['brand' => brand_name()]) }}

{{-- ═══ STEP 2 — package ═══════════════════════════════════════════ --}} {{-- Locked until step 1 passes. The server re-verifies on upload too — this is only a convenience, not the security boundary. --}}
2

{{ __('Upload the add-on package') }}

{{ __('The ZIP is inspected before anything is written — a malformed or incompatible package is refused with your install untouched.') }}

{{-- ═══ Installed — WaDesk-style cards ═════════════════════════════ --}} @php // A ZIP-installed add-on now lives in addon// AND carries a DB // row, so it would otherwise appear twice (once as an in-place module, // once as a DB extension). The DB row is authoritative — it's the one // with the Remove action — so hide the in-place twin, leaving only // MANUALLY-dropped folders in the module list. $extSlugs = $extensions->pluck('slug')->all(); $inPlaceOnly = collect($modules ?? [])->reject(fn ($m, $slug) => in_array($slug, $extSlugs, true)); $hasAny = $extensions->count() > 0 || $inPlaceOnly->count() > 0; @endphp

{{ __('Installed add-ons') }}

{{ $extensions->count() + $inPlaceOnly->count() }}
{{-- ZIP-installed add-ons — DB-tracked, so they carry Remove. --}} @foreach ($extensions as $e)
{{ $e->name }} v{{ $e->version }} @if ($e->isActive()) {{ __('Active') }} @else {{ __('Disabled') }} @endif
{{ $e->slug }} · addon/{{ $e->slug }}/ · {{ count((array) $e->files) }} {{ __('files') }} @if ($e->installed_at) · {{ $e->installed_at->diffForHumans() }} @endif
@endforeach {{-- In-place modules: code in addon//. "Remove" deactivates the module (drops a hidden .disabled marker so it stops loading) — the FILES are kept, so it can be re-activated any time without a re-upload. It never deletes the folder. --}} @foreach ($inPlaceOnly as $slug => $m) @php $off = ! empty($m['_disabled']); @endphp
{{ $m['name'] ?? $slug }} v{{ $m['version'] ?? '1.0.0' }} @if ($off) {{ __('Inactive') }} @else {{ __('Active') }} @endif {{ __('In-place module') }}
{{ $slug }} · addon/{{ $slug }}/ · {{ __('files kept on disk') }}
@endforeach @unless ($hasAny)
{{ __('No add-ons installed yet. Verify your purchase code above, then upload a package.') }}
@endunless

{{ __('Removing an add-on deletes only the files it installed — tracked from the moment it was added, so core files are never touched. Data stays in the database.') }}