Files
Neon Overlord d2c70bc226 fork: rebrand as integration_gotosocial
Fork of nextcloud/integration_mastodon v5.2.0 (6a56211), AGPL-3.0, with
upstream copyright notices and CHANGELOG preserved unchanged.

Rebranded: app ID, namespace, dashboard widgets, reference provider, icon
component, search provider IDs and every user-facing string. GoToSocial
calls them posts, not toots, and its mascot is a sloth.

Deliberately NOT rebranded: MastodonAPIService, MastodonAPIController,
route names and config keys. They speak the Mastodon client API, which is
what GoToSocial implements -- renaming them would make the code claim a
protocol that does not exist, and would make this fork expensive to rebase
on future upstream releases.

Translations are inherited. Strings reworded by the rebrand fall back to
English; the rest still work in all 124 locales.

Assisted-by: Claude Code:claude-opus-5
2026-08-03 14:51:51 -07:00

42 lines
1.0 KiB
PHP

<?php
namespace OCA\GoToSocial\Settings;
use OCA\GoToSocial\AppInfo\Application;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IAppConfig;
use OCP\AppFramework\Services\IInitialState;
use OCP\Settings\ISettings;
class Admin implements ISettings {
public function __construct(
private IAppConfig $appConfig,
private IInitialState $initialStateService,
) {
}
/**
* @return TemplateResponse
*/
public function getForm(): TemplateResponse {
$oauthUrl = $this->appConfig->getAppValueString('oauth_instance_url', lazy: true);
$usePopup = $this->appConfig->getAppValueString('use_popup', '0', lazy: true);
$adminConfig = [
'oauth_instance_url' => $oauthUrl,
'use_popup' => ($usePopup === '1'),
];
$this->initialStateService->provideInitialState('admin-config', $adminConfig);
return new TemplateResponse(Application::APP_ID, 'adminSettings');
}
public function getSection(): string {
return 'connected-accounts';
}
public function getPriority(): int {
return 10;
}
}