diff --git a/lib/Listener/BeforeTemplateRenderedListener.php b/lib/Listener/BeforeTemplateRenderedListener.php index a9e0b8146..92b5fdcae 100644 --- a/lib/Listener/BeforeTemplateRenderedListener.php +++ b/lib/Listener/BeforeTemplateRenderedListener.php @@ -30,9 +30,11 @@ use OCA\FirstRunWizard\Notification\AppHint; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\BackgroundJob\IJobList; +use OCP\Defaults; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; use OCP\IConfig; +use OCP\AppFramework\Services\IInitialState; use OCP\IUser; use OCP\IUserSession; use OCP\Util; @@ -55,16 +57,26 @@ class BeforeTemplateRenderedListener implements IEventListener { */ private $jobList; + /** @var IInitialState */ + protected $initialState; + + /** @var Defaults */ + protected $theming; + public function __construct( IConfig $config, IUserSession $userSession, IJobList $jobList, - AppHint $appHint + AppHint $appHint, + IInitialState $initialState, + Defaults $theming, ) { $this->userSession = $userSession; $this->config = $config; $this->appHint = $appHint; $this->jobList = $jobList; + $this->initialState = $initialState; + $this->theming = $theming; } public function handle(Event $event): void { @@ -88,5 +100,20 @@ public function handle(Event $event): void { } Util::addScript(Application::APP_ID, 'about'); + + $this->initialState->provideInitialState( + 'desktop', + $this->config->getSystemValue('customclient_desktop', $this->theming->getSyncClientUrl()) + ); + + $this->initialState->provideInitialState( + 'android', + $this->config->getSystemValue('customclient_android', $this->theming->getSyncClientUrl()) + ); + + $this->initialState->provideInitialState( + 'ios', + $this->config->getSystemValue('customclient_ios', $this->theming->getSyncClientUrl()) + ); } } diff --git a/src/components/AppStoreBadge.vue b/src/components/AppStoreBadge.vue index cd573b467..2a50237bf 100644 --- a/src/components/AppStoreBadge.vue +++ b/src/components/AppStoreBadge.vue @@ -32,10 +32,21 @@