Files

55 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\NuqloudScrum\Settings;
use OCA\NuqloudScrum\AppInfo\Application;
use OCA\NuqloudScrum\Service\ConfigService;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IL10N;
use OCP\Settings\ISettings;
use OCP\Util;
class PersonalSettings implements ISettings {
public function __construct(
private IL10N $l,
private ConfigService $configService,
) {
}
public function getForm(): TemplateResponse {
Util::addStyle(Application::APP_ID, 'admin');
return new TemplateResponse(
Application::APP_ID,
'index',
[
'title' => $this->l->t('NuQloud Scrum'),
'settings' => $this->configService->getPublicSettings(),
'text' => $this->getText(),
],
''
);
}
/** @return array<string, string> */
private function getText(): array {
return [
'title' => $this->l->t('NuQloud Scrum'),
'workspaceSync' => $this->l->t('Workspace Sync'),
'enabled' => $this->l->t('NuQloud Scrum automation is enabled.'),
'notEnabled' => $this->l->t('NuQloud Scrum automation is not enabled yet.'),
'intro' => $this->l->t('Talk remains the primary workspace. Synced task folders and Deck cards will appear here after the sync services are connected.'),
];
}
public function getSection(): string {
return Application::APP_ID;
}
public function getPriority(): int {
return 50;
}
}