Nextcloud rename Ajax to Fetch and added Nextcloud theme for #96

This commit is contained in:
the-djmaze 2022-10-11 14:49:22 +02:00
parent 63ef2cc724
commit 47c1071f3f
7 changed files with 84 additions and 57 deletions

View file

@ -3,7 +3,7 @@
namespace OCA\SnappyMail\AppInfo;
use OCA\SnappyMail\Util\SnappyMailHelper;
use OCA\SnappyMail\Controller\AjaxController;
use OCA\SnappyMail\Controller\FetchController;
use OCA\SnappyMail\Controller\PageController;
use OCP\AppFramework\App;
@ -47,8 +47,8 @@ class Application extends App implements IBootstrap
);
$container->registerService(
'AjaxController', function($c) {
return new AjaxController(
'FetchController', function($c) {
return new FetchController(
$c->query('AppName'),
$c->query('Request'),
$c->getServer()->getAppManager(),

View file

@ -11,7 +11,7 @@ use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
class AjaxController extends Controller {
class FetchController extends Controller {
private $config;
private $appManager;

View file

@ -9,32 +9,28 @@ class PersonalSettings implements ISettings
{
private $config;
public function __construct(IConfig $config) {
public function __construct(IConfig $config)
{
$this->config = $config;
}
public function getForm() {
public function getForm()
{
$uid = \OC::$server->getUserSession()->getUser()->getUID();
$keys = [
'snappymail-email',
'snappymail-password'
$parameters = [
'snappymail-email' => $this->config->getUserValue($uid, 'snappymail', 'snappymail-email'),
'snappymail-password' => $this->config->getUserValue($uid, 'snappymail', 'snappymail-password') ? '******' : ''
];
$parameters = [];
foreach ($keys as $k) {
$v = $this->config->getUserValue($uid, 'snappymail', $k);
$parameters[$k] = $v;
}
return new TemplateResponse('snappymail', 'personal_settings', $parameters, '');
}
public function getSection() {
public function getSection()
{
return 'additional';
}
public function getPriority() {
public function getPriority()
{
return 50;
}