From cdcc4ddd51e60b2cf760e087a48c468f0ed55ff3 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 4 Aug 2020 09:15:16 +0200 Subject: [PATCH 001/800] refactor js --- templates/js/_externalSitesInTopMenu.js | 117 +++++++++++++++++++++ templates/js/_loaderEnabled.js | 15 +++ templates/js/script.php | 134 +----------------------- 3 files changed, 134 insertions(+), 132 deletions(-) create mode 100644 templates/js/_externalSitesInTopMenu.js create mode 100644 templates/js/_loaderEnabled.js diff --git a/templates/js/_externalSitesInTopMenu.js b/templates/js/_externalSitesInTopMenu.js new file mode 100644 index 0000000..c2b7224 --- /dev/null +++ b/templates/js/_externalSitesInTopMenu.js @@ -0,0 +1,117 @@ +sideMenuContainer.attr('data-externalsitesintopmenu', '1') + +var menuCache = null + +var updateTopMenu = function() { + var breakpointMobileWidth = 1024 + var menu = $('#appmenu') + var apps = menu.find('li') + var minAppsDesktop = 8 + var usePercentualAppMenuLimit = 0.9 + var isMobile = $(window).width() < breakpointMobileWidth + var lastShownApp = null + var appShown = [] + var moreApps = $('#more-apps') + var navigation = $('#navigation') + var navigationApps = $('#apps ul') + var appCount = null + + var currentMenuCache = menu.html() + menu.next().html() + + if (currentMenuCache === menuCache) { + return + } + + navigationApps.html('') + + apps.each(function(i, app) { + var dataId = app.getAttribute('data-id') + + if (dataId === null) { + return + } + + if (dataId.indexOf('external_index') === -1) { + app.classList.add('hidden') + app.classList.add('app-hidden') + } else { + app.classList.remove('hidden') + app.classList.add('app-external-site') + appShown.push(app) + navigationApps.append(app.outerHTML) + } + }) + + var rightHeaderWidth = $('.header-right').outerWidth() + var headerWidth = $('header').outerWidth() + var availableWidth = headerWidth - $('#nextcloud').outerWidth() - $('#header .side-menu-opener').outerWidth() - (rightHeaderWidth > 210 ? rightHeaderWidth : 210) + + if (!isMobile) { + availableWidth = availableWidth * usePercentualAppMenuLimit + } + + if (isMobile && appCount > minAppsDesktop) { + appCount = minAppsDesktop + } else if (!isMobile && appCount < minAppsDesktop) { + appCount = minAppsDesktop + } else { + appCount = Math.floor(availableWidth / $('#appmenu li').width()) + } + + if (appCount === 0) { + menu.addClass('hidden') + } + + menu.removeClass('hidden') + menu.css('opacity', 1) + + if (appShown.length - 1 - appCount >= 1) { + appCount-- + } + + moreApps.find('a').removeClass('active') + + var k = 0 + var notInHeader = 0 + var name + + $(appShown).each(function(i, app) { + app = $(app) + name = app.data('id') + + if (k < appCount && appCount > 0) { + app.removeClass('hidden') + lastShownApp = app + + $('#apps li[data-id=' + name + '].app-external-site').addClass('in-header') + } else { + app.addClass('hidden') + notInHeader++ + + $('#apps li[data-id=' + name + '].app-external-site').removeClass('in-header') + + if (appCount > 0 && app.children('a').hasClass('active')) { + lastShownApp.addClass('hidden') + app.removeClass('hidden') + notInHeader++ + + $('#apps li[data-id=' + name + '].app-external-site') + .removeClass('in-header') + .addClass('in-header') + } + } + + k++ + }) + + if (notInHeader === 0) { + moreApps.hide() + navigation.hide() + } else { + moreApps.show() + } + + menuCache = menu.html() + menu.next().html() +} + +setInterval(updateTopMenu, 50) diff --git a/templates/js/_loaderEnabled.js b/templates/js/_loaderEnabled.js new file mode 100644 index 0000000..6d1a4e8 --- /dev/null +++ b/templates/js/_loaderEnabled.js @@ -0,0 +1,15 @@ +var pageLoader = $('
') +var pageLoaderBar = $('
') + +body.append(pageLoader) +pageLoader.append(pageLoaderBar) + +var pageLoaderValue = 0 + +$(window).on('beforeunload', function() { + setInterval(function() { + pageLoaderBar.width(pageLoaderValue.toString() + '%') + + pageLoaderValue = Math.min(pageLoaderValue + .2, 100) + }, 25) +}) diff --git a/templates/js/script.php b/templates/js/script.php index 66695e2..acc730d 100644 --- a/templates/js/script.php +++ b/templates/js/script.php @@ -91,21 +91,7 @@ sideMenuContainer.append(sideMenu) - var pageLoader = $('
') - var pageLoaderBar = $('
') - - body.append(pageLoader) - pageLoader.append(pageLoaderBar) - - var pageLoaderValue = 0 - - $(window).on('beforeunload', function() { - setInterval(function() { - pageLoaderBar.width(pageLoaderValue.toString() + '%') - - pageLoaderValue = Math.min(pageLoaderValue + .2, 100) - }, 25) - }) + @@ -115,122 +101,6 @@ - sideMenuContainer.attr('data-externalsitesintopmenu', '1') - - var menuCache = null - - var updateTopMenu = function() { - var breakpointMobileWidth = 1024 - var menu = $('#appmenu') - var apps = menu.find('li') - var minAppsDesktop = 8 - var usePercentualAppMenuLimit = 0.9 - var isMobile = $(window).width() < breakpointMobileWidth - var lastShownApp = null - var appShown = [] - var moreApps = $('#more-apps') - var navigation = $('#navigation') - var navigationApps = $('#apps ul') - var appCount = null - - var currentMenuCache = menu.html() + menu.next().html() - - if (currentMenuCache === menuCache) { - return - } - - navigationApps.html('') - - apps.each(function(i, app) { - var dataId = app.getAttribute('data-id') - - if (dataId === null) { - return - } - - if (dataId.indexOf('external_index') === -1) { - app.classList.add('hidden') - app.classList.add('app-hidden') - } else { - app.classList.remove('hidden') - app.classList.add('app-external-site') - appShown.push(app) - navigationApps.append(app.outerHTML) - } - }) - - var rightHeaderWidth = $('.header-right').outerWidth() - var headerWidth = $('header').outerWidth() - var availableWidth = headerWidth - $('#nextcloud').outerWidth() - $('#header .side-menu-opener').outerWidth() - (rightHeaderWidth > 210 ? rightHeaderWidth : 210) - - if (!isMobile) { - availableWidth = availableWidth * usePercentualAppMenuLimit - } - - if (isMobile && appCount > minAppsDesktop) { - appCount = minAppsDesktop - } else if (!isMobile && appCount < minAppsDesktop) { - appCount = minAppsDesktop - } else { - appCount = Math.floor(availableWidth / $('#appmenu li').width()) - } - - if (appCount === 0) { - menu.addClass('hidden') - } - - menu.removeClass('hidden') - menu.css('opacity', 1) - - if (appShown.length - 1 - appCount >= 1) { - appCount-- - } - - moreApps.find('a').removeClass('active') - - var k = 0 - var notInHeader = 0 - var name - - $(appShown).each(function(i, app) { - app = $(app) - name = app.data('id') - - if (k < appCount && appCount > 0) { - app.removeClass('hidden') - lastShownApp = app - - $('#apps li[data-id=' + name + '].app-external-site').addClass('in-header') - } else { - app.addClass('hidden') - notInHeader++ - - $('#apps li[data-id=' + name + '].app-external-site').removeClass('in-header') - - if (appCount > 0 && app.children('a').hasClass('active')) { - lastShownApp.addClass('hidden') - app.removeClass('hidden') - notInHeader++ - - $('#apps li[data-id=' + name + '].app-external-site') - .removeClass('in-header') - .addClass('in-header') - } - } - - k++ - }) - - if (notInHeader === 0) { - moreApps.hide() - navigation.hide() - } else { - moreApps.show() - } - - menuCache = menu.html() + menu.next().html() - } - - setInterval(updateTopMenu, 50) + })(); From ddb7cc40ce2dd11e8b351b587ba7ba1cbaa1b3a1 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 6 Aug 2020 15:00:24 +0200 Subject: [PATCH 002/800] 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 003/800] 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 004/800] 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 005/800] 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 006/800] 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 007/800] 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 008/800] 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 009/800] 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 010/800] 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 012/800] 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 014/800] 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 015/800] 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 016/800] 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 017/800] 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 018/800] 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 019/800] 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 From aa9ba6068078bb5061b56ea6c12f728c3a617e2b Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 13:05:38 +0200 Subject: [PATCH 020/800] fix issue with the classic display --- src/SideMenu.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SideMenu.vue b/src/SideMenu.vue index 97ab13a..f5f3747 100644 --- a/src/SideMenu.vue +++ b/src/SideMenu.vue @@ -51,6 +51,11 @@ export default { retrieveApps() { this.apps = [] const links = document.querySelectorAll('#appmenu a') + const menu = document.querySelector('#appmenu') + + const menuIsHidden = window.getComputedStyle(menu, null).getPropertyValue('display') === 'none'; + + console.log(links); for (let element of links) { let href = element.getAttribute('href') @@ -63,7 +68,7 @@ export default { var dataId = parent.getAttribute('data-id') dataId = dataId !== null ? dataId : '' - if (!parent.classList.contains('app-hidden')) { + if (!parent.classList.contains('app-hidden') && !menuIsHidden) { continue } From d30603c7d1709c2ab6da87ff569b6c191aa9790a Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 16:13:31 +0200 Subject: [PATCH 021/800] update the big-menu size when screen < 1024px --- css/sideMenu.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/sideMenu.css b/css/sideMenu.css index df705a4..67cb823 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -174,6 +174,10 @@ } @media screen and (max-width: 1024px) { + #side-menu.side-menu-big { + max-width: 290px; + } + .side-menu-categories { display: block; padding: 0; From c6a43f755d4e3380f4ad898780ac4c566dc166d1 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 16:33:02 +0200 Subject: [PATCH 022/800] fix issue with empty cat --- appinfo/info.xml | 2 +- lib/Controller/NavController.php | 6 +++++- src/SideMenuBig.vue | 12 ++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 2541f1f..b005569 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.8.0-rc1 + 1.8.0-rc2 SideMenu customization https://gitnet.fr/deblan/side_menu diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 4e0751c..3b807a4 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -188,7 +188,11 @@ class NavController extends Controller } foreach ($items as $category => $value) { - ksort($items[$category]['apps']); + if (empty($items[$category]['apps'])) { + unset($items[$category]); + } else { + ksort($items[$category]['apps']); + } } usort($items, function ($a, $b) { diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue index 67b4787..6574f36 100644 --- a/src/SideMenuBig.vue +++ b/src/SideMenuBig.vue @@ -61,13 +61,13 @@ export default { .then(function(response) { that.items = response.data.items - let apps = [] + let apps = [] - for (let category of that.items) { - for (let app of category.apps) { - apps.push(app) - } - } + for (let category of that.items) { + for (let app of category.apps) { + apps.push(app) + } + } jQuery('body').trigger('side-menu.apps', [apps]) }); From 831d2d81fc526272cf540b19044abb943122a8f0 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 16:51:41 +0200 Subject: [PATCH 023/800] add documentation --- README.md | 16 ++++++++++------ appinfo/info.xml | 5 +++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a6d2fb9..7736e27 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ 🤙 Nextcloud app / Side menu 🎨 =============================== -Side menu allows you to modify the position of the main menu by creating a panel on the left of the interface. +Side menu allows you to modify the position of the main menu by creating a panel on the left of the interface or with a big menu on the top. +You can also define apps that must be displayed in the top menu. Fully customisable. + This application is rather suitable for instances that activate a lot of applications. Comptatible with AppOrder. @@ -38,17 +40,19 @@ If you are a developer: * go to `apps/` and clone your repository * go to `apps/side_menu` and run `npm install` -Build javascripts using `webpack --config ./webpack.js` (add `-w` to build them in real time). +Build javascripts using `npm run build` (or `npm run watch` to build them in real time). Then commit and create a pull request. -Preview -------- +Previews +-------- ![](https://upload.deblan.org/u/2020-03/5e81b219.jpg) ![](https://upload.deblan.org/u/2020-03/5e7fab2b.jpg) -![](https://upload.deblan.org/u/2020-05/5eb6b76e.png) +![](https://upload.deblan.org/u/2020-08/5f3552b8.png) -![](https://upload.deblan.org/u/2020-05/5eb6b78a.png) +![](https://upload.deblan.org/u/2020-08/5f3551d1.png) + +![](https://upload.deblan.org/u/2020-08/5f3551f0.png) diff --git a/appinfo/info.xml b/appinfo/info.xml index b005569..c376bbe 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -23,8 +23,9 @@ You can report a bug or request a feature by opening an issue. https://gitnet.fr/deblan/side_menu https://upload.deblan.org/u/2020-03/5e81b219.jpg https://upload.deblan.org/u/2020-03/5e7fab2b.jpg - https://upload.deblan.org/u/2020-05/5eb6b76e.png - https://upload.deblan.org/u/2020-05/5eb6b78a.png + https://upload.deblan.org/u/2020-08/5f3552b8.png + https://upload.deblan.org/u/2020-08/5f3551d1.png + https://upload.deblan.org/u/2020-08/5f3551f0.png From 9eec0ce3efc6dd58f6731a81d5b5584192e71b7a Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 21:22:10 +0200 Subject: [PATCH 024/800] add icon color filter range --- css/admin.css | 3 +++ css/sideMenu.css | 1 + lib/Controller/CssController.php | 1 + lib/Settings/Admin.php | 10 +++++----- templates/settings/admin-form.php | 29 ++++++++++++++++++----------- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/css/admin.css b/css/admin.css index 6532ea0..ea60c8f 100644 --- a/css/admin.css +++ b/css/admin.css @@ -24,6 +24,9 @@ vertical-align: middle; } +#side-menu-section input[type="range"] { + vertical-align: middle; +} #side-menu-section select { margin: 10px 0 10px 0; diff --git a/css/sideMenu.css b/css/sideMenu.css index 67cb823..3cfad48 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -63,6 +63,7 @@ width: 20px; vertical-align: top; margin-right: 10px; + filter: invert(var(--side-menu-icon-invert-filter, 0%)); } .side-menu-app-icon svg { diff --git a/lib/Controller/CssController.php b/lib/Controller/CssController.php index b06ff49..1845e15 100644 --- a/lib/Controller/CssController.php +++ b/lib/Controller/CssController.php @@ -74,6 +74,7 @@ class CssController extends Controller 'loader-color' => $this->config->getAppValue('side_menu', 'loader-color', '#0e75ac'), 'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'), 'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'), + 'icon-invert-filter' => abs((int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0')).'%', ], 'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1), 'opener-only' => (bool) $this->config->getAppValue('side_menu', 'opener-only', 0), diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 0131a50..314d91d 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -18,12 +18,12 @@ namespace OCA\SideMenu\Settings; +use OCA\SideMenu\Service\AppRepository; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IConfig; use OCP\IL10N; use OCP\ILogger; use OCP\Settings\ISettings; -use OCP\IConfig; -use OCA\SideMenu\Service\AppRepository; class Admin implements ISettings { @@ -68,9 +68,9 @@ class Admin implements ISettings 'background-color-to' => $backgroundColorTo, 'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'), 'loader-color' => $this->config->getAppValue('side_menu', 'loader-color', '#0e75ac'), + 'icon-invert-filter' => (int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0'), 'loader-enabled' => $this->config->getAppValue('side_menu', 'loader-enabled', '1'), 'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'), - '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'), @@ -98,8 +98,8 @@ class Admin implements ISettings /** * @return int whether the form should be rather on the top or bottom of - * the admin section. The forms are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. + * the admin section. The forms are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. * * E.g.: 70 */ diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index 64e8c62..b841b11 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -88,21 +88,28 @@ $choicesSizes = [
-
-

This feature is not compatible with the big menu display.

-
- + + t('Same color')); ?> + + + + + + t('Opposite color')); ?> +
From 011d24d3bd518d6dc8a5668f05d6f21ef6115803 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 22:07:09 +0200 Subject: [PATCH 025/800] add icon opacity --- css/sideMenu.css | 1 + lib/Controller/CssController.php | 1 + lib/Settings/Admin.php | 1 + templates/settings/admin-form.php | 21 ++++++++++++++++++++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/css/sideMenu.css b/css/sideMenu.css index 3cfad48..7c53109 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -64,6 +64,7 @@ vertical-align: top; margin-right: 10px; filter: invert(var(--side-menu-icon-invert-filter, 0%)); + opacity: var(--side-menu-icon-opacity, 1); } .side-menu-app-icon svg { diff --git a/lib/Controller/CssController.php b/lib/Controller/CssController.php index 1845e15..74b5895 100644 --- a/lib/Controller/CssController.php +++ b/lib/Controller/CssController.php @@ -75,6 +75,7 @@ class CssController extends Controller 'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'), 'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'), 'icon-invert-filter' => abs((int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0')).'%', + 'icon-opacity' => abs((int) $this->config->getAppValue('side_menu', 'icon-opacity', '100') / 100), ], 'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1), 'opener-only' => (bool) $this->config->getAppValue('side_menu', 'opener-only', 0), diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 314d91d..a9ce79e 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -69,6 +69,7 @@ class Admin implements ISettings 'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'), 'loader-color' => $this->config->getAppValue('side_menu', 'loader-color', '#0e75ac'), 'icon-invert-filter' => (int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0'), + 'icon-opacity' => (int) $this->config->getAppValue('side_menu', 'opacity', '100'), 'loader-enabled' => $this->config->getAppValue('side_menu', 'loader-enabled', '1'), 'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'), 'cache' => $this->config->getAppValue('side_menu', 'cache', '0'), diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index b841b11..3c580a5 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -89,7 +89,7 @@ $choicesSizes = [
@@ -112,6 +112,25 @@ $choicesSizes = [
+
+ + t('Transparent')); ?> + + + + + + t('Opaque')); ?> + +
+
+
+ +
+
+ +
+
- -
- -
-
- -
From d9ea37ba62bc4c9abf588e91f8a698b770444483 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 23:02:28 +0200 Subject: [PATCH 027/800] fix cache and config key --- lib/Settings/Admin.php | 2 +- src/admin.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index a9ce79e..681bde2 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -69,7 +69,7 @@ class Admin implements ISettings 'current-app-background-color' => $this->config->getAppValue('side_menu', 'current-app-background-color', '#444444'), 'loader-color' => $this->config->getAppValue('side_menu', 'loader-color', '#0e75ac'), 'icon-invert-filter' => (int) $this->config->getAppValue('side_menu', 'icon-invert-filter', '0'), - 'icon-opacity' => (int) $this->config->getAppValue('side_menu', 'opacity', '100'), + 'icon-opacity' => (int) $this->config->getAppValue('side_menu', 'icon-opacity', '100'), 'loader-enabled' => $this->config->getAppValue('side_menu', 'loader-enabled', '1'), 'text-color' => $this->config->getAppValue('side_menu', 'text-color', '#FFFFFF'), 'cache' => $this->config->getAppValue('side_menu', 'cache', '0'), diff --git a/src/admin.js b/src/admin.js index 74f6001..a82da02 100644 --- a/src/admin.js +++ b/src/admin.js @@ -52,8 +52,8 @@ const saveSettings = (key) => { const size = elements.length - if (element === 'side-menu-cache') { - value++ + if (name === 'cache') { + ++value } const callbacks = { From 39aede4a73a7e24e43eb680b139a2ea8def7c498 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 13 Aug 2020 23:15:03 +0200 Subject: [PATCH 028/800] release v1.8.0 --- README.md | 6 ++++-- appinfo/info.xml | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7736e27..6cc5f2a 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,10 @@ Previews ![](https://upload.deblan.org/u/2020-03/5e7fab2b.jpg) -![](https://upload.deblan.org/u/2020-08/5f3552b8.png) - ![](https://upload.deblan.org/u/2020-08/5f3551d1.png) ![](https://upload.deblan.org/u/2020-08/5f3551f0.png) + +![](https://upload.deblan.org/u/2020-08/5f35aae1.png) + +![](https://upload.deblan.org/u/2020-08/5f35ab0f.png) diff --git a/appinfo/info.xml b/appinfo/info.xml index c376bbe..963f008 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -3,7 +3,9 @@ side_menu Side menu Move the top menu to the left side. - agpl Simon Vieille - 1.8.0-rc2 + 1.8.0 SideMenu customization https://gitnet.fr/deblan/side_menu @@ -23,9 +25,10 @@ You can report a bug or request a feature by opening an issue. https://gitnet.fr/deblan/side_menu https://upload.deblan.org/u/2020-03/5e81b219.jpg https://upload.deblan.org/u/2020-03/5e7fab2b.jpg - https://upload.deblan.org/u/2020-08/5f3552b8.png https://upload.deblan.org/u/2020-08/5f3551d1.png https://upload.deblan.org/u/2020-08/5f3551f0.png + https://upload.deblan.org/u/2020-08/5f35aae1.png + https://upload.deblan.org/u/2020-08/5f35ab0f.png From b5ce8b92e1a8c7fe91b7633c734b379312395580 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 14 Aug 2020 13:30:48 +0200 Subject: [PATCH 029/800] fix issue with links --- lib/Controller/NavController.php | 2 +- lib/Service/AppRepository.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 3b807a4..ec0cc7b 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -153,7 +153,7 @@ class NavController extends Controller $items[$category]['apps'][$app['id']] = [ 'name' => $app['name'], - 'href' => $this->router->linkTo($app['id'], ''), + 'href' => $app['href'], 'icon' => $app['previewAsIcon'] ? $app['preview'] : null, ]; } diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index d2dd024..e893a48 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -44,6 +44,7 @@ class AppRepository if (isset($navigation[$id])) { $app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']); + $app['href'] = $navigation[$id]['href']; $visibleApps[$id] = $app; } @@ -54,6 +55,7 @@ class AppRepository $visibleApps[$app['id']] = [ 'id' => $app['id'], 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), + 'href' => $app['href'], 'preview' => $app['icon'], 'previewAsIcon' => true, 'category' => [ @@ -64,6 +66,7 @@ class AppRepository $visibleApps[$app['id']] = [ 'id' => $app['id'], 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), + 'href' => $app['href'], 'preview' => $app['icon'], 'previewAsIcon' => true, 'category' => [], From cf0f459aeb40bf725aa8de56ad088bfa1f3b4f94 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 14 Aug 2020 13:31:13 +0200 Subject: [PATCH 030/800] release v1.8.1 --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 963f008..e4af64b 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -17,7 +17,7 @@ You can report a bug or request a feature by opening an issue. ]]> agpl Simon Vieille - 1.8.0 + 1.8.1 SideMenu customization https://gitnet.fr/deblan/side_menu From e7d319bbf7e84a2146ad00f420c6623d12a99c04 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 18 Aug 2020 14:39:45 +0200 Subject: [PATCH 031/800] fix 't.apps is not iterable' --- src/SideMenuBig.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue index 6574f36..aac5d91 100644 --- a/src/SideMenuBig.vue +++ b/src/SideMenuBig.vue @@ -64,8 +64,8 @@ export default { let apps = [] for (let category of that.items) { - for (let app of category.apps) { - apps.push(app) + for (let a in category.apps) { + apps.push(category.apps[a]) } } From e4f9765247d7279bea74188c7002045b78ffc6c3 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 19 Aug 2020 09:18:29 +0200 Subject: [PATCH 032/800] fix #24: missing apps --- lib/Controller/NavController.php | 2 +- lib/Service/AppRepository.php | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index ec0cc7b..117e6ef 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -154,7 +154,7 @@ class NavController extends Controller $items[$category]['apps'][$app['id']] = [ 'name' => $app['name'], 'href' => $app['href'], - 'icon' => $app['previewAsIcon'] ? $app['preview'] : null, + 'icon' => $app['icon'], ]; } } diff --git a/lib/Service/AppRepository.php b/lib/Service/AppRepository.php index e893a48..736d4ec 100644 --- a/lib/Service/AppRepository.php +++ b/lib/Service/AppRepository.php @@ -42,11 +42,14 @@ class AppRepository foreach ($apps as $app) { $id = $app['id']; - if (isset($navigation[$id])) { - $app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']); - $app['href'] = $navigation[$id]['href']; + foreach ([$app['id'], $app['id'].'_index'] as $id) { + if (isset($navigation[$id])) { + $app['name'] = $this->l10nFactory->get($id)->t($app['name']); + $app['href'] = $navigation[$id]['href']; + $app['icon'] = $navigation[$id]['icon']; - $visibleApps[$id] = $app; + $visibleApps[$id] = $app; + } } } @@ -56,8 +59,7 @@ class AppRepository 'id' => $app['id'], 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), 'href' => $app['href'], - 'preview' => $app['icon'], - 'previewAsIcon' => true, + 'icon' => $app['icon'], 'category' => [ 'external_links', ], @@ -67,8 +69,7 @@ class AppRepository 'id' => $app['id'], 'name' => $this->l10nFactory->get($app['id'])->t($app['name']), 'href' => $app['href'], - 'preview' => $app['icon'], - 'previewAsIcon' => true, + 'icon' => $app['icon'], 'category' => [], ]; } From 3db0c1ccd294ad47bc6edfc81a31f22588a5d8c5 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 19 Aug 2020 11:29:21 +0200 Subject: [PATCH 033/800] fix #23: hidden icons in the top menu --- templates/js/_topMenuApps.js | 39 ++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/templates/js/_topMenuApps.js b/templates/js/_topMenuApps.js index b6fe1c1..efab920 100644 --- a/templates/js/_topMenuApps.js +++ b/templates/js/_topMenuApps.js @@ -5,7 +5,7 @@ var updateTopMenu = function() { var menu = $('#appmenu') var apps = menu.find('li') var minAppsDesktop = 8 - var usePercentualAppMenuLimit = 0.9 + var usePercentualAppMenuLimit = 0.8 var isMobile = $(window).width() < breakpointMobileWidth var lastShownApp = null var appShown = [] @@ -42,18 +42,20 @@ var updateTopMenu = function() { var rightHeaderWidth = $('.header-right').outerWidth() var headerWidth = $('header').outerWidth() - var availableWidth = headerWidth - $('#nextcloud').outerWidth() - $('#header .side-menu-opener').outerWidth() - (rightHeaderWidth > 210 ? rightHeaderWidth : 210) + var availableWidth = headerWidth - $('#nextcloud').outerWidth() + - $('#header .side-menu-opener').outerWidth() + - (rightHeaderWidth > 230 ? rightHeaderWidth : 230) if (!isMobile) { availableWidth = availableWidth * usePercentualAppMenuLimit } + appCount = Math.floor(availableWidth / $('#appmenu li').width()) + if (isMobile && appCount > minAppsDesktop) { appCount = minAppsDesktop } else if (!isMobile && appCount < minAppsDesktop) { appCount = minAppsDesktop - } else { - appCount = Math.floor(availableWidth / $('#appmenu li').width()) } if (appCount === 0) { @@ -102,6 +104,35 @@ var updateTopMenu = function() { k++ }) + $('#apps li.app-external-site').each(function(i, app) { + app = $(app) + var appId = app.attr('data-id') + + if (app.hasClass('in-header')) { + app.find('svg').find('defs').remove() + } else { + var svg = app.find('svg'); + + if (svg.find('defs').length > 0) { + return; + } + + var defs = ` + + + + + ` + + svg.prepend(defs) + svg.find('image').attr('filter', `url(#invertMenuMore-${appId})`) + + var html = svg.get(0).innerHTML.replace(/fecolormatrix/g, 'feColorMatrix'); + + svg.html(html) + } + }) + if (notInHeader === 0) { moreApps.hide() navigation.hide() From d084cfed8631c8b2b1c1e1b44cbe627a96925650 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 19 Aug 2020 11:41:10 +0200 Subject: [PATCH 034/800] fix #25: Icon x for closing the big menu --- css/sideMenu.css | 17 +++++++++++++++++ img/side-menu-opener-closer.svg | 6 ++++++ src/SideMenuBig.vue | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 img/side-menu-opener-closer.svg diff --git a/css/sideMenu.css b/css/sideMenu.css index 7c53109..4cac9e6 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -45,6 +45,11 @@ border: 0; } +.side-menu-closer { + background: url('../img/side-menu-opener-closer.svg'); + display: none; +} + #side-menu.hide-opener .side-menu-opener, .side-menu-opener.hide { display: none; } @@ -193,3 +198,15 @@ height: 100vh; } } + +@media screen and (min-width: 1024px) { + .side-menu-closer { + display: block; + float: right; + margin-right: 9px; + } + + .side-menu-big .side-menu-header { + max-width: 100%; + } +} diff --git a/img/side-menu-opener-closer.svg b/img/side-menu-opener-closer.svg new file mode 100644 index 0000000..3774c6d --- /dev/null +++ b/img/side-menu-opener-closer.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/SideMenuBig.vue b/src/SideMenuBig.vue index aac5d91..89be0b8 100644 --- a/src/SideMenuBig.vue +++ b/src/SideMenuBig.vue @@ -17,7 +17,8 @@ along with this program. If not, see .