Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c6f0ad1da | |||
| 7485a5b349 | |||
| b0e01c2eec | |||
| d2730afe9f | |||
| 33ab7dff97 | |||
| 0da550e3eb | |||
| 4bea4afb07 | |||
| d485b728e7 |
@@ -1,5 +1,11 @@
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## 5.1.0
|
||||||
|
### Added
|
||||||
|
* fix #425: allow to set a color using hex code
|
||||||
|
### Fixed
|
||||||
|
* #422: usage of `OC\AppFramework\Http\Request` instead of `$_SERVER`
|
||||||
|
|
||||||
## 5.0.3
|
## 5.0.3
|
||||||
### Fixed
|
### Fixed
|
||||||
* fix #422: undefined array key "HTTP_USER_AGENT"
|
* fix #422: undefined array key "HTTP_USER_AGENT"
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ Notice
|
|||||||
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
|
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
|
||||||
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
|
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
|
||||||
]]></description>
|
]]></description>
|
||||||
<version>5.0.3</version>
|
<version>5.1.0</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
||||||
<namespace>SideMenu</namespace>
|
<namespace>SideMenu</namespace>
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
namespace OCA\SideMenu\AppInfo;
|
namespace OCA\SideMenu\AppInfo;
|
||||||
|
|
||||||
use OC;
|
use OC\AllConfig;
|
||||||
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
||||||
|
use OC\AppFramework\Http\Request;
|
||||||
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
||||||
use OC\User\User;
|
use OC\User\User;
|
||||||
use OCA\SideMenu\Service\AppRepository;
|
use OCA\SideMenu\Service\AppRepository;
|
||||||
@@ -31,23 +32,12 @@ use Psr\Container\ContainerInterface;
|
|||||||
class Application extends App implements IBootstrap
|
class Application extends App implements IBootstrap
|
||||||
{
|
{
|
||||||
public const APP_ID = 'side_menu';
|
public const APP_ID = 'side_menu';
|
||||||
|
|
||||||
public const APP_NAME = 'Custom menu';
|
public const APP_NAME = 'Custom menu';
|
||||||
|
|
||||||
/**
|
protected AllConfig $config;
|
||||||
* @var OC\AllConfig
|
protected ContentSecurityPolicyNonceManager $cspnm;
|
||||||
*/
|
protected Request $request;
|
||||||
protected $config;
|
protected ?User $user = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var ContentSecurityPolicyNonceManager
|
|
||||||
*/
|
|
||||||
protected $cspnm;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var User
|
|
||||||
*/
|
|
||||||
protected $user;
|
|
||||||
|
|
||||||
public function __construct(array $urlParams = [])
|
public function __construct(array $urlParams = [])
|
||||||
{
|
{
|
||||||
@@ -96,6 +86,7 @@ class Application extends App implements IBootstrap
|
|||||||
$this->config = \OC::$server->getConfig();
|
$this->config = \OC::$server->getConfig();
|
||||||
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
||||||
$this->user = \OC::$server[IUserSession::class]->getUser();
|
$this->user = \OC::$server[IUserSession::class]->getUser();
|
||||||
|
$this->request = \OC::$server->getRequest();
|
||||||
|
|
||||||
if (!$this->isEnabled()) {
|
if (!$this->isEnabled()) {
|
||||||
return;
|
return;
|
||||||
@@ -106,7 +97,7 @@ class Application extends App implements IBootstrap
|
|||||||
|
|
||||||
protected function isEnabled(): bool
|
protected function isEnabled(): bool
|
||||||
{
|
{
|
||||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) {
|
if (isset($this->request->server['HTTP_USER_AGENT']) && preg_match('/MemoriesNative/', $this->request->server['HTTP_USER_AGENT'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<template>
|
<template>
|
||||||
<NcColorPicker
|
<NcColorPicker
|
||||||
v-model="model"
|
v-model="model"
|
||||||
|
:advancedFields="true"
|
||||||
class="cm-settings-form-colorpicker"
|
class="cm-settings-form-colorpicker"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user