2022-08-13 01:58:37 +00:00
|
|
|
<?php
|
|
|
|
namespace OCA\BetterPhotos\Controller;
|
|
|
|
|
|
|
|
use OCP\IRequest;
|
|
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
|
|
use OCP\AppFramework\Http\DataResponse;
|
|
|
|
use OCP\AppFramework\Controller;
|
2022-08-14 20:54:18 +00:00
|
|
|
use OCP\Util;
|
2022-08-13 01:58:37 +00:00
|
|
|
|
|
|
|
class PageController extends Controller {
|
|
|
|
private $userId;
|
2022-08-14 20:54:18 +00:00
|
|
|
protected $appName;
|
2022-08-13 01:58:37 +00:00
|
|
|
|
|
|
|
public function __construct($AppName, IRequest $request, $UserId){
|
|
|
|
parent::__construct($AppName, $request);
|
|
|
|
$this->userId = $UserId;
|
2022-08-14 20:54:18 +00:00
|
|
|
$this->appName = $AppName;
|
2022-08-13 01:58:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @NoAdminRequired
|
|
|
|
* @NoCSRFRequired
|
|
|
|
*/
|
|
|
|
public function index() {
|
2022-08-14 20:54:18 +00:00
|
|
|
Util::addScript($this->appName, 'betterphotos-main');
|
|
|
|
Util::addStyle($this->appName, 'icons');
|
|
|
|
|
|
|
|
$response = new TemplateResponse($this->appName, 'main');
|
|
|
|
return $response;
|
2022-08-13 01:58:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|