big menu display.': 'Denna funktion är endast kompatibel med
stor meny.'
-'The logo is a link to the default app': 'Logotypen är en länk till standardappen'
-'Others': 'Övriga'
-'Categories': 'Kategorier'
-'Customize sorting': 'Anpassa sortering'
-'Order by': 'Sortera efter'
-'Name': 'Namn'
-'Customed': 'Anpassad'
-'Show and hide the list of categories': 'Visa och dölj listan över kategorier'
-'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Dessa parametrar används när mörkt tema eller Breeze Dark Theme är aktiverade.'
-'Dark mode colors': 'Färger för mörkt läge'
-'With categories': 'Med kategorier'
-'Custom categories': 'Anpassade kategorier'
-'Customize application categories': 'Anpassa app kategorier'
-'Reset to default': 'Återställ till standardvärden'
-'Applications': 'Applikationer'
-'Applications kept in the top menu': 'Applikationer som hålls i toppmenyn'
-'Applications kept in the top menu but also shown in side menu': 'Applikationer som visas både i toppmenyn och i sidomenyn'
-'These applications must be selected in the previous option.': 'Dessa applikationer måste väljas i föregående alternativ.'
-'Hide labels on mouse over': 'Dölj etiketter när muspekaren är över'
-'Except the hovered app': 'Förutom den app som muspekaren är över'
-'Search': 'Sök'
-'Toggle the menu': 'Växla menyn'
-'Open the documentation': 'Öppna dokumentationen'
-'Ask the developer': 'Fråga utvecklaren'
-'New request': 'Ny förfrågan'
-'Report a bug': 'Rapportera ett fel'
-'Show the configuration': 'Visa konfigurationen'
-'Configuration:': 'Konfiguration:'
-'Done!': 'Klar!'
-'Copy': 'Kopiera'
-'Need help': 'Behöver hjälp'
-'I would like a new feature': 'Jag skulle vilja ha en ny funktion'
-'Something went wrong': 'Något gick fel'
-'Select apps': 'Välj appar'
-'Sort': 'Sortera'
-'Customize': 'Anpassa'
-'Custom': 'Anpassad'
-'Close': 'Stäng'
diff --git a/src/l10n/fixtures/zh_CN.yaml b/src/l10n/fixtures/zh_CN.yaml
index bc77571..58bf8ab 100644
--- a/src/l10n/fixtures/zh_CN.yaml
+++ b/src/l10n/fixtures/zh_CN.yaml
@@ -38,7 +38,7 @@
'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': '图标和文本'
diff --git a/src/menu.js b/src/menu.js
index 9f41a0f..7a92f62 100644
--- a/src/menu.js
+++ b/src/menu.js
@@ -17,8 +17,6 @@
import './scss/menu.scss'
-import '@formatjs/intl-segmenter/polyfill.js'
-
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createElement, waitContainer } from './lib/dom.js'
diff --git a/src/menus/StandardMenu.vue b/src/menus/StandardMenu.vue
index 81b9ff9..5e817ee 100644
--- a/src/menus/StandardMenu.vue
+++ b/src/menus/StandardMenu.vue
@@ -33,7 +33,7 @@ along with this program. If not, see
.
:data-app-id="app.id"
class="app-menu-entry"
:class="{
- 'app-menu-entry__active': app.id === activeApp,
+ 'app-menu-entry__active': app.active,
'app-menu-entry__hidden-label': hiddenLabels === 1,
'app-menu-main__show-hovered': hiddenLabels === 2,
}"
@@ -44,7 +44,7 @@ along with this program. If not, see
.
:class="{ 'has-unread': app.unread > 0 }"
:aria-label="app.name"
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
- :aria-current="app.id === activeApp ? 'page' : false"
+ :aria-current="app.active ? 'page' : false"
>
![]()
.
v-for="app in popoverAppList"
:key="app.id"
:aria-label="app.name"
- :aria-current="app.id === activeApp ? 'page' : false"
+ :aria-current="app.active ? 'page' : false"
:href="app.href"
:style="makeStyle(app)"
class="cm-standardmenu-app-menu-popover-entry app-menu-popover-entry"
@@ -101,7 +101,6 @@ import { ref, onMounted } from 'vue'
import { useConfigStore } from '../store/config.js'
import { useNavStore } from '../store/nav.js'
import { NcActions, NcActionLink } from '@nextcloud/vue'
-import { getActiveAppId } from '../lib/app.js'
const navStore = useNavStore()
const configStore = useConfigStore()
@@ -113,7 +112,6 @@ const topMenuApps = ref([])
const appsOrder = ref([])
const mainAppList = ref([])
const popoverAppList = ref([])
-const activeApp = ref(null)
let resizeTimeout = null
const setApps = (value) => {
@@ -144,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) => {
@@ -160,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()
@@ -172,12 +165,14 @@ onMounted(async () => {
hiddenLabels.value = config['top-menu-mouse-over-hidden-label']
topMenuApps.value = config['top-menu-apps']
appsOrder.value = config['apps-order']
- activeApp.value = getActiveAppId()
ready.value = true
setApps(await navStore.getCoreApps())
- window.addEventListener('resize', reComputeLists)
+ window.addEventListener('resize', () => {
+ window.clearTimeout(resizeTimeout)
+ resizeTimeout = window.setTimeout(computeLists, 100)
+ })
})
diff --git a/src/store/nav.js b/src/store/nav.js
index 98abe0d..03a128e 100644
--- a/src/store/nav.js
+++ b/src/store/nav.js
@@ -41,7 +41,10 @@ export const useNavStore = defineStore('nav', () => {
async function getCoreApps() {
if (coreApps == null) {
- coreApps = await await axios.get(generateUrl('/apps/side_menu/core/apps')).then((response) => response.data.items)
+ coreApps = await axios
+ .get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
+ .then((response) => response.data)
+ .then((value) => value.ocs.data)
}
return coreApps
diff --git a/src/user.js b/src/user.js
index 0147a7c..0f4b27a 100644
--- a/src/user.js
+++ b/src/user.js
@@ -17,8 +17,6 @@
import './scss/admin.scss'
-import '@formatjs/intl-segmenter/polyfill.js'
-
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { waitContainer } from './lib/dom.js'
diff --git a/templates/css/stylesheet.php b/templates/css/stylesheet.php
index 5bdc08b..969f17a 100644
--- a/templates/css/stylesheet.php
+++ b/templates/css/stylesheet.php
@@ -38,7 +38,7 @@ body[data-theme-light], body[data-theme-light-highcontrast] {
#nextcloud {
- display: none !important;
+ display: none;
}
diff --git a/webpack.config.js b/webpack.config.js
index 0c16d61..d9876e8 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -77,10 +77,6 @@ module.exports = {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
-
- new webpack.DefinePlugin({
- appName: JSON.stringify(appName),
- }),
],
resolve: {