Compare commits

..

5 commits

Author SHA1 Message Date
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
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
15 changed files with 126 additions and 128 deletions

View file

@ -32,7 +32,7 @@ steps:
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
- mkdir /tmp/app
- cp -r README.md CHANGELOG.md appinfo lib img l10n js src templates screenshots vendor /tmp/app
- cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor /tmp/app
- /usr/src/nextcloud/occ integrity:sign-app
--privateKey=/tmp/side_menu.key
--certificate=/tmp/side_menu.crt

View file

@ -1,36 +1,5 @@
## [Unreleased]
## 5.0.3
### Fixed
* fix #422: undefined array key "HTTP_USER_AGENT"
## 5.0.2
### Fixed
* fix #413: add user-agent check for memories mobile app
* fix #418: allow non admin user to access their settings
## 5.0.1
### Fixed
* fix(StandardMenu): appLimit must return a value > 0
## 5.0.0
### Fixed
* fix apps's order in the standard menu
### Added
* add new translations
* add route `/apps/side_menu/user/config`
* add new UI for admin and personals settings
### Changed
* migrate to Vue 3 and so add/update or remove dependencies
* replace CSS with SCSS
* remove route `/apps/side_menu/js/script`
* remove generated Javascript using PHP
* rewrite the standard menu of Nextcloud
### Security
* fix CVE-2023-44270
* fix CVE-2024-9506
* fix CVE-2024-6783
## 4.1.1
### Fixed
* fix(CssController): add missing NoCSRFRequired import (#397)

View file

@ -20,7 +20,7 @@ release:
test -d $$RELEASE_DIRECTORY/$$VERSION && rm -fr $$RELEASE_DIRECTORY/$$VERSION
mkdir -p $$RELEASE_DIRECTORY/$$VERSION/side_menu
cp -r README.md CHANGELOG.md appinfo lib img l10n js src templates screenshots vendor $$RELEASE_DIRECTORY/$$VERSION/side_menu
cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor $$RELEASE_DIRECTORY/$$VERSION/side_menu
cd $$RELEASE_DIRECTORY/$$VERSION
zip -r side_menu_v$$VERSION.zip side_menu
tar cvzf side_menu_v$$VERSION.tar.gz side_menu

View file

@ -24,7 +24,8 @@ You like this app and you want to support me? ☕ [Buy me a coffee](https://www.
Requirements
------------
* PHP >= 8.1
* PHP >= 8.0
* App `theming` enabled
Installation and upgrade
------------------------
@ -40,7 +41,7 @@ If you want to install it from source, go to https://gitnet.fr/deblan/side_menu/
```
$ cd /path/to/nextcloud/apps
$ VERSION=x.y.z; curl -sS https://gitnet.fr/deblan/side_menu/releases/download/v${VERSION}/side_menu_v${VERSION}.tar.gz | tar xvfz -
$ curl -sS https://gitnet.fr/attachments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | tar xvfz -
```
Administrators can edit many settings using the administration page.

View file

@ -10,13 +10,14 @@ This application is rather suitable for instances that activate a lot of applica
Use the shortcut `Ctrl`+`o` to open and to hide the side menu. Use `tab` to navigate.
You can customize colors depending of the theme.
You can customize colors depending of the theme (Dark theme and Breeze Dark).
To report a bug or request a feature, please open an issue.
You can report a bug or request a feature by opening an issue.
Requirements:
* PHP >= 8.1
* App `theming` enabled
If you like this application and if you want to support the development:
@ -30,7 +31,7 @@ Notice
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/).
]]></description>
<version>5.0.3</version>
<version>4.1.1</version>
<licence>agpl</licence>
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
<namespace>SideMenu</namespace>
@ -53,7 +54,7 @@ In case of downtime, you can download **Custom Menu** from [here](https://kim.de
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png]]></screenshot>
<dependencies>
<php min-version="8.1" max-version="8.4" />
<nextcloud min-version="31" max-version="32"/>
<nextcloud min-version="30" max-version="32"/>
</dependencies>
<settings>
<admin>OCA\SideMenu\Settings\Admin</admin>

View file

@ -49,11 +49,6 @@ class Application extends App implements IBootstrap
*/
protected $user;
/**
* @var Request
*/
protected $request;
public function __construct(array $urlParams = [])
{
parent::__construct(self::APP_ID, $urlParams);
@ -101,7 +96,6 @@ class Application extends App implements IBootstrap
$this->config = \OC::$server->getConfig();
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
$this->user = \OC::$server[IUserSession::class]->getUser();
$this->request = \OC::$server->getRequest();
if (!$this->isEnabled()) {
return;
@ -112,10 +106,6 @@ class Application extends App implements IBootstrap
protected function isEnabled(): bool
{
if (isset($this->request->server['HTTP_USER_AGENT']) && preg_match('/MemoriesNative/', $this->request->server['HTTP_USER_AGENT'])) {
return false;
}
$enabled = true;
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
@ -138,6 +128,7 @@ class Application extends App implements IBootstrap
protected function addAssets()
{
Util::addScript(self::APP_ID, 'side_menu-menu');
// Util::addStyle(self::APP_ID, 'sideMenu');
$assets = [
'stylesheet' => [
@ -148,6 +139,14 @@ class Application extends App implements IBootstrap
'rel' => 'stylesheet',
],
],
// 'script' => [
// 'route' => 'side_menu.Js.script',
// 'type' => 'script',
// 'route_attr' => 'src',
// 'attr' => [
// 'nonce' => $this->cspnm->getNonce(),
// ],
// ],
];
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');

View file

@ -54,6 +54,18 @@ class JsController extends Controller
$this->l10nFactory = $l10nFactory;
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/js/script')]
public function script(): TemplateResponse
{
$response = new TemplateResponse(Application::APP_ID, 'js/script', $this->getConfig(), 'blank');
$response->addHeader('Content-Type', 'text/javascript');
return $response;
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[PublicPage]

View file

@ -98,7 +98,6 @@ class PersonalSettingController extends Controller
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[FrontpageRoute(verb: 'GET', url: '/user/config')]
public function configuration(): JSONResponse
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 380 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Before After
Before After

View file

@ -1,15 +1,20 @@
'Custom menu': 'Menu personnalisé'
'Custom menu': '­­­Menu personnalisé'
'Enable the custom menu': 'Activer le menu personnalisé'
'No': 'Non'
'Yes': 'Oui'
'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'
'Apps that not must be moved in the side menu': 'Les applications qui ne doivent pas ê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."
'Apps that not must be moved in the side menu': 'Les applications qui ne doivent pas
ê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'
'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é ☕'
'Hidden': 'Caché'
'Small': 'Petit'
@ -43,17 +48,22 @@
'Before the logo': 'Avant le logo'
'After the logo': 'Après le logo'
'Position': 'Position'
'Show only the opener (hidden logo)': "Afficher uniquement le bouton d'ouverture (masquer 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)."
'Show only the opener (hidden logo)': "Afficher uniquement le bouton d'ouverture (masquer
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'
'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 logo': 'Afficher le logo'
'Icons and texts': 'Icônes et textes'
'Loader enabled': "Activation de l'indicateur de chargement"
'Tips': 'Astuces'
'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.'
'Big menu': 'Menu large'
'Live preview': 'Aperçu en direct'
@ -62,16 +72,21 @@
'Use my selection': 'Utiliser ma sélection'
'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"
'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'
'Export the configuration': 'Exporter la configuration'
'Purge the cache': 'Purger le cache'
'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.'
'Apps that should not be displayed in the menu': 'Applications qui ne doivent pas être affichées dans le menu'
'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"
'Apps that should not be displayed in the menu': 'Applications qui ne doivent pas
être affichées dans le menu'
'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'
'Categories': 'Catégories'
'Customize sorting': 'Personnaliser le tri'
@ -79,7 +94,8 @@
'Name': 'Nom'
'Customed': 'Personnalisé'
'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'
'With categories': 'Avec les catégories'
'Custom categories': 'Catégories personnalisées'
@ -87,9 +103,12 @@
'Reset to default': 'Restaurer les valeurs par défaut'
'Applications': 'Applications'
'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'
'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'
'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'
'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"
'Search': 'Rechercher'
'Toggle the menu': 'Basculer le menu'

View file

@ -43,8 +43,8 @@
'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).': 'Не отображать боковое меню и открывалку, если нет приложения (например, публичные страницы).'
'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': 'Отобразить большое меню'
@ -63,21 +63,21 @@
'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': 'Принудительно предоставить эту конфигурацию пользователям'
'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.': 'За исключением случаев, когда конфигурация является принудительной.'
'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.': 'Эта функция совместима только с отображением <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': 'Логотип открывает приложение по умолчанию'
'Others': 'Прочие'
'Categories': 'Категории'
'Customize sorting': 'Настроить сортировку'
'Order by': 'В порядке'
'Name': 'Название'
'Customed': 'Customed'
'Customed': 'Приспособлено'
'Show and hide the list of categories': 'Показать или скрыть список категорий'
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Эти настройки используются темами Тёмная и Тёмная Breeze.'
'Dark mode colors': 'Цвета тёмной темы'
@ -90,22 +90,22 @@
'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': 'Кроме приложения, на котором курсор'
'Except the hovered app': 'Кроме приложения на котором сейчас'
'Search': 'Поиск'
'Toggle the menu': 'Переключить меню'
'Open the documentation': 'Open the documentation'
'Ask the developer': 'Ask the developer'
'New request': 'New request'
'Report a bug': 'Report a bug'
'Show the configuration': 'Show the configuration'
'Ask the developer': 'Спросить разработчика'
'New request': 'Новый запрос'
'Report a bug': 'Пожаловаться на ошибку'
'Show the configuration': 'Показать конфигурацию'
'Configuration:': 'Configuration:'
'Done!': 'Done!'
'Copy': 'Copy'
'Need help': 'Need help'
'I would like a new feature': 'I would like a new feature'
'Something went wrong': 'Something went wrong'
'Select apps': 'Select apps'
'Sort': 'Sort'
'Customize': 'Customize'
'Done!': 'Готово!'
'Copy': 'Копировать'
'Need help': 'Нужна помощь'
'I would like a new feature': 'Я хочу новую возможность'
'Something went wrong': 'Что-то пошло не так'
'Select apps': 'Выберете приложения'
'Sort': 'Сортировать'
'Customize': 'Приспособить'
'Custom': 'Custom'
'Close': 'Close'
'Close': 'Закрыть'

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'
'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'
'Toggle the menu': 'Toggle the menu'
'Toggle the menu': 'Prepnite ponuku'
'Open the documentation': 'Open the documentation'
'Ask the developer': 'Ask the developer'
'New request': 'New request'

View file

@ -1,9 +1,9 @@
'Custom menu': '自定义菜单'
'Enable the custom menu': '启用自定义菜单'
'No': '取消'
'Yes': '确定'
'No': ''
'Yes': ''
'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': '顶部菜单'
'Apps that not must be moved in the side menu': '禁止在侧边栏菜单移动的应用'
'If there is no selection then the global configuration is applied.': '如果没有选择,则应用全局配置。'
@ -25,7 +25,7 @@
'Opposite color': '相反颜色'
'Transparent': '透明'
'Opaque': '不透明'
'Opener': '器'
'Opener': '触发器'
'Default': '默认'
'Default (dark)': '默认(深色)'
'Hamburger': 'Hamburger'
@ -35,10 +35,10 @@
'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).': '如果没有应用程序(例如:公共页面),则不要显示侧边栏菜单和器。'
'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)': '鼠标悬停时打开菜单 (触摸屏时将自动禁用)'
'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': '图标和文本'
@ -63,7 +63,7 @@
'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.': '此功能只和<code>大型菜单</code>兼容。'
'The logo is a link to the default app': 'logo链接到默认应用'
'The logo is a link to the default app': '徽标链接到默认应用'
'Others': '其他'
'Categories': '类别'
'Customize sorting': '自定义排序'
@ -85,27 +85,27 @@
'Small text': '小文本'
'Normal text': '普通文本'
'Big text': '大文本'
'Applications': 'Applications'
'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'
'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 menu': 'Toggle menu'
'Open the documentation': 'Open the documentation'
'Ask the developer': 'Ask the developer'
'New request': 'New request'
'Report a bug': 'Report a bug'
'Show the configuration': 'Show the configuration'
'Configuration:': 'Configuration:'
'Done!': 'Done!'
'Copy': 'Copy'
'Need help': 'Need help'
'I would like a new feature': 'I would like a new feature'
'Something went wrong': 'Something went wrong'
'Select apps': 'Select apps'
'Sort': 'Sort'
'Customize': 'Customize'
'Custom': 'Custom'
'Close': 'Close'
'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 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': '关闭'

View file

@ -142,7 +142,7 @@ const appLimit = () => {
})
}
return Math.max(0, Math.floor((body.offsetWidth - size) / 70))
return Math.floor((body.offsetWidth - size) / 70)
}
const makeStyle = (app) => {
@ -158,11 +158,6 @@ const computeLists = () => {
popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order)
}
const reComputeLists = (delay) => {
window.clearTimeout(resizeTimeout)
resizeTimeout = window.setTimeout(computeLists, delay || 100)
}
onMounted(async () => {
const config = await configStore.getConfig()
@ -174,7 +169,10 @@ onMounted(async () => {
setApps(await navStore.getCoreApps())
window.addEventListener('resize', reComputeLists)
window.addEventListener('resize', () => {
window.clearTimeout(resizeTimeout)
resizeTimeout = window.setTimeout(computeLists, 100)
})
})
</script>