Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b1e19ac965 | |||
| ea83cc050c | |||
| 36750532f6 | |||
| cf9495de46 | |||
| 076435dc8e | |||
| fe5f0287c3 | |||
| eff18bb143 | |||
| 29826d3c54 | |||
| 695934c28b | |||
| aa2246a1ec | |||
| da04cf4222 | |||
| 7b33271d00 | |||
| e4e054835d | |||
| eae8ce80fb | |||
| 972c69d880 | |||
| dd8561e691 | |||
| 61a4689eb2 | |||
| 4532dd345e | |||
| 6effdc6eed | |||
| 810d83880b | |||
| 25e70f276f | |||
| d06b6b9e31 | |||
| 5c218bff2a | |||
| b0385c172b | |||
| 04ac7e5ed1 | |||
| 67743485cb | |||
| 0ce318d6ec | |||
| c26c5f26df | |||
| 6ce7d3223f | |||
| 6eb977dad5 | |||
| 5f307cd046 | |||
| d2421f90bf | |||
| b16da36507 | |||
| 29f0ead9cc | |||
| e1567b0689 | |||
| aa139bc671 | |||
| b133ba3a97 | |||
| aaf2bb55db | |||
| 749f25a231 | |||
| 04026f5c75 | |||
| 48b2b30406 | |||
| 22e5445330 | |||
| 0544fd3765 | |||
| 2635dd89ca | |||
| aa203bb406 | |||
| 368c59a2bd | |||
| ab7b1e96fe | |||
| f4322a8d71 |
@@ -1,24 +1,5 @@
|
|||||||
## [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
|
|
||||||
### Fixed
|
|
||||||
* fix #422: undefined array key "HTTP_USER_AGENT"
|
|
||||||
|
|
||||||
## 5.0.2
|
|
||||||
### Fixed
|
|
||||||
* fix #413: add user-agent check for memories mobile app
|
|
||||||
* fix #418: allow non admin user to access their settings
|
|
||||||
|
|
||||||
## 5.0.1
|
|
||||||
### Fixed
|
|
||||||
* fix(StandardMenu): appLimit must return a value > 0
|
|
||||||
|
|
||||||
## 5.0.0
|
## 5.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
* fix apps's order in the standard menu
|
* fix apps's order in the standard menu
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ You like this app and you want to support me? ☕ [Buy me a coffee](https://www.
|
|||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* PHP >= 8.1
|
* PHP >= 8.0
|
||||||
|
* App `theming` enabled
|
||||||
|
|
||||||
Installation and upgrade
|
Installation and upgrade
|
||||||
------------------------
|
------------------------
|
||||||
@@ -40,7 +41,7 @@ If you want to install it from source, go to https://gitnet.fr/deblan/side_menu/
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ cd /path/to/nextcloud/apps
|
$ cd /path/to/nextcloud/apps
|
||||||
$ VERSION=x.y.z; curl -sS https://gitnet.fr/deblan/side_menu/releases/download/v${VERSION}/side_menu_v${VERSION}.tar.gz | tar xvfz -
|
$ curl -sS https://gitnet.fr/attachments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | tar xvfz -
|
||||||
```
|
```
|
||||||
|
|
||||||
Administrators can edit many settings using the administration page.
|
Administrators can edit many settings using the administration page.
|
||||||
|
|||||||
+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.1.0</version>
|
<version>5.0.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>
|
||||||
|
|||||||
+16
-11
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
namespace OCA\SideMenu\AppInfo;
|
namespace OCA\SideMenu\AppInfo;
|
||||||
|
|
||||||
use OC\AllConfig;
|
use OC;
|
||||||
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;
|
||||||
@@ -32,12 +31,23 @@ 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;
|
/**
|
||||||
protected ContentSecurityPolicyNonceManager $cspnm;
|
* @var OC\AllConfig
|
||||||
protected Request $request;
|
*/
|
||||||
protected ?User $user = null;
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ContentSecurityPolicyNonceManager
|
||||||
|
*/
|
||||||
|
protected $cspnm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
|
protected $user;
|
||||||
|
|
||||||
public function __construct(array $urlParams = [])
|
public function __construct(array $urlParams = [])
|
||||||
{
|
{
|
||||||
@@ -86,7 +96,6 @@ 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;
|
||||||
@@ -97,10 +106,6 @@ class Application extends App implements IBootstrap
|
|||||||
|
|
||||||
protected function isEnabled(): bool
|
protected function isEnabled(): bool
|
||||||
{
|
{
|
||||||
if (isset($this->request->server['HTTP_USER_AGENT']) && preg_match('/MemoriesNative/', $this->request->server['HTTP_USER_AGENT'])) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$enabled = true;
|
$enabled = true;
|
||||||
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
|
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ class PersonalSettingController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[NoCSRFRequired]
|
#[NoCSRFRequired]
|
||||||
#[NoAdminRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/user/config')]
|
#[FrontpageRoute(verb: 'GET', url: '/user/config')]
|
||||||
public function configuration(): JSONResponse
|
public function configuration(): JSONResponse
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ 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
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const appLimit = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0, Math.floor((body.offsetWidth - size) / 70))
|
return Math.floor((body.offsetWidth - size) / 70)
|
||||||
}
|
}
|
||||||
|
|
||||||
const makeStyle = (app) => {
|
const makeStyle = (app) => {
|
||||||
@@ -158,11 +158,6 @@ const computeLists = () => {
|
|||||||
popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order)
|
popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order)
|
||||||
}
|
}
|
||||||
|
|
||||||
const reComputeLists = (delay) => {
|
|
||||||
window.clearTimeout(resizeTimeout)
|
|
||||||
resizeTimeout = window.setTimeout(computeLists, delay || 100)
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const config = await configStore.getConfig()
|
const config = await configStore.getConfig()
|
||||||
|
|
||||||
@@ -174,7 +169,10 @@ onMounted(async () => {
|
|||||||
|
|
||||||
setApps(await navStore.getCoreApps())
|
setApps(await navStore.getCoreApps())
|
||||||
|
|
||||||
window.addEventListener('resize', reComputeLists)
|
window.addEventListener('resize', () => {
|
||||||
|
window.clearTimeout(resizeTimeout)
|
||||||
|
resizeTimeout = window.setTimeout(computeLists, 100)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user