Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12b35470c7 | |||
| 23cb8fcfc1 | |||
| f2af45711d | |||
| ad162f5821 | |||
| d3f87adcca | |||
| b32e4ded42 | |||
| 88e54e01b6 | |||
| ce01983f1c | |||
| 6ee79a3110 | |||
| a32bf417a7 | |||
| 337e1a07e3 | |||
| fccfe1341a | |||
| 242569316f | |||
| 78888460fc | |||
| f49b30b20e | |||
| 0067b4e1c8 | |||
| 77cf610c8b | |||
| 5cd106640c | |||
| d057cd7665 | |||
| 520225603b | |||
| c2ecc5bf98 | |||
| 8cca320a43 | |||
| 19aaf0759b | |||
| 47a83f10cc | |||
| e1a191121d | |||
| 54f4dce09b | |||
| c0aaa206ed | |||
| 0124336558 | |||
| 5ccb56309a | |||
| 7d26be253a | |||
| 0437019bb0 | |||
| be68f2ef55 | |||
| 1bf9cee8d6 | |||
| 403a7a72fb | |||
| 81ae76cdb7 | |||
| 32e5ecda8f | |||
| de98967da5 |
@@ -2,8 +2,4 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/l10n/*
|
/l10n/*
|
||||||
/releases
|
/releases
|
||||||
/package-lock.json
|
|
||||||
!/l10n/.gitkeep
|
!/l10n/.gitkeep
|
||||||
/yarn*.log
|
|
||||||
/src/admin.js.bk
|
|
||||||
/templates/settings/admin-form.php.bk
|
|
||||||
|
|||||||
+518
-133
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,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 -
|
$ VERSION=x.y.z; curl -sS "https://gitnet.fr/deblan/side_menu/releases/download/${VERSION}/side_menu_v${VERSION}.tar.gz" | tar xvfz -
|
||||||
```
|
```
|
||||||
|
|
||||||
Administrators can edit many settings using the administration page.
|
Administrators can edit many settings using the administration page.
|
||||||
|
|||||||
+3
-3
@@ -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.2</version>
|
<version>6.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>
|
||||||
@@ -52,8 +52,8 @@ In case of downtime, you can download **Custom Menu** from [here](https://kim.de
|
|||||||
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png]]></screenshot>
|
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png]]></screenshot>
|
||||||
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png]]></screenshot>
|
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png]]></screenshot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<php min-version="8.1" max-version="8.4" />
|
<php min-version="8.1" max-version="8.5" />
|
||||||
<nextcloud min-version="31" max-version="32"/>
|
<nextcloud min-version="34" max-version="34"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<settings>
|
<settings>
|
||||||
<admin>OCA\SideMenu\Settings\Admin</admin>
|
<admin>OCA\SideMenu\Settings\Admin</admin>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use OC\AllConfig;
|
|||||||
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
||||||
use OC\AppFramework\Http\Request;
|
use OC\AppFramework\Http\Request;
|
||||||
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
||||||
|
use OC\Security\CSRF\CsrfTokenManager;
|
||||||
use OC\User\User;
|
use OC\User\User;
|
||||||
use OCA\SideMenu\Service\AppRepository;
|
use OCA\SideMenu\Service\AppRepository;
|
||||||
use OCA\SideMenu\Service\CategoryRepository;
|
use OCA\SideMenu\Service\CategoryRepository;
|
||||||
@@ -19,8 +20,11 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
|||||||
use OCP\EventDispatcher\IEventDispatcher;
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\INavigationManager;
|
use OCP\INavigationManager;
|
||||||
|
use OCP\IRequest;
|
||||||
|
use OCP\IURLGenerator;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCP\L10N\IFactory;
|
use OCP\L10N\IFactory;
|
||||||
|
use OCP\Server;
|
||||||
use OCP\Util;
|
use OCP\Util;
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
|
|
||||||
@@ -34,9 +38,9 @@ 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 IConfig $config;
|
||||||
protected ContentSecurityPolicyNonceManager $cspnm;
|
protected ContentSecurityPolicyNonceManager $cspnm;
|
||||||
protected Request $request;
|
protected IRequest $request;
|
||||||
protected ?User $user = null;
|
protected ?User $user = null;
|
||||||
|
|
||||||
public function __construct(array $urlParams = [])
|
public function __construct(array $urlParams = [])
|
||||||
@@ -83,10 +87,9 @@ class Application extends App implements IBootstrap
|
|||||||
|
|
||||||
public function boot(IBootContext $context): void
|
public function boot(IBootContext $context): void
|
||||||
{
|
{
|
||||||
$this->config = \OC::$server->getConfig();
|
$this->config = Server::get(IConfig::class);
|
||||||
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
$this->user = Server::get(IUserSession::class)->getUser();
|
||||||
$this->user = \OC::$server[IUserSession::class]->getUser();
|
$this->request = Server::get(IRequest::class);
|
||||||
$this->request = \OC::$server->getRequest();
|
|
||||||
|
|
||||||
if (!$this->isEnabled()) {
|
if (!$this->isEnabled()) {
|
||||||
return;
|
return;
|
||||||
@@ -138,7 +141,7 @@ class Application extends App implements IBootstrap
|
|||||||
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');
|
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');
|
||||||
|
|
||||||
foreach ($assets as $value) {
|
foreach ($assets as $value) {
|
||||||
$route = \OC::$server->getURLGenerator()->linkToRoute(
|
$route = Server::get(IURLGenerator::class)->linkToRoute(
|
||||||
$value['route'],
|
$value['route'],
|
||||||
['v' => $cache]
|
['v' => $cache]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ class LangRepository
|
|||||||
->from('preferences')
|
->from('preferences')
|
||||||
;
|
;
|
||||||
|
|
||||||
$stmt = $qb->execute();
|
// Nextcloud >=33+
|
||||||
|
if (method_exists($qb, 'executeQuery')) {
|
||||||
|
$stmt = $qb->executeQuery();
|
||||||
|
} else {
|
||||||
|
$stmt = $qb->execute();
|
||||||
|
}
|
||||||
|
|
||||||
$langs = ['en'];
|
$langs = ['en'];
|
||||||
|
|
||||||
|
|||||||
Generated
+9300
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -11,8 +11,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": ">=7.12.0 <8.0.0",
|
"@babel/core": ">=7.12.0 <8.0.0",
|
||||||
|
"@formatjs/intl-segmenter": "^12.0.8",
|
||||||
"@nextcloud/router": "^3.0.1",
|
"@nextcloud/router": "^3.0.1",
|
||||||
"@nextcloud/vue": "^9.0.0-alpha.8",
|
"@nextcloud/vue": "^9.9.0",
|
||||||
"node-polyfill-webpack-plugin": "^4.1.0",
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
||||||
"pinia": "^3.0.1",
|
"pinia": "^3.0.1",
|
||||||
"postcss": "^7.0.0 || ^8.0.1",
|
"postcss": "^7.0.0 || ^8.0.1",
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
import './scss/admin.scss'
|
import './scss/admin.scss'
|
||||||
|
|
||||||
|
import '@formatjs/intl-segmenter/polyfill.js'
|
||||||
|
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import { waitContainer } from './lib/dom.js'
|
import { waitContainer } from './lib/dom.js'
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ const save = async () => {
|
|||||||
if (Array.isArray(value) || typeof value === 'object') {
|
if (Array.isArray(value) || typeof value === 'object') {
|
||||||
value = JSON.stringify(value)
|
value = JSON.stringify(value)
|
||||||
} else if (typeof value === 'boolean') {
|
} else if (typeof value === 'boolean') {
|
||||||
value = value ? 1 : 0
|
value = value ? '1' : '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
OCP.AppConfig.setValue('side_menu', key, value, {
|
OCP.AppConfig.setValue('side_menu', key, value.toString(), {
|
||||||
success() {
|
success() {
|
||||||
update()
|
update()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -69,11 +69,11 @@ const save = async () => {
|
|||||||
if (Array.isArray(value) || typeof value === 'object') {
|
if (Array.isArray(value) || typeof value === 'object') {
|
||||||
value = JSON.stringify(value)
|
value = JSON.stringify(value)
|
||||||
} else if (typeof value === 'boolean') {
|
} else if (typeof value === 'boolean') {
|
||||||
value = value ? 1 : 0
|
value = value ? '1' : '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
formData.push('name=' + encodeURIComponent(key))
|
formData.push('name=' + encodeURIComponent(key))
|
||||||
formData.push('value=' + encodeURIComponent(value))
|
formData.push('value=' + encodeURIComponent(value.toString()))
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
+13
-13
@@ -94,18 +94,18 @@
|
|||||||
'Search': 'Buscar'
|
'Search': 'Buscar'
|
||||||
'Toggle the menu': 'Alternar el menú'
|
'Toggle the menu': 'Alternar el menú'
|
||||||
'Open the documentation': 'Open the documentation'
|
'Open the documentation': 'Open the documentation'
|
||||||
'Ask the developer': 'Ask the developer'
|
'Ask the developer': 'Pregúntale al desarrollador'
|
||||||
'New request': 'New request'
|
'New request': 'Nueva solicitud'
|
||||||
'Report a bug': 'Report a bug'
|
'Report a bug': 'Informar de un fallo'
|
||||||
'Show the configuration': 'Show the configuration'
|
'Show the configuration': 'Mostrar los ajustes'
|
||||||
'Configuration:': 'Configuration:'
|
'Configuration:': 'Configuration:'
|
||||||
'Done!': 'Done!'
|
'Done!': '¡Realizado!'
|
||||||
'Copy': 'Copy'
|
'Copy': 'Copiar'
|
||||||
'Need help': 'Need help'
|
'Need help': 'Ayudame'
|
||||||
'I would like a new feature': 'I would like a new feature'
|
'I would like a new feature': 'Me gustaría una nueva función'
|
||||||
'Something went wrong': 'Something went wrong'
|
'Something went wrong': 'Algo salió mal'
|
||||||
'Select apps': 'Select apps'
|
'Select apps': 'Selecciona las aplicaciones'
|
||||||
'Sort': 'Sort'
|
'Sort': 'Ordenar'
|
||||||
'Customize': 'Customize'
|
'Customize': 'Personalizar'
|
||||||
'Custom': 'Custom'
|
'Custom': 'Custom'
|
||||||
'Close': 'Close'
|
'Close': 'Cerrar'
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
'Show only the opener (hidden logo)': '仅显示触发器(隐藏徽标)'
|
'Show only the opener (hidden logo)': '仅显示触发器(隐藏徽标)'
|
||||||
'Do not display the side menu and the opener if there is no application (eg: public pages).': '如果没有应用程序(例如:公共页面),则不要显示侧边栏菜单和触发器。'
|
'Do not display the side menu and the opener if there is no application (eg: public pages).': '如果没有应用程序(例如:公共页面),则不要显示侧边栏菜单和触发器。'
|
||||||
'Panel': '面板'
|
'Panel': '面板'
|
||||||
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': '当鼠标悬停在触发器上时打开菜单(在触摸屏上自动禁用)'
|
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': '当鼠标悬停在触发器上时打开菜单(在触摸屏上自动禁用)'
|
||||||
'Display the big menu': '显示大型菜单'
|
'Display the big menu': '显示大型菜单'
|
||||||
'Display the logo': '显示徽标'
|
'Display the logo': '显示徽标'
|
||||||
'Icons and texts': '图标和文本'
|
'Icons and texts': '图标和文本'
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
import './scss/menu.scss'
|
import './scss/menu.scss'
|
||||||
|
|
||||||
|
import '@formatjs/intl-segmenter/polyfill.js'
|
||||||
|
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import { createElement, waitContainer } from './lib/dom.js'
|
import { createElement, waitContainer } from './lib/dom.js'
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
import './scss/admin.scss'
|
import './scss/admin.scss'
|
||||||
|
|
||||||
|
import '@formatjs/intl-segmenter/polyfill.js'
|
||||||
|
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import { waitContainer } from './lib/dom.js'
|
import { waitContainer } from './lib/dom.js'
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ body[data-theme-light], body[data-theme-light-highcontrast] {
|
|||||||
|
|
||||||
<?php if ($_['opener-only']) { ?>
|
<?php if ($_['opener-only']) { ?>
|
||||||
#nextcloud {
|
#nextcloud {
|
||||||
display: none;
|
display: none !important;
|
||||||
}
|
}
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user