mirror of
https://github.com/chenasraf/nextcloud-autocurrency.git
synced 2026-05-17 17:28:06 +00:00
- Add GitHub Actions workflows for PHPUnit testing (MySQL and PostgreSQL) - Add issue templates (bug reports, feature requests) for better issue management - Enhance Makefile with Docker test support and improved build targets - Update lint-staged configuration with better PHP and JSON handling - Add comprehensive PHPUnit test infrastructure with Docker support - Update dependencies and add lock files for composer and vendor-bin tools - Improve code scaffolding templates (command, component, view generators) - Update build configuration (Vite, package.json, pnpm-lock.yaml) - Refactor Application.php settings initialization - Update AdminSettings and UserSettings implementations - Rename test file for consistency (ApiTest → ApiControllerTest) - Update .gitignore (track composer.lock, ignore stats.html)
43 lines
1012 B
PHP
43 lines
1012 B
PHP
<?php
|
|
|
|
namespace OCA\AutoCurrency\Settings;
|
|
|
|
use OCA\AutoCurrency\AppInfo\Application;
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
use OCP\IAppConfig;
|
|
use OCP\IL10N;
|
|
use OCP\Settings\ISettings;
|
|
|
|
class AdminSettings implements ISettings {
|
|
public function __construct(
|
|
private IAppConfig $config,
|
|
private IL10N $l,
|
|
) {
|
|
}
|
|
|
|
/**
|
|
* @return TemplateResponse
|
|
*/
|
|
public function getForm(): TemplateResponse {
|
|
return new TemplateResponse(Application::APP_ID, 'settings', [
|
|
'script' => Application::getViteEntryScript('admin.ts'),
|
|
'style' => Application::getViteEntryScript('style.css'),
|
|
], '');
|
|
}
|
|
|
|
public function getSection(): string {
|
|
return Application::APP_ID;
|
|
}
|
|
|
|
/**
|
|
* @return int whether the form should be rather on the top or bottom of
|
|
* the admin section. The forms are arranged in ascending order of the
|
|
* priority values. It is required to return a value between 0 and 100.
|
|
*
|
|
* E.g.: 70
|
|
*/
|
|
public function getPriority(): int {
|
|
return 10;
|
|
}
|
|
}
|