Merge pull request 'v4.0.1' (#372) from develop into master

Reviewed-on: deblan/side_menu#372
This commit is contained in:
Simon Vieille 2024-10-30 19:08:49 +01:00
commit eff18bb143
5 changed files with 15 additions and 17 deletions

View file

@ -7,17 +7,9 @@ when:
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
steps:
# "Install dependencies":
# image: node:20
# pull: true
# commands:
# - npm i
"Build JS":
image: node:20
commands:
- make dep
- ls -l node_modules/@nextcloud/vue/dist/Components
- make build
"Build translations":

View file

@ -1,5 +1,10 @@
## [Unreleased]
## 4.0.1
### Fixed
* fix top menu labels (fix #368)
* fix #369: The menu is displayed even if there are no apps
## 4.0.0
### Added
* add compatibility with NC30

View file

@ -32,7 +32,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>4.0.0</version>
<version>4.0.1</version>
<licence>agpl</licence>
<author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
<namespace>SideMenu</namespace>

View file

@ -110,14 +110,16 @@ export default defineComponent({
mounted() {
axios.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
.then((response) => response.data)
.then((data) => {
.then((data) => {
if (data.ocs.meta.statuscode !== 200) {
return
}
this.setApps(data.ocs.data)
})
})
this.targetBlankApps = window.targetBlankApps
this.hiddenLabels = window.topMenuAppsMouseOverHiddenLabel
let timeout = null
window.addEventListener('resize', () => {

View file

@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<ul class="side-menu-apps-list" :class="{'side-menu-apps-list--with-settings': !!settings}">
<SideMenuApp
v-for="(app, key) in apps"
v-if="!hiddenApps.includes(app.id) && searchMatch(app.name)"
v-if="searchMatch(app.name)"
v-bind:classes="{'side-menu-app': true, 'active': app.active}"
v-bind:key="key"
v-bind:icon="app.icon"
@ -94,17 +94,16 @@ export default {
orders[app] = order + 1
})
for (let id in ncApps) {
if (window.topMenuApps.includes(id) && !window.topSideMenuApps.includes(id)) {
for (let app of ncApps) {
if (window.topMenuApps.includes(app.id) && !window.topSideMenuApps.includes(app.id)) {
continue
}
if (this.hiddenApps.includes(id)) {
if (this.hiddenApps.includes(app.id)) {
continue
}
let app = ncApps[id]
app.order = orders[id] || null
app.order = orders[app.id] || null
finalApps.push(app)
}