mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 15:31:51 +08:00
Hide plugin menu if empty
This commit is contained in:
parent
7d818877f8
commit
7cf34cfb74
@ -151,6 +151,15 @@ class Plugins{
|
|||||||
return input.slice(0, index) + insertedText + input.slice(index + searchString.length)
|
return input.slice(0, index) + insertedText + input.slice(index + searchString.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hasSettings(){
|
||||||
|
for(var i = 0; i < this.allPlugins.length; i++){
|
||||||
|
var plugin = this.allPlugins[i].plugin
|
||||||
|
if(plugin.loaded && (!plugin.hide || plugin.settings())){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
getSettings(){
|
getSettings(){
|
||||||
var items = []
|
var items = []
|
||||||
for(var i = 0; i < this.allPlugins.length; i++){
|
for(var i = 0; i < this.allPlugins.length; i++){
|
||||||
|
@ -161,7 +161,7 @@ class SongSelect{
|
|||||||
category: strings.random
|
category: strings.random
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(plugins.allPlugins.length){
|
if(plugins.hasSettings()){
|
||||||
this.songs.push({
|
this.songs.push({
|
||||||
title: strings.plugins.title,
|
title: strings.plugins.title,
|
||||||
skin: this.songSkin.plugins,
|
skin: this.songSkin.plugins,
|
||||||
|
Loading…
Reference in New Issue
Block a user