Compare commits

..

26 Commits

Author SHA1 Message Date
Simon Vieille 978b7da7ca fix changelog 2025-05-26 18:51:20 +02:00
Simon Vieille 8bb8a94d8c fix #434: move admin navigation opener to the right 2025-05-26 18:49:21 +02:00
Simon Vieille d9051304c8 Merge branch 'translations' into develop 2025-05-26 18:48:38 +02:00
yurtpage 95d7c1f0c7 Translated using Weblate (Slovak)
Currently translated at 52.2% (57 of 109 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/sk/
2025-05-26 18:45:36 +02:00
yurtpage c6fe0db0b6 Translated using Weblate (Russian)
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/ru/
2025-05-26 18:45:35 +02:00
Outbreak2096 3fbfd36cba Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/zh_Hans/
2025-05-26 18:45:35 +02:00
Simon 70a3fefb3d Translated using Weblate (French)
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom Menu/Application
Translate-URL: https://translate.gitnet.fr/projects/custom-menu/application/fr/
2025-05-26 18:45:35 +02:00
deblan ddb5b13849 Added translation using Weblate (Swedish) 2025-05-26 14:37:17 +00:00
Simon Vieille 3f16a674e6 release v5.1.1 2025-05-23 09:02:11 +02:00
Simon Vieille 782faf6add update changelog 2025-05-04 18:34:29 +02:00
Simon Vieille 92d15d161b Merge pull request 'fix #349: add custom controller to retrieve core apps' (#431) from bugfix/issue349-components-apps into develop
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/431
2025-05-04 18:31:36 +02:00
Simon Vieille cd4b3b1054 fix #349: add custom controller to retrieve core apps 2025-05-04 18:24:32 +02:00
Simon Vieille f58dedf553 fix(build): define appName to fix this error: "The '@nextcloud/vue' library was used without setting / replacing the 'appName'" 2025-05-04 13:11:05 +02:00
Simon Vieille 8c6f0ad1da release v5.1.0 2025-04-30 13:01:22 +02:00
Simon Vieille 7485a5b349 Merge pull request 'fix #425: allow to set a color using hex code' (#427) from feature/issue425-colorpicker into develop
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/427
2025-04-30 13:00:29 +02:00
Simon Vieille b0e01c2eec update changelog 2025-04-30 12:57:49 +02:00
Simon Vieille d2730afe9f fix #425: allow to set a color using hex code 2025-04-30 12:57:13 +02:00
Simon Vieille 33ab7dff97 update changelog 2025-04-30 12:50:51 +02:00
Simon Vieille 0da550e3eb Merge pull request 'Use Request object' (#426) from llaumgui-develop into develop
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/426
2025-04-30 12:47:23 +02:00
Simon Vieille 4bea4afb07 refactor(Application): add properties types 2025-04-30 12:45:32 +02:00
llaumgui d485b728e7 Use Request object 2025-04-30 09:30:35 +02:00
yurtpage 9f8db6be4f Translated using Weblate (Slovak)
Currently translated at 52.2% (57 of 109 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/sk/
2025-04-23 20:53:03 +00:00
yurtpage cc28ad4dc5 Translated using Weblate (Russian)
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/ru/
2025-04-23 20:53:02 +00:00
Codeberg Translate 3e139d42a8 Merge branch 'origin/translations' into Weblate. 2025-04-18 20:39:10 +00:00
Outbreak2096 a956efaf15 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/zh_Hans/
2025-04-18 20:39:09 +00:00
Simon 6a54ae3781 Translated using Weblate (French)
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom Menu/Application
Translate-URL: https://translate.gitnet.fr/projects/custom-menu/application/fr/
2025-04-18 16:49:52 +00:00
14 changed files with 315 additions and 96 deletions
+14
View File
@@ -1,5 +1,19 @@
## [Unreleased] ## [Unreleased]
### Fixed
* fix #415: move admin navigation opener to the right
## 5.1.1
### Fixed
* fix(build): define appName to fix this error: "The `@nextcloud/vue` library was used without setting / replacing the `appName`"
* fix #349: add custom controller to retrieve core apps
## 5.1.0
### Added
* fix #425: allow to set a color using hex code
### Fixed
* #422: usage of `OC\AppFramework\Http\Request` instead of `$_SERVER`
## 5.0.3 ## 5.0.3
### Fixed ### Fixed
* fix #422: undefined array key "HTTP_USER_AGENT" * fix #422: undefined array key "HTTP_USER_AGENT"
+1 -1
View File
@@ -30,7 +30,7 @@ Notice
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/). In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
]]></description> ]]></description>
<version>5.0.3</version> <version>5.1.1</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author> <author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
<namespace>SideMenu</namespace> <namespace>SideMenu</namespace>
+8 -17
View File
@@ -2,8 +2,9 @@
namespace OCA\SideMenu\AppInfo; namespace OCA\SideMenu\AppInfo;
use OC; use OC\AllConfig;
use OC\App\AppStore\Fetcher\CategoryFetcher; use OC\App\AppStore\Fetcher\CategoryFetcher;
use OC\AppFramework\Http\Request;
use OC\Security\CSP\ContentSecurityPolicyNonceManager; use OC\Security\CSP\ContentSecurityPolicyNonceManager;
use OC\User\User; use OC\User\User;
use OCA\SideMenu\Service\AppRepository; use OCA\SideMenu\Service\AppRepository;
@@ -31,23 +32,12 @@ use Psr\Container\ContainerInterface;
class Application extends App implements IBootstrap class Application extends App implements IBootstrap
{ {
public const APP_ID = 'side_menu'; public const APP_ID = 'side_menu';
public const APP_NAME = 'Custom menu'; public const APP_NAME = 'Custom menu';
/** protected AllConfig $config;
* @var OC\AllConfig protected ContentSecurityPolicyNonceManager $cspnm;
*/ protected Request $request;
protected $config; protected ?User $user = null;
/**
* @var ContentSecurityPolicyNonceManager
*/
protected $cspnm;
/**
* @var User
*/
protected $user;
public function __construct(array $urlParams = []) public function __construct(array $urlParams = [])
{ {
@@ -96,6 +86,7 @@ class Application extends App implements IBootstrap
$this->config = \OC::$server->getConfig(); $this->config = \OC::$server->getConfig();
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager(); $this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
$this->user = \OC::$server[IUserSession::class]->getUser(); $this->user = \OC::$server[IUserSession::class]->getUser();
$this->request = \OC::$server->getRequest();
if (!$this->isEnabled()) { if (!$this->isEnabled()) {
return; return;
@@ -106,7 +97,7 @@ class Application extends App implements IBootstrap
protected function isEnabled(): bool protected function isEnabled(): bool
{ {
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) { if (isset($this->request->server['HTTP_USER_AGENT']) && preg_match('/MemoriesNative/', $this->request->server['HTTP_USER_AGENT'])) {
return false; return false;
} }
+74
View File
@@ -0,0 +1,74 @@
<?php
/**
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace OCA\SideMenu\Controller;
use OCA\SideMenu\Service\AppRepository;
use OCA\SideMenu\Service\ConfigProxy;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUserSession;
class CoreController extends Controller
{
public function __construct(
string $appName,
IRequest $request,
protected ConfigProxy $config,
protected AppRepository $appRepository,
) {
parent::__construct($appName, $request);
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/core/apps')]
public function items(): JSONResponse
{
$user = \OC::$server[IUserSession::class]->getUser();
$items = [];
if (!$user) {
return new JSONResponse([
'items' => $items,
]);
}
$apps = $this->appRepository->getOrderedApps($user);
$keys = ['id', 'name', 'category', 'href', 'icon'];
foreach ($apps as &$app) {
foreach ($app as $key => $value) {
if (!in_array($key, $keys)) {
unset($app[$key]);
}
}
}
return new JSONResponse([
'items' => $apps,
]);
}
}
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<template> <template>
<NcColorPicker <NcColorPicker
v-model="model" v-model="model"
:advancedFields="true"
class="cm-settings-form-colorpicker" class="cm-settings-form-colorpicker"
> >
<div <div
+37 -18
View File
@@ -1,15 +1,20 @@
'Custom menu': 'Menu personnalisé' 'Custom menu': '­­­Menu personnalisé'
'Enable the custom menu': 'Activer le menu personnalisé' 'Enable the custom menu': 'Activer le menu personnalisé'
'No': 'Non' 'No': 'Non'
'Yes': 'Oui' 'Yes': 'Oui'
'Menu': 'Menu' 'Menu': 'Menu'
'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Utiliser le raccourcis clavier Ctrl+o pour ouvrir et fermer le menu latéral. Utiliser tab key pour naviguer.' 'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Utiliser
le raccourcis clavier Ctrl+o pour ouvrir et fermer le menu latéral. Utiliser tab
key pour naviguer.'
'Top menu': 'Menu supérieur' 'Top menu': 'Menu supérieur'
'Apps that not must be moved in the side menu': 'Les applications qui ne doivent pas être affichées dans le menu latéral' 'Apps that not must be moved in the side menu': 'Les applications qui ne doivent pas
'If there is no selection then the global configuration is applied.': "Si il n'y a aucune sélection alors la configuration globale sera appliquée." être affichées dans le menu latéral'
'If there is no selection then the global configuration is applied.': "Si il n'y a
aucune sélection alors la configuration globale sera appliquée."
'Experimental': 'Expérimental' 'Experimental': 'Expérimental'
'Save': 'Sauvegarder' 'Save': 'Sauvegarder'
'You like this app and you want to support me?': "Vous aimer cette application et vous souhaitez m'aider ?" 'You like this app and you want to support me?': "Vous aimer cette application et
vous souhaitez m'aider ?"
'Buy me a coffee ☕': 'Offrez moi un café ☕' 'Buy me a coffee ☕': 'Offrez moi un café ☕'
'Hidden': 'Caché' 'Hidden': 'Caché'
'Small': 'Petit' 'Small': 'Petit'
@@ -43,17 +48,22 @@
'Before the logo': 'Avant le logo' 'Before the logo': 'Avant le logo'
'After the logo': 'Après le logo' 'After the logo': 'Après le logo'
'Position': 'Position' 'Position': 'Position'
'Show only the opener (hidden logo)': "Afficher uniquement le bouton d'ouverture (masquer le logo)" 'Show only the opener (hidden logo)': "Afficher uniquement le bouton d'ouverture (masquer
'Do not display the side menu and the opener if there is no application (eg: public pages).': "Ne pas afficher le menu latéral et le bouton d'ouverture s'il n'y a aucune application (exemple : page publiques)." le logo)"
'Do not display the side menu and the opener if there is no application (eg: public pages).': "Ne
pas afficher le menu latéral et le bouton d'ouverture s'il n'y a aucune application
(exemple : page publiques)."
'Panel': 'Panneau' 'Panel': 'Panneau'
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Ouvrir le menu au passage de la souris (automatiquement désactivé sur les écrans tactiles)' 'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Ouvrir
le menu au passage de la souris (automatiquement désactivé sur les écrans tactiles)'
'Display the big menu': 'Afficher le menu large' 'Display the big menu': 'Afficher le menu large'
'Display the logo': 'Afficher le logo' 'Display the logo': 'Afficher le logo'
'Icons and texts': 'Icônes et textes' 'Icons and texts': 'Icônes et textes'
'Loader enabled': "Activation de l'indicateur de chargement" 'Loader enabled': "Activation de l'indicateur de chargement"
'Tips': 'Astuces' 'Tips': 'Astuces'
'Always displayed': 'Toujours affiché' 'Always displayed': 'Toujours affiché'
'This is the automatic behavior when the menu is always displayed.': "C'est le comportement automatique lorsque le menu est toujours affiché." 'This is the automatic behavior when the menu is always displayed.': "C'est le comportement
automatique lorsque le menu est toujours affiché."
'Not compatible with touch screens.': 'Incompatible avec les écrans tactiles.' 'Not compatible with touch screens.': 'Incompatible avec les écrans tactiles.'
'Big menu': 'Menu large' 'Big menu': 'Menu large'
'Live preview': 'Aperçu en direct' 'Live preview': 'Aperçu en direct'
@@ -62,16 +72,21 @@
'Use my selection': 'Utiliser ma sélection' 'Use my selection': 'Utiliser ma sélection'
'Show and hide the list of applications': 'Afficher et masquer la liste des applications' 'Show and hide the list of applications': 'Afficher et masquer la liste des applications'
'Use the avatar instead of the logo': "Utiliser l'avatar à la place du logo" 'Use the avatar instead of the logo': "Utiliser l'avatar à la place du logo"
'You do not have permission to change the settings.': "Vous n'avez pas la permission de changer les paramètres." 'You do not have permission to change the settings.': "Vous n'avez pas la permission
de changer les paramètres."
'Force this configuration to users': 'Forcer cette configuration aux utilisateurs' 'Force this configuration to users': 'Forcer cette configuration aux utilisateurs'
'Export the configuration': 'Exporter la configuration' 'Export the configuration': 'Exporter la configuration'
'Purge the cache': 'Purger le cache' 'Purge the cache': 'Purger le cache'
'Show the link to settings': 'Afficher le lien vers les paramètres' 'Show the link to settings': 'Afficher le lien vers les paramètres'
'The menu is enabled by default for users': 'Le menu est activé par défaut pour les utilisateurs' 'The menu is enabled by default for users': 'Le menu est activé par défaut pour les
utilisateurs'
'Except when the configuration is forced.': 'Sauf lorsque la configuration est forcée.' 'Except when the configuration is forced.': 'Sauf lorsque la configuration est forcée.'
'Apps that should not be displayed in the menu': 'Applications qui ne doivent pas être affichées dans le menu' 'Apps that should not be displayed in the menu': 'Applications qui ne doivent pas
'This feature is only compatible with the <code>big menu</code> display.': "Compatible avec l'affichage <code>Menu large</code>." être affichées dans le menu'
'The logo is a link to the default app': "Le logo est un lien vers l'application par défaut" 'This feature is only compatible with the <code>big menu</code> display.': "Compatible
avec l'affichage <code>Menu large</code>."
'The logo is a link to the default app': "Le logo est un lien vers l'application par
défaut"
'Others': 'Autres' 'Others': 'Autres'
'Categories': 'Catégories' 'Categories': 'Catégories'
'Customize sorting': 'Personnaliser le tri' 'Customize sorting': 'Personnaliser le tri'
@@ -79,7 +94,8 @@
'Name': 'Nom' 'Name': 'Nom'
'Customed': 'Personnalisé' 'Customed': 'Personnalisé'
'Show and hide the list of categories': 'Afficher et masquer la liste des catégories' 'Show and hide the list of categories': 'Afficher et masquer la liste des catégories'
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Ces paramètres sont utilisés lorsque le thème sombre ou le thème Breeze Dark sont activés.' 'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Ces
paramètres sont utilisés lorsque le thème sombre ou le thème Breeze Dark sont activés.'
'Dark mode colors': 'Couleurs du mode sombre' 'Dark mode colors': 'Couleurs du mode sombre'
'With categories': 'Avec les catégories' 'With categories': 'Avec les catégories'
'Custom categories': 'Catégories personnalisées' 'Custom categories': 'Catégories personnalisées'
@@ -87,9 +103,12 @@
'Reset to default': 'Restaurer les valeurs par défaut' 'Reset to default': 'Restaurer les valeurs par défaut'
'Applications': 'Applications' 'Applications': 'Applications'
'Applications kept in the top menu': 'Applications conservées dans le menu supérieur' 'Applications kept in the top menu': 'Applications conservées dans le menu supérieur'
'Applications kept in the top menu but also shown in side menu': 'Applications conservées dans le menu supérieur mais également affichées dans le menu latéral' 'Applications kept in the top menu but also shown in side menu': 'Applications conservées
'These applications must be selected in the previous option.': "Ces applications doivent également être sélectionnées dans l'option précédente." dans le menu supérieur mais également affichées dans le menu latéral'
'Hide labels on mouse over': 'Masquer le libellé des applications au passage de la souris' 'These applications must be selected in the previous option.': "Ces applications doivent
également être sélectionnées dans l'option précédente."
'Hide labels on mouse over': 'Masquer le libellé des applications au passage de la
souris'
'Except the hovered app': "À l'exception de l'application survolée" 'Except the hovered app': "À l'exception de l'application survolée"
'Search': 'Rechercher' 'Search': 'Rechercher'
'Toggle the menu': 'Basculer le menu' 'Toggle the menu': 'Basculer le menu'
+20 -20
View File
@@ -43,8 +43,8 @@
'Before the logo': 'Перед логотипом' 'Before the logo': 'Перед логотипом'
'After the logo': 'После логотипа' 'After the logo': 'После логотипа'
'Position': 'Положение' 'Position': 'Положение'
'Show only the opener (hidden logo)': 'Показать только открывающую часть (скрытый логотип)' 'Show only the opener (hidden logo)': 'Показать только открывающую кнопку (скрытый логотип)'
'Do not display the side menu and the opener if there is no application (eg: public pages).': 'Не отображать боковое меню и открывалку, если нет приложения (например, публичные страницы).' 'Do not display the side menu and the opener if there is no application (eg: public pages).': 'Не отображать боковое меню и открывалку, если нет доступного приложения (н.п. публичные страницы).'
'Panel': 'Панель' 'Panel': 'Панель'
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Открывать меню при наведении мыши на открывалку (автоматически отключается на сенсорных экранах)' 'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Открывать меню при наведении мыши на открывалку (автоматически отключается на сенсорных экранах)'
'Display the big menu': 'Отобразить большое меню' 'Display the big menu': 'Отобразить большое меню'
@@ -63,21 +63,21 @@
'Show and hide the list of applications': 'Показать или скрыть список приложений' 'Show and hide the list of applications': 'Показать или скрыть список приложений'
'Use the avatar instead of the logo': 'Использовать аватар вместо логотипа' 'Use the avatar instead of the logo': 'Использовать аватар вместо логотипа'
'You do not have permission to change the settings.': 'У вас нет разрешения изменять настройки.' 'You do not have permission to change the settings.': 'У вас нет разрешения изменять настройки.'
'Force this configuration to users': 'Принудительно предоставить эту конфигурацию пользователям' 'Force this configuration to users': 'Для обеспечения соблюдения этих настроек пользователями'
'Export the configuration': 'Экспортировать конфигурацию' 'Export the configuration': 'Экспортировать конфигурацию'
'Purge the cache': 'Очистить кэш' 'Purge the cache': 'Очистить кэш'
'Show the link to settings': 'Показать ссылку на настройки' 'Show the link to settings': 'Показать ссылку на настройки'
'The menu is enabled by default for users': 'Это меню включено по умолчанию для пользователей' 'The menu is enabled by default for users': 'Это меню включено по умолчанию для пользователей'
'Except when the configuration is forced.': 'За исключением случаев, когда конфигурация является принудительной.' 'Except when the configuration is forced.': 'За исключением случаев, когда настройка принудительная.'
'Apps that should not be displayed in the menu': 'Ппрограммы, скрытые из меню' 'Apps that should not be displayed in the menu': 'Ппрограммы, скрытые из меню'
'This feature is only compatible with the <code>big menu</code> display.': 'Эта функция совместима только с отображением <code>большого меню</code>.' 'This feature is only compatible with the <code>big menu</code> display.': 'Эта возможность совместима только с отображением <code>большого меню</code>.'
'The logo is a link to the default app': 'Логотип открывает приложение по умолчанию' 'The logo is a link to the default app': 'Логотип открывает приложение по умолчанию'
'Others': 'Прочие' 'Others': 'Прочие'
'Categories': 'Категории' 'Categories': 'Категории'
'Customize sorting': 'Настроить сортировку' 'Customize sorting': 'Настроить сортировку'
'Order by': 'В порядке' 'Order by': 'В порядке'
'Name': 'Название' 'Name': 'Название'
'Customed': 'Customed' 'Customed': 'Приспособлено'
'Show and hide the list of categories': 'Показать или скрыть список категорий' 'Show and hide the list of categories': 'Показать или скрыть список категорий'
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Эти настройки используются темами Тёмная и Тёмная Breeze.' 'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Эти настройки используются темами Тёмная и Тёмная Breeze.'
'Dark mode colors': 'Цвета тёмной темы' 'Dark mode colors': 'Цвета тёмной темы'
@@ -90,22 +90,22 @@
'Applications kept in the top menu but also shown in side menu': 'Приложения хранящиеся в верхнем меню, но также отображающиеся в боковом меню' 'Applications kept in the top menu but also shown in side menu': 'Приложения хранящиеся в верхнем меню, но также отображающиеся в боковом меню'
'These applications must be selected in the previous option.': 'Эти приложения необходимо выбрать в предыдущем выборе.' 'These applications must be selected in the previous option.': 'Эти приложения необходимо выбрать в предыдущем выборе.'
'Hide labels on mouse over': 'Скрыть название при наведении мыши' 'Hide labels on mouse over': 'Скрыть название при наведении мыши'
'Except the hovered app': 'Кроме приложения, на котором курсор' 'Except the hovered app': 'Кроме приложения на котором сейчас'
'Search': 'Поиск' 'Search': 'Поиск'
'Toggle the menu': 'Переключить меню' 'Toggle the menu': 'Переключить меню'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Ask the developer' 'Ask the developer': 'Спросить разработчика'
'New request': 'New request' 'New request': 'Новый запрос'
'Report a bug': 'Report a bug' 'Report a bug': 'Пожаловаться на ошибку'
'Show the configuration': 'Show the configuration' 'Show the configuration': 'Показать конфигурацию'
'Configuration:': 'Configuration:' 'Configuration:': 'Configuration:'
'Done!': 'Done!' 'Done!': 'Готово!'
'Copy': 'Copy' 'Copy': 'Копировать'
'Need help': 'Need help' 'Need help': 'Нужна помощь'
'I would like a new feature': 'I would like a new feature' 'I would like a new feature': 'Я хочу новую возможность'
'Something went wrong': 'Something went wrong' 'Something went wrong': 'Что-то пошло не так'
'Select apps': 'Select apps' 'Select apps': 'Выберете приложения'
'Sort': 'Sort' 'Sort': 'Сортировать'
'Customize': 'Customize' 'Customize': 'Приспособить'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Close' 'Close': 'Закрыть'
+1 -1
View File
@@ -90,7 +90,7 @@
'Applications kept in the top menu but also shown in side menu': 'Applications kept in the top menu but also shown in side menu' 'Applications kept in the top menu but also shown in side menu': 'Applications kept in the top menu but also shown in side menu'
'These applications must be selected in the previous option.': 'These applications must be selected in the previous option.' 'These applications must be selected in the previous option.': 'These applications must be selected in the previous option.'
'Hide labels on mouse over': 'Hide labels on mouse over' 'Hide labels on mouse over': 'Hide labels on mouse over'
'Toggle the menu': 'Toggle the menu' 'Toggle the menu': 'Prepnite ponuku'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Ask the developer' 'Ask the developer': 'Ask the developer'
'New request': 'New request' 'New request': 'New request'
+111
View File
@@ -0,0 +1,111 @@
'Custom menu': ''
'Enable the custom menu': ''
'No': ''
'Yes': ''
'Menu': ''
'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': ''
'Top menu': ''
'Apps that not must be moved in the side menu': ''
'If there is no selection then the global configuration is applied.': ''
'Experimental': ''
'Save': ''
'You like this app and you want to support me?': ''
'Buy me a coffee ☕': ''
'Hidden': ''
'Small': ''
'Normal': ''
'Big': ''
'Hidden icon': ''
'Small icon': ''
'Normal icon': ''
'Big icon': ''
'Hidden text': ''
'Small text': ''
'Normal text': ''
'Big text': ''
'Colors': ''
'Background color': ''
'Background color of current app': ''
'Text color': ''
'Loader': ''
'Icon': ''
'Same color': ''
'Opposite color': ''
'Transparent': ''
'Opaque': ''
'Opener': ''
'Default': ''
'Default (dark)': ''
'Hamburger': ''
'Hamburger (dark)': ''
'Hamburger 2': ''
'Hamburger 2 (dark)': ''
'Before the logo': ''
'After the logo': ''
'Position': ''
'Show only the opener (hidden logo)': ''
'Do not display the side menu and the opener if there is no application (eg: public pages).': ''
'Panel': ''
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': ''
'Display the big menu': ''
'Display the logo': ''
'Icons and texts': ''
'Loader enabled': ''
'Tips': ''
'Always displayed': ''
'This is the automatic behavior when the menu is always displayed.': ''
'Not compatible with touch screens.': ''
'Big menu': ''
'Live preview': ''
'Open apps in new tab': ''
'Use the global setting': ''
'Use my selection': ''
'Show and hide the list of applications': ''
'Use the avatar instead of the logo': ''
'You do not have permission to change the settings.': ''
'Force this configuration to users': ''
'Export the configuration': ''
'Purge the cache': ''
'Show the link to settings': ''
'The menu is enabled by default for users': ''
'Except when the configuration is forced.': ''
'Apps that should not be displayed in the menu': ''
'This feature is only compatible with the <code>big menu</code> display.': ''
'The logo is a link to the default app': ''
'Others': ''
'Categories': ''
'Customize sorting': ''
'Order by': ''
'Name': ''
'Customed': ''
'Show and hide the list of categories': ''
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': ''
'Dark mode colors': ''
'With categories': ''
'Custom categories': ''
'Customize application categories': ''
'Reset to default': ''
'Applications': ''
'Applications kept in the top menu': ''
'Applications kept in the top menu but also shown in side menu': ''
'These applications must be selected in the previous option.': ''
'Hide labels on mouse over': ''
'Except the hovered app': ''
'Search': ''
'Toggle the menu': ''
'Open the documentation': ''
'Ask the developer': ''
'New request': ''
'Report a bug': ''
'Show the configuration': ''
'Configuration:': ''
'Done!': ''
'Copy': ''
'Need help': ''
'I would like a new feature': ''
'Something went wrong': ''
'Select apps': ''
'Sort': ''
'Customize': ''
'Custom': ''
'Close': ''
+32 -32
View File
@@ -1,9 +1,9 @@
'Custom menu': '自定义菜单' 'Custom menu': '自定义菜单'
'Enable the custom menu': '启用自定义菜单' 'Enable the custom menu': '启用自定义菜单'
'No': '取消' 'No': '否'
'Yes': '确定' 'Yes': '是'
'Menu': '菜单' 'Menu': '菜单'
'Use the shortcut Ctrl+o to open and to hide the side menu. Use <span class="keyboard-key">tab</span> to navigate.': '使用快捷键 Ctrl+o 打开或隐藏侧边栏菜单。使用<span class="keyboard-key">tab</span> 来导航。' 'Use the shortcut Ctrl+o to open and to hide the side menu. Use <span class="keyboard-key">tab</span> to navigate.': '使用快捷键 Ctrl+o 打开或隐藏侧边栏菜单。使用 <span class="keyboard-key">Tab</span> 键来导航。'
'Top menu': '顶部菜单' 'Top menu': '顶部菜单'
'Apps that not must be moved in the side menu': '禁止在侧边栏菜单移动的应用' 'Apps that not must be moved in the side menu': '禁止在侧边栏菜单移动的应用'
'If there is no selection then the global configuration is applied.': '如果没有选择,则应用全局配置。' 'If there is no selection then the global configuration is applied.': '如果没有选择,则应用全局配置。'
@@ -25,7 +25,7 @@
'Opposite color': '相反颜色' 'Opposite color': '相反颜色'
'Transparent': '透明' 'Transparent': '透明'
'Opaque': '不透明' 'Opaque': '不透明'
'Opener': '容器' 'Opener': '触发器'
'Default': '默认' 'Default': '默认'
'Default (dark)': '默认(深色)' 'Default (dark)': '默认(深色)'
'Hamburger': 'Hamburger' 'Hamburger': 'Hamburger'
@@ -35,10 +35,10 @@
'Before the logo': '在徽标之前' 'Before the logo': '在徽标之前'
'After the logo': '在徽标之后' 'After the logo': '在徽标之后'
'Position': '位置' 'Position': '位置'
'Show only the opener (hidden logo)': '只显示容器(隐藏徽标)' 'Show only the opener (hidden logo)': '仅显示触发器(隐藏徽标)'
'Do not display the side menu and the opener if there is no application (eg: public pages).': '如果没有应用程序(例如:公共页面),则不要显示侧边栏菜单和容器。' 'Do not display the side menu and the opener if there is no application (eg: public pages).': '如果没有应用程序(例如:公共页面),则不要显示侧边栏菜单和触发器。'
'Panel': '面板' 'Panel': '面板'
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': '鼠标悬停时打开菜单 (触摸屏时将自动禁用)' 'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': '‌当鼠标悬停在触发器上时打开菜单(在触摸屏上自动禁用)'
'Display the big menu': '显示大型菜单' 'Display the big menu': '显示大型菜单'
'Display the logo': '显示徽标' 'Display the logo': '显示徽标'
'Icons and texts': '图标和文本' 'Icons and texts': '图标和文本'
@@ -63,7 +63,7 @@
'Except when the configuration is forced.': '除非强制配置。' 'Except when the configuration is forced.': '除非强制配置。'
'Apps that should not be displayed in the menu': '禁止在菜单中显示的应用' 'Apps that should not be displayed in the menu': '禁止在菜单中显示的应用'
'This feature is only compatible with the <code>big menu</code> display.': '此功能只和<code>大型菜单</code>兼容。' 'This feature is only compatible with the <code>big menu</code> display.': '此功能只和<code>大型菜单</code>兼容。'
'The logo is a link to the default app': 'logo链接到默认应用' 'The logo is a link to the default app': '徽标链接到默认应用'
'Others': '其他' 'Others': '其他'
'Categories': '类别' 'Categories': '类别'
'Customize sorting': '自定义排序' 'Customize sorting': '自定义排序'
@@ -85,27 +85,27 @@
'Small text': '小文本' 'Small text': '小文本'
'Normal text': '普通文本' 'Normal text': '普通文本'
'Big text': '大文本' 'Big text': '大文本'
'Applications': 'Applications' 'Applications': '应用程序'
'Applications kept in the top menu': 'Applications kept in the top menu' 'Applications kept in the top menu': '应用程序保留在顶部菜单中'
'Applications kept in the top menu but also shown in side menu': 'Applications kept in the top menu but also shown in side menu' 'Applications kept in the top menu but also shown in side menu': '应用程序保留在顶部菜单中,但也显示在侧边栏菜单中'
'These applications must be selected in the previous option.': 'These applications must be selected in the previous option.' 'These applications must be selected in the previous option.': '必须在上一个选项中选择这些应用程序。'
'Hide labels on mouse over': 'Hide labels on mouse over' 'Hide labels on mouse over': '鼠标悬停时隐藏标签'
'Except the hovered app': 'Except the hovered app' 'Except the hovered app': '除了悬停的应用'
'Search': 'Search' 'Search': '搜索'
'Toggle menu': 'Toggle menu' 'Toggle menu': '切换菜单'
'Open the documentation': 'Open the documentation' 'Open the documentation': '打开文档'
'Ask the developer': 'Ask the developer' 'Ask the developer': '询问开发者'
'New request': 'New request' 'New request': '新请求'
'Report a bug': 'Report a bug' 'Report a bug': '报告错误'
'Show the configuration': 'Show the configuration' 'Show the configuration': '显示配置'
'Configuration:': 'Configuration:' 'Configuration:': '配置:'
'Done!': 'Done!' 'Done!': '完成!'
'Copy': 'Copy' 'Copy': '复制'
'Need help': 'Need help' 'Need help': '需要帮助'
'I would like a new feature': 'I would like a new feature' 'I would like a new feature': '我想要一个新功能'
'Something went wrong': 'Something went wrong' 'Something went wrong': '出了点问题'
'Select apps': 'Select apps' 'Select apps': '选择应用'
'Sort': 'Sort' 'Sort': '排序'
'Customize': 'Customize' 'Customize': '自定义'
'Custom': 'Custom' 'Custom': '自定义'
'Close': 'Close' 'Close': '关闭'
+6 -3
View File
@@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:data-app-id="app.id" :data-app-id="app.id"
class="app-menu-entry" class="app-menu-entry"
:class="{ :class="{
'app-menu-entry__active': app.active, 'app-menu-entry__active': app.id === activeApp,
'app-menu-entry__hidden-label': hiddenLabels === 1, 'app-menu-entry__hidden-label': hiddenLabels === 1,
'app-menu-main__show-hovered': hiddenLabels === 2, 'app-menu-main__show-hovered': hiddenLabels === 2,
}" }"
@@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:class="{ 'has-unread': app.unread > 0 }" :class="{ 'has-unread': app.unread > 0 }"
:aria-label="app.name" :aria-label="app.name"
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined" :target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
:aria-current="app.active ? 'page' : false" :aria-current="app.id === activeApp ? 'page' : false"
> >
<img <img
:src="app.icon" :src="app.icon"
@@ -69,7 +69,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
v-for="app in popoverAppList" v-for="app in popoverAppList"
:key="app.id" :key="app.id"
:aria-label="app.name" :aria-label="app.name"
:aria-current="app.active ? 'page' : false" :aria-current="app.id === activeApp ? 'page' : false"
:href="app.href" :href="app.href"
:style="makeStyle(app)" :style="makeStyle(app)"
class="cm-standardmenu-app-menu-popover-entry app-menu-popover-entry" class="cm-standardmenu-app-menu-popover-entry app-menu-popover-entry"
@@ -101,6 +101,7 @@ import { ref, onMounted } from 'vue'
import { useConfigStore } from '../store/config.js' import { useConfigStore } from '../store/config.js'
import { useNavStore } from '../store/nav.js' import { useNavStore } from '../store/nav.js'
import { NcActions, NcActionLink } from '@nextcloud/vue' import { NcActions, NcActionLink } from '@nextcloud/vue'
import { getActiveAppId } from '../lib/app.js'
const navStore = useNavStore() const navStore = useNavStore()
const configStore = useConfigStore() const configStore = useConfigStore()
@@ -112,6 +113,7 @@ const topMenuApps = ref([])
const appsOrder = ref([]) const appsOrder = ref([])
const mainAppList = ref([]) const mainAppList = ref([])
const popoverAppList = ref([]) const popoverAppList = ref([])
const activeApp = ref(null)
let resizeTimeout = null let resizeTimeout = null
const setApps = (value) => { const setApps = (value) => {
@@ -170,6 +172,7 @@ onMounted(async () => {
hiddenLabels.value = config['top-menu-mouse-over-hidden-label'] hiddenLabels.value = config['top-menu-mouse-over-hidden-label']
topMenuApps.value = config['top-menu-apps'] topMenuApps.value = config['top-menu-apps']
appsOrder.value = config['apps-order'] appsOrder.value = config['apps-order']
activeApp.value = getActiveAppId()
ready.value = true ready.value = true
setApps(await navStore.getCoreApps()) setApps(await navStore.getCoreApps())
+5
View File
@@ -32,6 +32,11 @@
.app-navigation-entry__name { .app-navigation-entry__name {
padding-left: 10px !important; padding-left: 10px !important;
} }
.app-navigation-toggle-wrapper {
top: calc(var(--app-navigation-padding) - 3px) !important;
inset-inline-end: calc(0px - var(--app-navigation-padding) * 3) !important;
}
} }
&-tips { &-tips {
+1 -4
View File
@@ -41,10 +41,7 @@ export const useNavStore = defineStore('nav', () => {
async function getCoreApps() { async function getCoreApps() {
if (coreApps == null) { if (coreApps == null) {
coreApps = await axios coreApps = await await axios.get(generateUrl('/apps/side_menu/core/apps')).then((response) => response.data.items)
.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
.then((response) => response.data)
.then((value) => value.ocs.data)
} }
return coreApps return coreApps
+4
View File
@@ -77,6 +77,10 @@ module.exports = {
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'], Buffer: ['buffer', 'Buffer'],
}), }),
new webpack.DefinePlugin({
appName: JSON.stringify(appName),
}),
], ],
resolve: { resolve: {