From ddb7cc40ce2dd11e8b351b587ba7ba1cbaa1b3a1 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 6 Aug 2020 15:00:24 +0200 Subject: [PATCH 01/18] refactor appinfo --- appinfo/app.php | 70 ++-------------------- lib/AppInfo/Application.php | 114 ++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 66 deletions(-) create mode 100644 lib/AppInfo/Application.php diff --git a/appinfo/app.php b/appinfo/app.php index 86a3245..458237a 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,71 +1,9 @@ . - */ +use OCA\SideMenu\AppInfo\Application; -namespace OCA\SideMenu\Appinfo; +$app = new Application(); -use OC\Security\CSP\ContentSecurityPolicy; -use OCP\Util; -use OCP\IUserSession; - -$config = \OC::$server->getConfig(); -$cspnm = \OC::$server->getContentSecurityPolicyNonceManager(); -$user = \OC::$server[IUserSession::class]->getUser(); - -$enabled = true; - -if ($user !== null) { - $enabled = (bool) $config->getUserValue($user->getUid(), 'side_menu', 'enabled', '1'); -} - -if ($enabled) { - Util::addScript('side_menu', 'sideMenu'); - Util::addStyle('side_menu', 'sideMenu'); - - $stylesheet = \OC::$server->getURLGenerator()->linkToRoute( - 'side_menu.Css.stylesheet', - [ - 'v' => $config->getAppValue('side_menu', 'cache', '0'), - ] - ); - - $script = \OC::$server->getURLGenerator()->linkToRoute( - 'side_menu.Js.script', - [ - 'v' => $config->getAppValue('side_menu', 'cache', '0'), - ] - ); - - Util::addHeader( - 'link', - [ - 'href' => $stylesheet, - 'rel' => 'stylesheet' - ], - '' - ); - - Util::addHeader( - 'script', - [ - 'src' => $script, - 'nonce' => $cspnm->getNonce(), - ], - '' - ); +if ($app->isEnabled()) { + $app->registerAssets(); } diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php new file mode 100644 index 0000000..35671c1 --- /dev/null +++ b/lib/AppInfo/Application.php @@ -0,0 +1,114 @@ + + */ +class Application extends App +{ + /** + * @var OC\AllConfig + */ + protected $config; + + /** + * @var ContentSecurityPolicyNonceManager + */ + protected $cspnm; + + /** + * @var User + */ + protected $user; + + /** + * {@inheritdoc} + */ + public function __construct(array $urlParams = []) + { + parent::__construct('side_menu', $urlParams); + + $this->config = OC::$server->getConfig(); + $this->cspnm = OC::$server->getContentSecurityPolicyNonceManager(); + $this->user = OC::$server[IUserSession::class]->getUser(); + } + + /** + * Checks if this app is enabled. + */ + public function isEnabled(): bool + { + $enabled = true; + + if (null !== $this->user) { + $enabled = (bool) $this->config->getUserValue($this->user->getUid(), 'side_menu', 'enabled', '1'); + } + + return $enabled; + } + + /** + * Registes services. + */ + public function registerServices() + { + $container = $this->getContainer(); + + $container->registerService('AppRepository', function (ContainerInterface $c) { + return new AppRepository(new OC_App()); + }); + } + + /** + * Registers assets. + */ + public function registerAssets() + { + Util::addScript('side_menu', 'sideMenu'); + Util::addStyle('side_menu', 'sideMenu'); + + $stylesheet = OC::$server->getURLGenerator()->linkToRoute( + 'side_menu.Css.stylesheet', + [ + 'v' => $this->config->getAppValue('side_menu', 'cache', '0'), + ] + ); + + $script = OC::$server->getURLGenerator()->linkToRoute( + 'side_menu.Js.script', + [ + 'v' => $this->config->getAppValue('side_menu', 'cache', '0'), + ] + ); + + Util::addHeader( + 'link', + [ + 'href' => $stylesheet, + 'rel' => 'stylesheet', + ], + '' + ); + + Util::addHeader( + 'script', + [ + 'src' => $script, + 'nonce' => $this->cspnm->getNonce(), + ], + '' + ); + } +} From 8e0be738a69c36eb16b397b6c30845d99a6fd47f Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 6 Aug 2020 15:00:59 +0200 Subject: [PATCH 02/18] add base of the big menu --- appinfo/routes.php | 1 + lib/Controller/CssController.php | 1 + lib/Controller/JsController.php | 1 + lib/Controller/NavController.php | 139 +++++++++++++++++++ lib/Controller/PersonalSettingController.php | 8 +- lib/Service/AppRepository.php | 48 +++++++ lib/Settings/Admin.php | 1 + lib/Settings/Personal.php | 1 + package.json | 1 + src/SideMenu.js | 16 ++- src/SideMenuBig.vue | 68 +++++++++ templates/js/script.php | 4 + templates/settings/admin-form.php | 24 +++- templates/settings/personal-form.php | 18 +++ 14 files changed, 324 insertions(+), 7 deletions(-) create mode 100644 lib/Controller/NavController.php create mode 100644 lib/Service/AppRepository.php create mode 100644 src/SideMenuBig.vue diff --git a/appinfo/routes.php b/appinfo/routes.php index dc82109..be3ae60 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -21,6 +21,7 @@ return [ 'routes' => [ ['name' => 'Css#stylesheet', 'url' => '/css/stylesheet', 'verb' => 'GET'], ['name' => 'Js#script', 'url' => '/js/script', 'verb' => 'GET'], + ['name' => 'Nav#items', 'url' => '/nav/items', 'verb' => 'GET'], ['name' => 'PersonalSetting#valueSet', 'url' => '/personalSetting/valueSet', 'verb' => 'POST'], ], ]; diff --git a/lib/Controller/CssController.php b/lib/Controller/CssController.php index b950115..6210dc0 100644 --- a/lib/Controller/CssController.php +++ b/lib/Controller/CssController.php @@ -70,6 +70,7 @@ class CssController extends Controller 'external-sites-in-top-menu' => (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0), 'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'), 'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'), + 'big-menu' => (bool) $this->config->getAppValue('side_menu', 'big-menu', '0'), ]; $response = new TemplateResponse('side_menu', 'css/stylesheet', $parameters, 'blank'); diff --git a/lib/Controller/JsController.php b/lib/Controller/JsController.php index 49eee72..918e481 100644 --- a/lib/Controller/JsController.php +++ b/lib/Controller/JsController.php @@ -60,6 +60,7 @@ class JsController extends Controller 'force-light-icon' => (bool) $this->config->getAppValue('side_menu', 'force-light-icon', '0'), 'hide-when-no-apps' => (bool) $this->config->getAppValue('side_menu', 'hide-when-no-apps', '0'), 'loader-enabled' => (bool) $this->config->getAppValue('side_menu', 'loader-enabled', '1'), + 'big-menu' => (bool) $this->config->getAppValue('side_menu', 'big-menu', '0'), ]; $response = new TemplateResponse('side_menu', 'js/script', $parameters, 'blank'); diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php new file mode 100644 index 0000000..ba8da4b --- /dev/null +++ b/lib/Controller/NavController.php @@ -0,0 +1,139 @@ +. + */ + +namespace OCA\SideMenu\Controller; + +use OCA\SideMenu\Service\AppRepository; +use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\JSONResponse; +use OCP\IConfig; +use OCP\IL10N; +use OCP\IRequest; +use OC\App\AppStore\Fetcher\CategoryFetcher; +use OCP\L10N\IFactory; + +class NavController extends Controller +{ + /** + * @var \OCP\IConfig + */ + protected $config; + + /** + * @var AppRepository + */ + protected $appRepository; + + /** + * @var IL10N + */ + protected $trans; + + /** + * @var IFactory + */ + protected $l10nFactory; + + /** + * @var CategoryFetcher + */ + protected $categoryFetcher; + + /** + * @param string $appName + */ + public function __construct( + $appName, + IRequest $request, + IConfig $config, + AppRepository $appRepository, + CategoryFetcher $categoryFetcher, + IFactory $l10nFactory, + IL10N $trans) + { + parent::__construct($appName, $request); + + $this->config = $config; + $this->appRepository = $appRepository; + $this->categoryFetcher = $categoryFetcher; + $this->l10nFactory = $l10nFactory; + $this->trans = $trans; + } + + /** + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage + * + * @return JSONResponse + */ + public function items() + { + $apps = $this->appRepository->getVisibleApps(); + $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); + $categoriesLabels = $this->categoryFetcher->get(); + $items = []; + + foreach ($categoriesLabels as $k => $category) { + $categoriesLabels[$category['id']] = $category['translations'][$currentLanguage]['name'] ?? $category['translations']['en']['name']; + + unset($categoriesLabels[$k]); + } + + foreach ($apps as $app) { + $categories = $app['category']; + + foreach ($categories as $category) { + if (!isset($items[$category])) { + $items[$category] = [ + 'name' => $categoriesLabels[$category], + 'apps' => [], + ]; + } + + $items[$category]['apps'][$app['id']] = [ + 'name' => $app['name'], + 'href' => '#', + 'icon' => $app['previewAsIcon'] ? $app['preview'] : null, + ]; + } + } + + $items['other'] = [ + 'label' => $this->trans->t('Other'), + 'apps' => [], + ]; + + // foreach ($items as $category => $value) { + // if ($category !== 'other') { + // if (count($value['apps']) < 0) { + // $items['other']['apps'] = array_merge( + // $items['other']['apps'], + // $value['apps'] + // ); + // + // unset($items[$category]); + // } + // } + // } + + return new JSONResponse([ + 'items' => $items, + ]); + } +} diff --git a/lib/Controller/PersonalSettingController.php b/lib/Controller/PersonalSettingController.php index 2beba19..4ff135f 100644 --- a/lib/Controller/PersonalSettingController.php +++ b/lib/Controller/PersonalSettingController.php @@ -61,10 +61,16 @@ class PersonalSettingController extends Controller if (!in_array($value, ['0', '1'])) { $value = '1'; } + } elseif ($name === 'big-menu') { + $doSave = true; + + if (!in_array($value, ['0', '1'])) { + $value = '0'; + } } if ($doSave) { - $this->config->setUserValue($user->getUid(), 'side_menu', 'enabled', $value); + $this->config->setUserValue($user->getUid(), 'side_menu', $name, $value); } return []; diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php new file mode 100644 index 0000000..bb202e3 --- /dev/null +++ b/lib/Service/AppRepository.php @@ -0,0 +1,48 @@ + + */ +class AppRepository +{ + /** + * @var OC_App + */ + protected $ocApp; + + /** + * @param OC_App $ocApp + */ + public function __construct(OC_App $ocApp) + { + $this->ocApp = $ocApp; + } + + /** + * Retrieves visibles apps. + * + * @return array + */ + public function getVisibleApps() + { + $navigation = $this->ocApp->getNavigation(); + $apps = $this->ocApp->listAllApps(); + $visibleApps = []; + + foreach ($apps as $app) { + $id = $app['id']; + + if (isset($navigation[$id])) { + $visibleApps[$id] = $app; + } + } + + return $visibleApps; + } +} diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index f368bfa..94a3c6c 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -66,6 +66,7 @@ class Admin implements ISettings 'force-light-icon' => $this->config->getAppValue('side_menu', 'force-light-icon', '0'), 'cache' => $this->config->getAppValue('side_menu', 'cache', '0'), 'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'), + 'big-menu' => $this->config->getAppValue('side_menu', 'big-menu', '0'), 'display-logo' => $this->config->getAppValue('side_menu', 'display-logo', '1'), 'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'), 'opener-hover' => $this->config->getAppValue('side_menu', 'opener-hover', '0'), diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index beef491..115647d 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -64,6 +64,7 @@ class Personal implements ISettings $parameters = [ 'enabled' => $this->config->getUserValue($user->getUid(), 'side_menu', 'enabled', '1'), + 'big-menu' => $this->config->getUserValue($user->getUid(), 'side_menu', 'big-menu', '0'), ]; return new TemplateResponse('side_menu', 'settings/personal-form', $parameters, ''); diff --git a/package.json b/package.json index 3837c1b..38edace 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "@nextcloud/axios": "^1.3.2", "@nextcloud/vue": "^1.4.0", + "axios": "^0.19.2", "trim": "0.0.1", "vue": "^2.6.11" }, diff --git a/src/SideMenu.js b/src/SideMenu.js index dd7d323..05d5e17 100644 --- a/src/SideMenu.js +++ b/src/SideMenu.js @@ -17,18 +17,28 @@ import Vue from 'vue' import SideMenu from './SideMenu.vue' +import SideMenuBig from './SideMenuBig.vue' // Vue.prototype.t = t -// Vue.prototype.OC = OC +Vue.prototype.OC = OC // Vue.prototype.OC = OCP -const View = Vue.extend(SideMenu) -const sideMenu = new View({}) const mountSideMenuComponent = () => { const sideMenuContainer = document.querySelector('#side-menu') if (sideMenuContainer) { + let component + + if (sideMenuContainer.getAttribute('data-bigmenu')) { + component = SideMenuBig + } else { + component = SideMenu + } + + const View = Vue.extend(component) + const sideMenu = new View({}) + sideMenu.$mount('#side-menu') $('body').trigger('side-menu.ready') diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue new file mode 100644 index 0000000..c5023c7 --- /dev/null +++ b/src/SideMenuBig.vue @@ -0,0 +1,68 @@ + + + + diff --git a/templates/js/script.php b/templates/js/script.php index acc730d..a5297a5 100644 --- a/templates/js/script.php +++ b/templates/js/script.php @@ -5,6 +5,10 @@ var body = $('body') var isTouchDevice = window.matchMedia("(pointer: coarse)").matches + + sideMenu.attr('data-bigmenu', '1') + + sideMenuContainer.attr('data-forcelighticon', '1') diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index a5dc23a..84702be 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -217,6 +217,9 @@ $choicesSizes = [ +

Use the shortcut Ctrl+o + to open and to hide the side menu. Use tab to navigate.

+
-

Use the shortcut Ctrl+o - to open and to hide the side menu. Use tab to navigate.

+
+ +
+ +

The big menu is not compatible with AppOrder.

+ +
+ +
diff --git a/templates/settings/personal-form.php b/templates/settings/personal-form.php index 9f7cffe..b430cb8 100644 --- a/templates/settings/personal-form.php +++ b/templates/settings/personal-form.php @@ -49,6 +49,24 @@ $choicesYesNo = [ +
+ +
+ +
+ +
+ +

The big menu is not compatible with AppOrder.

+

Use the shortcut Ctrl+o to open and to hide the side menu. Use tab to navigate.

From 8c3dd2a4f66ea6bd6145682dd102af11beb76ea8 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 10:33:48 +0200 Subject: [PATCH 03/18] remove personal setting for the big menu --- lib/Controller/PersonalSettingController.php | 6 ------ lib/Settings/Personal.php | 1 - templates/settings/personal-form.php | 18 ------------------ 3 files changed, 25 deletions(-) diff --git a/lib/Controller/PersonalSettingController.php b/lib/Controller/PersonalSettingController.php index 4ff135f..a55a524 100644 --- a/lib/Controller/PersonalSettingController.php +++ b/lib/Controller/PersonalSettingController.php @@ -61,12 +61,6 @@ class PersonalSettingController extends Controller if (!in_array($value, ['0', '1'])) { $value = '1'; } - } elseif ($name === 'big-menu') { - $doSave = true; - - if (!in_array($value, ['0', '1'])) { - $value = '0'; - } } if ($doSave) { diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index 115647d..beef491 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -64,7 +64,6 @@ class Personal implements ISettings $parameters = [ 'enabled' => $this->config->getUserValue($user->getUid(), 'side_menu', 'enabled', '1'), - 'big-menu' => $this->config->getUserValue($user->getUid(), 'side_menu', 'big-menu', '0'), ]; return new TemplateResponse('side_menu', 'settings/personal-form', $parameters, ''); diff --git a/templates/settings/personal-form.php b/templates/settings/personal-form.php index b430cb8..9f7cffe 100644 --- a/templates/settings/personal-form.php +++ b/templates/settings/personal-form.php @@ -49,24 +49,6 @@ $choicesYesNo = [ -
- -
- -
- -
- -

The big menu is not compatible with AppOrder.

-

Use the shortcut Ctrl+o to open and to hide the side menu. Use tab to navigate.

From 5a86e1686184c7ada71980511abd06382aa33cfe Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 10:34:06 +0200 Subject: [PATCH 04/18] update ui of the big menu --- css/sideMenu.css | 65 +++++++++++++++++++++++++++++++++++++++++++++ src/SideMenuBig.vue | 30 +++++++++++++-------- 2 files changed, 84 insertions(+), 11 deletions(-) diff --git a/css/sideMenu.css b/css/sideMenu.css index b4c41c1..f4fad95 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -122,3 +122,68 @@ width: 0; transition-property: width; } + +#side-menu.side-menu-big { + max-width: 100%; + height: auto; +} + +.side-menu-big .side-menu-header { + height: auto; +} + +.side-menu-big .side-menu-apps-list { + height: auto; + position: static; + max-width: 100vh; + overflow: auto; +} + +.side-menu-big .side-menu-app a { + padding: 7px 0 7px 7px; +} + +.side-menu-categories-wrapper { + padding: 0 10% 50px 10%; +} + +.side-menu-categories { + width: 100%; + max-height: calc(100vh - 50px); + overflow: auto; + position: relative; + top: 50px; + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.side-menu-category { + flex: auto; + margin: 10px; +} + +.side-menu-category-title { + padding-left: 10px; + color: var(--side-menu-text-color, #fff); +} + +.side-menu-big .side-menu-app-icon { + vertical-align: middle; + margin-top: -2px; +} + +@media screen and (max-width: 1024px) { + .side-menu-categories-wrapper { + padding-left: 0; + padding-right: 0; + } + + .side-menu-categories { + display: block; + } + + .side-menu-category { + margin: 10px 0; + } +} diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue index c5023c7..e8758d4 100644 --- a/src/SideMenuBig.vue +++ b/src/SideMenuBig.vue @@ -15,18 +15,26 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> From 307f69906b73811d05b5a9bab5b4398e16ff4415 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 10:40:31 +0200 Subject: [PATCH 05/18] add links --- lib/Controller/NavController.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index ba8da4b..b89baad 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -18,14 +18,15 @@ namespace OCA\SideMenu\Controller; +use OC\App\AppStore\Fetcher\CategoryFetcher; use OCA\SideMenu\Service\AppRepository; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; use OCP\IConfig; use OCP\IL10N; use OCP\IRequest; -use OC\App\AppStore\Fetcher\CategoryFetcher; use OCP\L10N\IFactory; +use OC\URLGenerator; class NavController extends Controller { @@ -54,6 +55,11 @@ class NavController extends Controller */ protected $categoryFetcher; + /** + * @var URLGenerator + */ + protected $router; + /** * @param string $appName */ @@ -62,16 +68,18 @@ class NavController extends Controller IRequest $request, IConfig $config, AppRepository $appRepository, - CategoryFetcher $categoryFetcher, - IFactory $l10nFactory, + CategoryFetcher $categoryFetcher, + URLGenerator $router, + IFactory $l10nFactory, IL10N $trans) { parent::__construct($appName, $request); $this->config = $config; $this->appRepository = $appRepository; - $this->categoryFetcher = $categoryFetcher; - $this->l10nFactory = $l10nFactory; + $this->categoryFetcher = $categoryFetcher; + $this->l10nFactory = $l10nFactory; + $this->router = $router; $this->trans = $trans; } @@ -108,7 +116,7 @@ class NavController extends Controller $items[$category]['apps'][$app['id']] = [ 'name' => $app['name'], - 'href' => '#', + 'href' => $this->router->linkTo($app['id'], ''), 'icon' => $app['previewAsIcon'] ? $app['preview'] : null, ]; } From ce5c80652429eadf8eb53d27d426d08b4c1c2a00 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 13:34:36 +0200 Subject: [PATCH 06/18] update ui of the big menu, add 'files' app --- css/sideMenu.css | 8 ++-- lib/Controller/NavController.php | 70 +++++++++++++++++++++++++------- src/SideMenuBig.vue | 57 +++++++++++++------------- 3 files changed, 88 insertions(+), 47 deletions(-) diff --git a/css/sideMenu.css b/css/sideMenu.css index f4fad95..e051ac4 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -144,7 +144,7 @@ } .side-menu-categories-wrapper { - padding: 0 10% 50px 10%; + padding: 0 10% 70px 10%; } .side-menu-categories { @@ -159,8 +159,8 @@ } .side-menu-category { - flex: auto; - margin: 10px; + padding: 10px 20px; + flex: 1 1 auto; } .side-menu-category-title { @@ -184,6 +184,6 @@ } .side-menu-category { - margin: 10px 0; + padding: 10px 0; } } diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index b89baad..36b3451 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -95,6 +95,8 @@ class NavController extends Controller $apps = $this->appRepository->getVisibleApps(); $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); $categoriesLabels = $this->categoryFetcher->get(); + $appsCategories = []; + $categoriesAppsCount = []; $items = []; foreach ($categoriesLabels as $k => $category) { @@ -104,7 +106,8 @@ class NavController extends Controller } foreach ($apps as $app) { - $categories = $app['category']; + $categories = (array) $app['category']; + $appsCategories[$app['id']] = []; foreach ($categories as $category) { if (!isset($items[$category])) { @@ -114,6 +117,14 @@ class NavController extends Controller ]; } + if (!isset($categoriesAppsCount[$category])) { + $categoriesAppsCount[$category] = 0; + } + + ++$categoriesAppsCount[$category]; + + $appsCategories[$app['id']][] = $category; + $items[$category]['apps'][$app['id']] = [ 'name' => $app['name'], 'href' => $this->router->linkTo($app['id'], ''), @@ -122,23 +133,52 @@ class NavController extends Controller } } + arsort($categoriesAppsCount); + + $keys = array_keys($categoriesAppsCount); + + foreach ($appsCategories as $app => $appCategories) { + $smallerIndex = count($categoriesAppsCount) - 1; + + foreach ($appCategories as $appCategory) { + $appKey = array_keys($keys, $appCategory)[0]; + + if ($appKey < $smallerIndex) { + $smallerIndex = $appKey; + } + } + + $category = $keys[$smallerIndex]; + + foreach ($items as $itemCategory => $value) { + if ($itemCategory !== $category && isset($value['apps'][$app])) { + unset($items[$itemCategory]['apps'][$app]); + + if (empty($items[$itemCategory]['apps'])) { + unset($items[$itemCategory]); + } + } + } + } + $items['other'] = [ - 'label' => $this->trans->t('Other'), - 'apps' => [], + 'name' => '', + 'apps' => [ + 'files' => [ + 'name' => 'Files', + 'href' => $this->router->linkTo('files', ''), + 'icon' => '/apps/files/img/app.svg', + ] + ], ]; - // foreach ($items as $category => $value) { - // if ($category !== 'other') { - // if (count($value['apps']) < 0) { - // $items['other']['apps'] = array_merge( - // $items['other']['apps'], - // $value['apps'] - // ); - // - // unset($items[$category]); - // } - // } - // } + foreach ($items as $category => $value) { + ksort($items[$category]['apps']); + } + + usort($items, function($a, $b) { + return ($a['name'] < $b['name']) ? -1 : 1; + }); return new JSONResponse([ 'items' => $items, diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue index e8758d4..67ba1f4 100644 --- a/src/SideMenuBig.vue +++ b/src/SideMenuBig.vue @@ -20,22 +20,22 @@ along with this program. If not, see . -
-
-
-

+
+
+
+

- -
-
-
+ +
+
+
@@ -48,29 +48,30 @@ export default { data() { return { items: [], - logo: null, - forceLightIcon: false, + activeApp: null, } }, methods: { retrieveApps() { this.apps = [] - let that = this + let that = this - axios - .get(OC.generateUrl('/apps/side_menu/nav/items')) - .then(function(response) { - that.items = response.data.items + axios + .get(OC.generateUrl('/apps/side_menu/nav/items')) + .then(function(response) { + that.items = response.data.items - jQuery('body').trigger('side-menu.apps', []) - }); - }, + jQuery('body').trigger('side-menu.apps', []) + }); + }, + retrieveActiveApp() { + let activeAppLink = document.querySelector('#appmenu a.active') + this.activeApp = activeAppLink ? activeAppLink.parentNode.getAttribute('data-id') : null + }, }, mounted() { this.retrieveApps() - - this.forceLightIcon = document.querySelector('#side-menu-container').getAttribute('data-forcelighticon') == 1; - this.ignoreExternalSites = document.querySelector('#side-menu-container').getAttribute('data-externalsitesintopmenu') == 1; + this.retrieveActiveApp() } } From 460dac5faf64f8dca7dd1a78e72ba61d6703761a Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 15:26:17 +0200 Subject: [PATCH 07/18] update admin and personal pages --- templates/settings/admin-form.php | 50 +++++++++++++++++----------- templates/settings/personal-form.php | 10 +++--- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index 84702be..e56932f 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -40,7 +40,7 @@ $choicesSizes = [
-
@@ -60,7 +60,7 @@ $choicesSizes = [
-
@@ -74,7 +74,7 @@ $choicesSizes = [
-
@@ -88,11 +88,13 @@ $choicesSizes = [
-
+

This feature is not compatible with the big menu display.

+
$value): ?> @@ -212,13 +216,13 @@ $choicesSizes = [
-
-

Use the shortcut Ctrl+o - to open and to hide the side menu. Use tab to navigate.

+

Use the shortcut Ctrl+o + to open and to hide the side menu. Use tab to navigate.

@@ -249,11 +255,13 @@ $choicesSizes = [
-
+

This feature is not compatible with the big menu display.

+
$value): ?> @@ -327,7 +337,7 @@ $choicesSizes = [ t('Tips')); ?> -

Use the shortcut Ctrl+o +

Use the shortcut Ctrl+o to open and to hide the side menu. Use tab to navigate.

@@ -341,7 +351,7 @@ $choicesSizes = [
@@ -61,7 +61,7 @@ $choicesYesNo = [
- + t('You like this app and you want to support me?')); ?> From 8aa08dbc6b821166261ea4846d76e9ea61f40b80 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 15:26:40 +0200 Subject: [PATCH 08/18] add compatibility with basic side menu options --- templates/css/stylesheet.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/templates/css/stylesheet.php b/templates/css/stylesheet.php index adae8c3..fb68b3d 100644 --- a/templates/css/stylesheet.php +++ b/templates/css/stylesheet.php @@ -74,16 +74,31 @@ width: 15px; height: 15px; } + + img.side-menu-app-icon { + width: 15px; + height: 15px; + } .side-menu-app-icon svg { width: 20px; height: 20px; } + + img.side-menu-app-icon { + width: 20px; + height: 20px; + } .side-menu-app-icon svg { width: 23px; height: 23px; } + + img.side-menu-app-icon { + width: 23px; + height: 23px; + } From caa9c092effa73ff8736f0f5052ddde4f246e9a4 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 11 Aug 2020 15:52:15 +0200 Subject: [PATCH 09/18] add external links --- lib/Controller/CssController.php | 1 - lib/Controller/NavController.php | 9 ++++++++- lib/Service/AppRepository.php | 14 ++++++++++++++ templates/settings/admin-form.php | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib/Controller/CssController.php b/lib/Controller/CssController.php index 6210dc0..c534161 100644 --- a/lib/Controller/CssController.php +++ b/lib/Controller/CssController.php @@ -26,7 +26,6 @@ use OCP\IRequest; class CssController extends Controller { - /** * @var \OCP\IConfig */ diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 36b3451..818b700 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -31,7 +31,7 @@ use OC\URLGenerator; class NavController extends Controller { /** - * @var \OCP\IConfig + * @var IConfig */ protected $config; @@ -95,6 +95,7 @@ class NavController extends Controller $apps = $this->appRepository->getVisibleApps(); $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); $categoriesLabels = $this->categoryFetcher->get(); + $externalSitesInTopMenu = (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0); $appsCategories = []; $categoriesAppsCount = []; $items = []; @@ -105,11 +106,17 @@ class NavController extends Controller unset($categoriesLabels[$k]); } + $categoriesLabels['external_links'] = $this->trans->t('External sites'); + foreach ($apps as $app) { $categories = (array) $app['category']; $appsCategories[$app['id']] = []; foreach ($categories as $category) { + if ($externalSitesInTopMenu && $category === 'external_links') { + continue; + } + if (!isset($items[$category])) { $items[$category] = [ 'name' => $categoriesLabels[$category], diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index bb202e3..bfe5085 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -43,6 +43,20 @@ class AppRepository } } + foreach ($navigation as $app) { + if (substr($app['id'], 0, 14) === 'external_index') { + $visibleApps[$app['id']] = [ + 'id' => $app['id'], + 'name' => $app['name'], + 'preview' => $app['icon'], + 'previewAsIcon' => true, + 'category' => [ + 'external_links', + ], + ]; + } + } + return $visibleApps; } } diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index e56932f..b76e650 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -319,7 +319,7 @@ $choicesSizes = [
-

This feature is not compatible with the big menu display.

+

Should be enabled with the big menu display.

+
+
+

+ t('Top menu')); ?> +

-
-

Should be enabled with the big menu display.

+

Selected apps will be displayed in the big menu display and in the top menu.

-
- +
+ +
+ checked + /> + + +
+
From 9d9afff08d0b00c7946470d1d3fcbc19d8d81f08 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 12 Aug 2020 14:06:52 +0200 Subject: [PATCH 11/18] fix compatibility with the option 'hide-when-no-apps' --- lib/Controller/NavController.php | 9 +++++++++ src/SideMenuBig.vue | 10 +++++++++- templates/settings/admin-form.php | 2 -- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 818b700..1d30ec9 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -27,6 +27,8 @@ use OCP\IL10N; use OCP\IRequest; use OCP\L10N\IFactory; use OC\URLGenerator; +use OC; +use OCP\IUserSession; class NavController extends Controller { @@ -96,10 +98,17 @@ class NavController extends Controller $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); $categoriesLabels = $this->categoryFetcher->get(); $externalSitesInTopMenu = (bool) $this->config->getAppValue('side_menu', 'external-sites-in-top-menu', 0); + $user = OC::$server[IUserSession::class]->getUser(); $appsCategories = []; $categoriesAppsCount = []; $items = []; + if (!$user) { + return new JSONResponse([ + 'items' => $items, + ]); + } + foreach ($categoriesLabels as $k => $category) { $categoriesLabels[$category['id']] = $category['translations'][$currentLanguage]['name'] ?? $category['translations']['en']['name']; diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue index 67ba1f4..67b4787 100644 --- a/src/SideMenuBig.vue +++ b/src/SideMenuBig.vue @@ -61,7 +61,15 @@ export default { .then(function(response) { that.items = response.data.items - jQuery('body').trigger('side-menu.apps', []) + let apps = [] + + for (let category of that.items) { + for (let app of category.apps) { + apps.push(app) + } + } + + jQuery('body').trigger('side-menu.apps', [apps]) }); }, retrieveActiveApp() { diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index 9b2ad26..764db04 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -197,8 +197,6 @@ $choicesSizes = [
-

If the big menu is enabled then the menu will be hidden in public pages.

-
checked + /> + + +
+ +
+ +
From deca4b2cbafdede86fd577c943b3948aae7c23db Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 12 Aug 2020 16:16:50 +0200 Subject: [PATCH 13/18] fix issue with 'top-menu-apps' --- lib/Controller/CssController.php | 14 ++++++++++++++ templates/css/stylesheet.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/Controller/CssController.php b/lib/Controller/CssController.php index c534161..5e893cc 100644 --- a/lib/Controller/CssController.php +++ b/lib/Controller/CssController.php @@ -23,6 +23,8 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Response; use OCP\IConfig; use OCP\IRequest; +use OC; +use OCP\IUserSession; class CssController extends Controller { @@ -55,6 +57,17 @@ class CssController extends Controller $backgroundColor = $this->config->getAppValue('side_menu', 'background-color', '#333333'); $backgroundColorTo = $this->config->getAppValue('side_menu', 'background-color-to', $backgroundColor); + $user = OC::$server[IUserSession::class]->getUser(); + $topMenuApps = (array) json_decode($this->config->getAppValue('side_menu', 'top-menu-apps', '[]'), true); + + if ($user) { + $userTopMenuApps = (array) json_decode($this->config->getUserValue($user->getUid(), 'side_menu', 'top-menu-apps', '[]'), true); + + if (!empty($userTopMenuApps)) { + $topMenuApps = $userTopMenuApps; + } + } + $parameters = [ 'vars' => [ 'background-color' => $backgroundColor, @@ -70,6 +83,7 @@ class CssController extends Controller 'size-icon' => $this->config->getAppValue('side_menu', 'size-icon', 'normal'), 'size-text' => $this->config->getAppValue('side_menu', 'size-text', 'normal'), 'big-menu' => (bool) $this->config->getAppValue('side_menu', 'big-menu', '0'), + 'top-menu-apps' => $topMenuApps, ]; $response = new TemplateResponse('side_menu', 'css/stylesheet', $parameters, 'blank'); diff --git a/templates/css/stylesheet.php b/templates/css/stylesheet.php index fb68b3d..1f0ce32 100644 --- a/templates/css/stylesheet.php +++ b/templates/css/stylesheet.php @@ -8,7 +8,7 @@ } - + #appmenu { display: none; } From 3f2a307226655bdb1f3de1815f4633f1670dad68 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 12 Aug 2020 16:27:43 +0200 Subject: [PATCH 14/18] refactoring --- lib/Controller/NavController.php | 21 +++++++++------------ lib/Service/AppRepository.php | 8 ++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 4f58086..e00ce6f 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -124,6 +124,11 @@ class NavController extends Controller $categoriesLabels['external_links'] = $this->trans->t('External sites'); + $items['other'] = [ + 'name' => '', + 'apps' => [], + ]; + foreach ($apps as $app) { if (in_array($app['id'], $topMenuApps)) { continue; @@ -132,8 +137,11 @@ class NavController extends Controller $categories = (array) $app['category']; $appsCategories[$app['id']] = []; - foreach ($categories as $category) { + if (empty($categories)) { + $categories = ['other']; + } + foreach ($categories as $category) { if (!isset($items[$category])) { $items[$category] = [ 'name' => $categoriesLabels[$category], @@ -185,17 +193,6 @@ class NavController extends Controller } } - $items['other'] = [ - 'name' => '', - 'apps' => [ - 'files' => [ - 'name' => 'Files', - 'href' => $this->router->linkTo('files', ''), - 'icon' => '/apps/files/img/app.svg', - ] - ], - ]; - foreach ($items as $category => $value) { ksort($items[$category]['apps']); } diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index bfe5085..93d3104 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -54,6 +54,14 @@ class AppRepository 'external_links', ], ]; + } elseif ($app['id'] === 'files') { + $visibleApps[$app['id']] = [ + 'id' => $app['id'], + 'name' => $app['name'], + 'preview' => $app['icon'], + 'previewAsIcon' => true, + 'category' => [], + ]; } } From e1c6784d412254abea0b8dd0b8e54565e7851d8e Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 12 Aug 2020 16:32:26 +0200 Subject: [PATCH 15/18] update visible apps order --- lib/Service/AppRepository.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index 93d3104..3ca8836 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -65,6 +65,10 @@ class AppRepository } } + usort($visibleApps, function($a, $b) { + return ($a['name'] < $b['name']) ? -1 : 1; + }); + return $visibleApps; } } From ef72c00fbb769283ca860e1062bb2f104e99d377 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 11:21:06 +0200 Subject: [PATCH 16/18] fix translations --- appinfo/app.php | 1 + css/sideMenu.css | 16 ++++++++-------- l10n/ar.js | 7 +++++++ l10n/ar.json | 6 ++++++ l10n/ast.js | 7 +++++++ l10n/ast.json | 6 ++++++ l10n/bg.js | 7 +++++++ l10n/bg.json | 6 ++++++ l10n/ca.js | 7 +++++++ l10n/ca.json | 6 ++++++ l10n/cs.js | 7 +++++++ l10n/cs.json | 6 ++++++ l10n/da.js | 7 +++++++ l10n/da.json | 6 ++++++ l10n/de.js | 7 +++++++ l10n/de.json | 6 ++++++ l10n/de_DE.js | 7 +++++++ l10n/de_DE.json | 6 ++++++ l10n/el.js | 7 +++++++ l10n/el.json | 6 ++++++ l10n/en_GB.js | 7 +++++++ l10n/en_GB.json | 6 ++++++ l10n/eo.js | 7 +++++++ l10n/eo.json | 6 ++++++ l10n/es.js | 7 +++++++ l10n/es.json | 6 ++++++ l10n/es_419.js | 7 +++++++ l10n/es_419.json | 6 ++++++ l10n/es_CL.js | 7 +++++++ l10n/es_CL.json | 6 ++++++ l10n/es_CO.js | 7 +++++++ l10n/es_CO.json | 6 ++++++ l10n/es_CR.js | 7 +++++++ l10n/es_CR.json | 6 ++++++ l10n/es_DO.js | 7 +++++++ l10n/es_DO.json | 6 ++++++ l10n/es_EC.js | 7 +++++++ l10n/es_EC.json | 6 ++++++ l10n/es_GT.js | 7 +++++++ l10n/es_GT.json | 6 ++++++ l10n/es_HN.js | 7 +++++++ l10n/es_HN.json | 6 ++++++ l10n/es_MX.js | 7 +++++++ l10n/es_MX.json | 6 ++++++ l10n/es_NI.js | 7 +++++++ l10n/es_NI.json | 6 ++++++ l10n/es_PA.js | 7 +++++++ l10n/es_PA.json | 6 ++++++ l10n/es_PE.js | 7 +++++++ l10n/es_PE.json | 6 ++++++ l10n/es_PR.js | 7 +++++++ l10n/es_PR.json | 6 ++++++ l10n/es_PY.js | 7 +++++++ l10n/es_PY.json | 6 ++++++ l10n/es_SV.js | 7 +++++++ l10n/es_SV.json | 6 ++++++ l10n/es_UY.js | 7 +++++++ l10n/es_UY.json | 6 ++++++ l10n/et_EE.js | 7 +++++++ l10n/et_EE.json | 6 ++++++ l10n/eu.js | 7 +++++++ l10n/eu.json | 6 ++++++ l10n/fa.js | 7 +++++++ l10n/fa.json | 6 ++++++ l10n/fi.js | 7 +++++++ l10n/fi.json | 6 ++++++ l10n/fr.js | 7 +++++++ l10n/fr.json | 6 ++++++ l10n/gl.js | 7 +++++++ l10n/gl.json | 6 ++++++ l10n/he.js | 7 +++++++ l10n/he.json | 6 ++++++ l10n/hr.js | 7 +++++++ l10n/hr.json | 6 ++++++ l10n/hu.js | 7 +++++++ l10n/hu.json | 6 ++++++ l10n/is.js | 7 +++++++ l10n/is.json | 6 ++++++ l10n/it.js | 7 +++++++ l10n/it.json | 6 ++++++ l10n/ja.js | 7 +++++++ l10n/ja.json | 6 ++++++ l10n/ka_GE.js | 7 +++++++ l10n/ka_GE.json | 6 ++++++ l10n/ko.js | 7 +++++++ l10n/ko.json | 6 ++++++ l10n/lt_LT.js | 7 +++++++ l10n/lt_LT.json | 6 ++++++ l10n/lv.js | 7 +++++++ l10n/lv.json | 6 ++++++ l10n/nb.js | 7 +++++++ l10n/nb.json | 6 ++++++ l10n/nl.js | 7 +++++++ l10n/nl.json | 6 ++++++ l10n/nn_NO.js | 7 +++++++ l10n/nn_NO.json | 6 ++++++ l10n/pl.js | 7 +++++++ l10n/pl.json | 6 ++++++ l10n/pt_BR.js | 7 +++++++ l10n/pt_BR.json | 6 ++++++ l10n/pt_PT.js | 7 +++++++ l10n/pt_PT.json | 6 ++++++ l10n/ro.js | 7 +++++++ l10n/ro.json | 6 ++++++ l10n/ru.js | 7 +++++++ l10n/ru.json | 6 ++++++ l10n/sk.js | 7 +++++++ l10n/sk.json | 6 ++++++ l10n/sl.js | 7 +++++++ l10n/sl.json | 6 ++++++ l10n/sr.js | 7 +++++++ l10n/sr.json | 6 ++++++ l10n/sv.js | 7 +++++++ l10n/sv.json | 6 ++++++ l10n/tr.js | 7 +++++++ l10n/tr.json | 6 ++++++ l10n/uk.js | 7 +++++++ l10n/uk.json | 6 ++++++ l10n/vi.js | 7 +++++++ l10n/vi.json | 6 ++++++ l10n/zh_CN.js | 7 +++++++ l10n/zh_CN.json | 6 ++++++ l10n/zh_TW.js | 7 +++++++ l10n/zh_TW.json | 6 ++++++ lib/Controller/NavController.php | 12 +++--------- lib/Service/AppRepository.php | 17 +++++++++++++---- templates/settings/admin-form.php | 2 +- 127 files changed, 819 insertions(+), 22 deletions(-) create mode 100644 l10n/ar.js create mode 100644 l10n/ar.json create mode 100644 l10n/ast.js create mode 100644 l10n/ast.json create mode 100644 l10n/bg.js create mode 100644 l10n/bg.json create mode 100644 l10n/ca.js create mode 100644 l10n/ca.json create mode 100644 l10n/cs.js create mode 100644 l10n/cs.json create mode 100644 l10n/da.js create mode 100644 l10n/da.json create mode 100644 l10n/de.js create mode 100644 l10n/de.json create mode 100644 l10n/de_DE.js create mode 100644 l10n/de_DE.json create mode 100644 l10n/el.js create mode 100644 l10n/el.json create mode 100644 l10n/en_GB.js create mode 100644 l10n/en_GB.json create mode 100644 l10n/eo.js create mode 100644 l10n/eo.json create mode 100644 l10n/es.js create mode 100644 l10n/es.json create mode 100644 l10n/es_419.js create mode 100644 l10n/es_419.json create mode 100644 l10n/es_CL.js create mode 100644 l10n/es_CL.json create mode 100644 l10n/es_CO.js create mode 100644 l10n/es_CO.json create mode 100644 l10n/es_CR.js create mode 100644 l10n/es_CR.json create mode 100644 l10n/es_DO.js create mode 100644 l10n/es_DO.json create mode 100644 l10n/es_EC.js create mode 100644 l10n/es_EC.json create mode 100644 l10n/es_GT.js create mode 100644 l10n/es_GT.json create mode 100644 l10n/es_HN.js create mode 100644 l10n/es_HN.json create mode 100644 l10n/es_MX.js create mode 100644 l10n/es_MX.json create mode 100644 l10n/es_NI.js create mode 100644 l10n/es_NI.json create mode 100644 l10n/es_PA.js create mode 100644 l10n/es_PA.json create mode 100644 l10n/es_PE.js create mode 100644 l10n/es_PE.json create mode 100644 l10n/es_PR.js create mode 100644 l10n/es_PR.json create mode 100644 l10n/es_PY.js create mode 100644 l10n/es_PY.json create mode 100644 l10n/es_SV.js create mode 100644 l10n/es_SV.json create mode 100644 l10n/es_UY.js create mode 100644 l10n/es_UY.json create mode 100644 l10n/et_EE.js create mode 100644 l10n/et_EE.json create mode 100644 l10n/eu.js create mode 100644 l10n/eu.json create mode 100644 l10n/fa.js create mode 100644 l10n/fa.json create mode 100644 l10n/fi.js create mode 100644 l10n/fi.json create mode 100644 l10n/fr.js create mode 100644 l10n/fr.json create mode 100644 l10n/gl.js create mode 100644 l10n/gl.json create mode 100644 l10n/he.js create mode 100644 l10n/he.json create mode 100644 l10n/hr.js create mode 100644 l10n/hr.json create mode 100644 l10n/hu.js create mode 100644 l10n/hu.json create mode 100644 l10n/is.js create mode 100644 l10n/is.json create mode 100644 l10n/it.js create mode 100644 l10n/it.json create mode 100644 l10n/ja.js create mode 100644 l10n/ja.json create mode 100644 l10n/ka_GE.js create mode 100644 l10n/ka_GE.json create mode 100644 l10n/ko.js create mode 100644 l10n/ko.json create mode 100644 l10n/lt_LT.js create mode 100644 l10n/lt_LT.json create mode 100644 l10n/lv.js create mode 100644 l10n/lv.json create mode 100644 l10n/nb.js create mode 100644 l10n/nb.json create mode 100644 l10n/nl.js create mode 100644 l10n/nl.json create mode 100644 l10n/nn_NO.js create mode 100644 l10n/nn_NO.json create mode 100644 l10n/pl.js create mode 100644 l10n/pl.json create mode 100644 l10n/pt_BR.js create mode 100644 l10n/pt_BR.json create mode 100644 l10n/pt_PT.js create mode 100644 l10n/pt_PT.json create mode 100644 l10n/ro.js create mode 100644 l10n/ro.json create mode 100644 l10n/ru.js create mode 100644 l10n/ru.json create mode 100644 l10n/sk.js create mode 100644 l10n/sk.json create mode 100644 l10n/sl.js create mode 100644 l10n/sl.json create mode 100644 l10n/sr.js create mode 100644 l10n/sr.json create mode 100644 l10n/sv.js create mode 100644 l10n/sv.json create mode 100644 l10n/tr.js create mode 100644 l10n/tr.json create mode 100644 l10n/uk.js create mode 100644 l10n/uk.json create mode 100644 l10n/vi.js create mode 100644 l10n/vi.json create mode 100644 l10n/zh_CN.js create mode 100644 l10n/zh_CN.json create mode 100644 l10n/zh_TW.js create mode 100644 l10n/zh_TW.json diff --git a/appinfo/app.php b/appinfo/app.php index 458237a..7c48ca1 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -6,4 +6,5 @@ $app = new Application(); if ($app->isEnabled()) { $app->registerAssets(); + $app->registerServices(); } diff --git a/css/sideMenu.css b/css/sideMenu.css index e051ac4..df705a4 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -135,7 +135,7 @@ .side-menu-big .side-menu-apps-list { height: auto; position: static; - max-width: 100vh; + max-width: 100vw; overflow: auto; } @@ -144,11 +144,10 @@ } .side-menu-categories-wrapper { - padding: 0 10% 70px 10%; + padding-bottom: 70px; } .side-menu-categories { - width: 100%; max-height: calc(100vh - 50px); overflow: auto; position: relative; @@ -156,6 +155,7 @@ display: flex; flex-wrap: wrap; justify-content: center; + padding: 0 10% 0 10%; } .side-menu-category { @@ -174,16 +174,16 @@ } @media screen and (max-width: 1024px) { - .side-menu-categories-wrapper { - padding-left: 0; - padding-right: 0; - } - .side-menu-categories { display: block; + padding: 0; } .side-menu-category { padding: 10px 0; } + + #side-menu.side-menu-big { + height: 100vh; + } } diff --git a/l10n/ar.js b/l10n/ar.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ar.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ar.json b/l10n/ar.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ar.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ast.js b/l10n/ast.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ast.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ast.json b/l10n/ast.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ast.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/bg.js b/l10n/bg.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/bg.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/bg.json b/l10n/bg.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/bg.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ca.js b/l10n/ca.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ca.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ca.json b/l10n/ca.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ca.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/cs.js b/l10n/cs.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/cs.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/cs.json b/l10n/cs.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/cs.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/da.js b/l10n/da.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/da.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/da.json b/l10n/da.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/da.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/de.js b/l10n/de.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/de.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/de.json b/l10n/de.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/de.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/de_DE.js b/l10n/de_DE.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/de_DE.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/de_DE.json b/l10n/de_DE.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/de_DE.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/el.js b/l10n/el.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/el.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/el.json b/l10n/el.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/el.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/en_GB.js b/l10n/en_GB.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/en_GB.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/en_GB.json b/l10n/en_GB.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/en_GB.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/eo.js b/l10n/eo.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/eo.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/eo.json b/l10n/eo.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/eo.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es.json b/l10n/es.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_419.js b/l10n/es_419.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_419.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_419.json b/l10n/es_419.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_419.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_CL.js b/l10n/es_CL.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_CL.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_CL.json b/l10n/es_CL.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_CL.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_CO.js b/l10n/es_CO.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_CO.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_CO.json b/l10n/es_CO.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_CO.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_CR.js b/l10n/es_CR.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_CR.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_CR.json b/l10n/es_CR.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_CR.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_DO.js b/l10n/es_DO.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_DO.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_DO.json b/l10n/es_DO.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_DO.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_EC.js b/l10n/es_EC.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_EC.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_EC.json b/l10n/es_EC.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_EC.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_GT.js b/l10n/es_GT.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_GT.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_GT.json b/l10n/es_GT.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_GT.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_HN.js b/l10n/es_HN.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_HN.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_HN.json b/l10n/es_HN.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_HN.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_MX.js b/l10n/es_MX.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_MX.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_MX.json b/l10n/es_MX.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_MX.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_NI.js b/l10n/es_NI.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_NI.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_NI.json b/l10n/es_NI.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_NI.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_PA.js b/l10n/es_PA.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_PA.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_PA.json b/l10n/es_PA.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_PA.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_PE.js b/l10n/es_PE.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_PE.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_PE.json b/l10n/es_PE.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_PE.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_PR.js b/l10n/es_PR.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_PR.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_PR.json b/l10n/es_PR.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_PR.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_PY.js b/l10n/es_PY.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_PY.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_PY.json b/l10n/es_PY.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_PY.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_SV.js b/l10n/es_SV.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_SV.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_SV.json b/l10n/es_SV.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_SV.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/es_UY.js b/l10n/es_UY.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/es_UY.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/es_UY.json b/l10n/es_UY.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/es_UY.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/et_EE.js b/l10n/et_EE.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/et_EE.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/et_EE.json b/l10n/et_EE.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/et_EE.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/eu.js b/l10n/eu.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/eu.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/eu.json b/l10n/eu.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/eu.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/fa.js b/l10n/fa.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/fa.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/fa.json b/l10n/fa.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/fa.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/fi.js b/l10n/fi.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/fi.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/fi.json b/l10n/fi.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/fi.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js new file mode 100644 index 0000000..6c21d05 --- /dev/null +++ b/l10n/fr.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Menu latéral", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); diff --git a/l10n/fr.json b/l10n/fr.json new file mode 100644 index 0000000..6b18273 --- /dev/null +++ b/l10n/fr.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Menu latéral" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} diff --git a/l10n/gl.js b/l10n/gl.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/gl.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/gl.json b/l10n/gl.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/gl.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/he.js b/l10n/he.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/he.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/he.json b/l10n/he.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/he.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/hr.js b/l10n/hr.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/hr.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/hr.json b/l10n/hr.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/hr.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/hu.js b/l10n/hu.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/hu.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/hu.json b/l10n/hu.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/hu.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/is.js b/l10n/is.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/is.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/is.json b/l10n/is.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/is.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/it.js b/l10n/it.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/it.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/it.json b/l10n/it.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/it.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ja.js b/l10n/ja.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ja.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ja.json b/l10n/ja.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ja.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ka_GE.js b/l10n/ka_GE.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ka_GE.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ka_GE.json b/l10n/ka_GE.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ka_GE.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ko.js b/l10n/ko.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ko.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ko.json b/l10n/ko.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ko.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/lt_LT.js b/l10n/lt_LT.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/lt_LT.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/lt_LT.json b/l10n/lt_LT.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/lt_LT.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/lv.js b/l10n/lv.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/lv.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/lv.json b/l10n/lv.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/lv.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/nb.js b/l10n/nb.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/nb.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/nb.json b/l10n/nb.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/nb.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/nl.js b/l10n/nl.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/nl.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/nl.json b/l10n/nl.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/nl.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/nn_NO.js b/l10n/nn_NO.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/nn_NO.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/nn_NO.json b/l10n/nn_NO.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/nn_NO.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/pl.js b/l10n/pl.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/pl.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/pl.json b/l10n/pl.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/pl.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/pt_BR.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/pt_BR.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/pt_PT.js b/l10n/pt_PT.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/pt_PT.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/pt_PT.json b/l10n/pt_PT.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/pt_PT.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ro.js b/l10n/ro.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ro.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ro.json b/l10n/ro.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ro.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/ru.js b/l10n/ru.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/ru.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/ru.json b/l10n/ru.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/ru.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/sk.js b/l10n/sk.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/sk.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/sk.json b/l10n/sk.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/sk.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/sl.js b/l10n/sl.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/sl.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/sl.json b/l10n/sl.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/sl.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/sr.js b/l10n/sr.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/sr.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/sr.json b/l10n/sr.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/sr.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/sv.js b/l10n/sv.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/sv.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/sv.json b/l10n/sv.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/sv.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/tr.js b/l10n/tr.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/tr.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/tr.json b/l10n/tr.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/tr.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/uk.js b/l10n/uk.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/uk.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/uk.json b/l10n/uk.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/uk.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/vi.js b/l10n/vi.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/vi.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/vi.json b/l10n/vi.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/vi.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/zh_CN.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/zh_CN.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/l10n/zh_TW.js b/l10n/zh_TW.js new file mode 100644 index 0000000..ade1ef4 --- /dev/null +++ b/l10n/zh_TW.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "side_menu", + { + "Side menu": "Side menu", + }, + "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +); \ No newline at end of file diff --git a/l10n/zh_TW.json b/l10n/zh_TW.json new file mode 100644 index 0000000..a091038 --- /dev/null +++ b/l10n/zh_TW.json @@ -0,0 +1,6 @@ +{ + "translations": { + "Side menu": "Side menu" + }, + "pluralForm": "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" +} \ No newline at end of file diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index e00ce6f..466952a 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -42,11 +42,6 @@ class NavController extends Controller */ protected $appRepository; - /** - * @var IL10N - */ - protected $trans; - /** * @var IFactory */ @@ -72,8 +67,8 @@ class NavController extends Controller AppRepository $appRepository, CategoryFetcher $categoryFetcher, URLGenerator $router, - IFactory $l10nFactory, - IL10N $trans) + IL10N $trans, + IFactory $l10nFactory) { parent::__construct($appName, $request); @@ -82,7 +77,6 @@ class NavController extends Controller $this->categoryFetcher = $categoryFetcher; $this->l10nFactory = $l10nFactory; $this->router = $router; - $this->trans = $trans; } /** @@ -122,7 +116,7 @@ class NavController extends Controller unset($categoriesLabels[$k]); } - $categoriesLabels['external_links'] = $this->trans->t('External sites'); + $categoriesLabels['external_links'] = $this->l10nFactory->get('external')->t('External sites'); $items['other'] = [ 'name' => '', diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index 3ca8836..afbecf7 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -2,7 +2,8 @@ namespace OCA\SideMenu\Service; -use \OC_App; +use OC_App; +use OCP\L10N\IFactory; /** * class AppRepository. @@ -16,12 +17,18 @@ class AppRepository */ protected $ocApp; + /** + * @var IFactory + */ + protected $l10nFactory; + /** * @param OC_App $ocApp */ - public function __construct(OC_App $ocApp) + public function __construct(OC_App $ocApp, IFactory $l10nFactory) { $this->ocApp = $ocApp; + $this->l10nFactory = $l10nFactory; } /** @@ -39,6 +46,8 @@ class AppRepository $id = $app['id']; if (isset($navigation[$id])) { + $app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']); + $visibleApps[$id] = $app; } } @@ -47,7 +56,7 @@ class AppRepository if (substr($app['id'], 0, 14) === 'external_index') { $visibleApps[$app['id']] = [ 'id' => $app['id'], - 'name' => $app['name'], + 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), 'preview' => $app['icon'], 'previewAsIcon' => true, 'category' => [ @@ -57,7 +66,7 @@ class AppRepository } elseif ($app['id'] === 'files') { $visibleApps[$app['id']] = [ 'id' => $app['id'], - 'name' => $app['name'], + 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), 'preview' => $app['icon'], 'previewAsIcon' => true, 'category' => [], diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index 7794602..64e8c62 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -334,7 +334,7 @@ $choicesSizes = [ />
From e4abc5b43f26f2b773c9b1de600bf3b8e8ad9fc2 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 11:21:59 +0200 Subject: [PATCH 17/18] add PSR 2 compliance --- lib/Controller/CssController.php | 6 ++---- lib/Controller/JsController.php | 7 ++----- lib/Controller/NavController.php | 8 ++++---- lib/Controller/PersonalSettingController.php | 8 +++++--- lib/Service/AppRepository.php | 13 +++++-------- 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/lib/Controller/CssController.php b/lib/Controller/CssController.php index 5e893cc..b06ff49 100644 --- a/lib/Controller/CssController.php +++ b/lib/Controller/CssController.php @@ -18,12 +18,12 @@ namespace OCA\SideMenu\Controller; +use OC; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; -use OC; use OCP\IUserSession; class CssController extends Controller @@ -35,8 +35,6 @@ class CssController extends Controller /** * @param string $appName - * @param IRequest $request - * @param IConfig $config */ public function __construct($appName, IRequest $request, IConfig $config) { diff --git a/lib/Controller/JsController.php b/lib/Controller/JsController.php index bcab75b..71667b8 100644 --- a/lib/Controller/JsController.php +++ b/lib/Controller/JsController.php @@ -18,17 +18,16 @@ namespace OCA\SideMenu\Controller; +use OC; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use OCP\IRequest; use OCP\IUserSession; -use OC; class JsController extends Controller { - /** * @var \OCP\IConfig */ @@ -36,8 +35,6 @@ class JsController extends Controller /** * @param string $appName - * @param IRequest $request - * @param IConfig $config */ public function __construct($appName, IRequest $request, IConfig $config) { diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 466952a..4e0751c 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -18,17 +18,17 @@ namespace OCA\SideMenu\Controller; +use OC; use OC\App\AppStore\Fetcher\CategoryFetcher; +use OC\URLGenerator; use OCA\SideMenu\Service\AppRepository; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; use OCP\IConfig; use OCP\IL10N; use OCP\IRequest; -use OCP\L10N\IFactory; -use OC\URLGenerator; -use OC; use OCP\IUserSession; +use OCP\L10N\IFactory; class NavController extends Controller { @@ -191,7 +191,7 @@ class NavController extends Controller ksort($items[$category]['apps']); } - usort($items, function($a, $b) { + usort($items, function ($a, $b) { return ($a['name'] < $b['name']) ? -1 : 1; }); diff --git a/lib/Controller/PersonalSettingController.php b/lib/Controller/PersonalSettingController.php index 458e47a..5674175 100644 --- a/lib/Controller/PersonalSettingController.php +++ b/lib/Controller/PersonalSettingController.php @@ -19,7 +19,6 @@ namespace OCA\SideMenu\Controller; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Response; use OCP\IConfig; use OCP\IRequest; @@ -48,6 +47,9 @@ class PersonalSettingController extends Controller /** * @NoAdminRequired * + * @param mixed $name + * @param mixed $value + * * @return Response */ public function valueSet($name, $value) @@ -55,7 +57,7 @@ class PersonalSettingController extends Controller $doSave = false; $user = $this->userSession->getUser(); - if ($name === 'enabled') { + if ('enabled' === $name) { $doSave = true; if (!in_array($value, ['0', '1'])) { @@ -63,7 +65,7 @@ class PersonalSettingController extends Controller } } - if ($name === 'top-menu-apps') { + if ('top-menu-apps' === $name) { $doSave = true; $data = json_decode($value, true); diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index afbecf7..d2dd024 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -22,9 +22,6 @@ class AppRepository */ protected $l10nFactory; - /** - * @param OC_App $ocApp - */ public function __construct(OC_App $ocApp, IFactory $l10nFactory) { $this->ocApp = $ocApp; @@ -38,8 +35,8 @@ class AppRepository */ public function getVisibleApps() { - $navigation = $this->ocApp->getNavigation(); - $apps = $this->ocApp->listAllApps(); + $navigation = $this->ocApp->getNavigation(); + $apps = $this->ocApp->listAllApps(); $visibleApps = []; foreach ($apps as $app) { @@ -53,7 +50,7 @@ class AppRepository } foreach ($navigation as $app) { - if (substr($app['id'], 0, 14) === 'external_index') { + if ('external_index' === substr($app['id'], 0, 14)) { $visibleApps[$app['id']] = [ 'id' => $app['id'], 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), @@ -63,7 +60,7 @@ class AppRepository 'external_links', ], ]; - } elseif ($app['id'] === 'files') { + } elseif ('files' === $app['id']) { $visibleApps[$app['id']] = [ 'id' => $app['id'], 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), @@ -74,7 +71,7 @@ class AppRepository } } - usort($visibleApps, function($a, $b) { + usort($visibleApps, function ($a, $b) { return ($a['name'] < $b['name']) ? -1 : 1; }); From 3a431f16e7ce4ee970902889e71835f3224fe3bc Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 11:34:40 +0200 Subject: [PATCH 18/18] release v1.8.0-rc1 --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index cdb3422..2541f1f 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -15,7 +15,7 @@ You can report a bug or request a feature by opening an issue. ]]> agpl Simon Vieille - 1.7.0 + 1.8.0-rc1 SideMenu customization https://gitnet.fr/deblan/side_menu