forked from deblan/side_menu
fix the menu is displayed even if there are no apps (fix #369)
This commit is contained in:
parent
6be15c269b
commit
84efcbd36c
1 changed files with 7 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -117,7 +116,9 @@ export default {
|
|||
return a.order < b.order ? -1 : 1
|
||||
})
|
||||
|
||||
console.log("aaaaaaaaaaaa")
|
||||
this.apps = finalApps
|
||||
console.log(this.apps)
|
||||
|
||||
document.querySelector('body').dispatchEvent(new CustomEvent('side-menu.apps', {
|
||||
detail: {apps: this.apps},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue