big menu 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': ''
+'Custom menu': 'Anpassad meny'
+'Enable the custom menu': 'Aktivera den anpassade menyn'
+'No': 'Nej'
+'Yes': 'Ja'
+'Menu': 'Meny'
+'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Använd genvägen Ctrl+o för att visa eller dölja sidomenyn. Använd tabb-tangenten för att navigera.'
+'Top menu': 'Toppmeny'
+'Apps that not must be moved in the side menu': 'Appar som inte får flyttas i sidomenyn'
+'If there is no selection then the global configuration is applied.': 'Om inget val har gjorts tillämpas den globala konfigurationen.'
+'Experimental': 'Experimentell'
+'Save': 'Spara'
+'You like this app and you want to support me?': 'Gillar du den här appen och vill stödja mig?'
+'Buy me a coffee ☕': 'Bjud mig på en kaffe ☕'
+'Hidden': 'Dold'
+'Small': 'Liten'
+'Normal': 'Normal'
+'Big': 'Stor'
+'Hidden icon': 'Dold ikon'
+'Small icon': 'Liten ikon'
+'Normal icon': 'Normal ikon'
+'Big icon': 'Stor ikon'
+'Hidden text': 'Dold text'
+'Small text': 'Liten text'
+'Normal text': 'Normal text'
+'Big text': 'Stor text'
+'Colors': 'Färger'
+'Background color': 'Bakgrundsfärg'
+'Background color of current app': 'Bakgrundsfärg för aktuell app'
+'Text color': 'Textfärg'
+'Loader': 'Laddare'
+'Icon': 'Ikon'
+'Same color': 'Samma färg'
+'Opposite color': 'Motsatt färg'
+'Transparent': 'Transparent'
+'Opaque': 'Ogenomskinlig'
+'Opener': 'Öppnare'
+'Default': 'Standard'
+'Default (dark)': 'Standard(mörk)'
+'Hamburger': 'Hamburgermeny'
+'Hamburger (dark)': 'Hamburgermeny(mörk)'
+'Hamburger 2': 'Hamburgermeny 2'
+'Hamburger 2 (dark)': 'Hamburgermeny 2 (mörk)'
+'Before the logo': 'Före logotypen'
+'After the logo': 'Efter logotypen'
+'Position': 'Position'
+'Show only the opener (hidden logo)': 'Visa endast öppnaren (gömd logotyp)'
+'Do not display the side menu and the opener if there is no application (eg: public pages).': 'Visa inte sidomenyn eller öppnaren om det inte finns någon applikation (t.ex. publika sidor).'
+'Panel': 'Panel'
+'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Öppna menyn när muspekaren hovrar över öppnaren (automatiskt avaktiverat på pekskärmar)'
+'Display the big menu': 'Visa den stora menyn'
+'Display the logo': 'Visa logotypen'
+'Icons and texts': 'Ikoner och texter'
+'Loader enabled': 'Laddare aktiverad'
+'Tips': 'Tips'
+'Always displayed': 'Alltid visad'
+'This is the automatic behavior when the menu is always displayed.': 'Detta är det automatiska beteendet när menyn alltid är visad.'
+'Not compatible with touch screens.': 'Inte kompatibel med pekskärmar.'
+'Big menu': 'Stor meny'
+'Live preview': 'Förhandsgranskning i realtid'
+'Open apps in new tab': 'Öppna appar i ny flik'
+'Use the global setting': 'Använd den globala inställningen'
+'Use my selection': 'Använd mitt val'
+'Show and hide the list of applications': 'Visa och dölj listan över applikationer'
+'Use the avatar instead of the logo': 'Använd avataren istället för logotypen'
+'You do not have permission to change the settings.': 'Du har inte behörighet att ändra inställningarna.'
+'Force this configuration to users': 'Tvinga denna konfiguration för användare'
+'Export the configuration': 'Exportera konfigurationen'
+'Purge the cache': 'Rensa cachen'
+'Show the link to settings': 'Visa länken till inställningarna'
+'The menu is enabled by default for users': 'Menyn är aktiverad som standard för användare'
+'Except when the configuration is forced.': 'Förutom när konfigurationen är tvingad.'
+'Apps that should not be displayed in the menu': 'Appar som inte ska visas i menyn'
+'This feature is only compatible with the
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/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/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: {