Studio-42 / elFinder

📁 Open-source file manager for web, written in JavaScript using jQuery and jQuery UI
https://studio-42.github.io/elFinder/
Other
4.65k stars 1.42k forks source link

Themes Menu #3679

Open re-LIF3 opened 1 week ago

re-LIF3 commented 1 week ago

How to add Menu Themes at Preference ? theres is no document for it ? Screenshot 2024-10-11 185813

blutorange commented 1 week ago

Yeah you kinda have to read some source code: https://github.com/Studio-42/elFinder/blob/master/js/commands/preference.js#L23-L32

E.g. to only show the Theme tab:

$(".elfinder").elfinder({
  commandsOptions: {
    preference: {
      categories: { theme: ["theme"] },
    },
  },
})

And make sure you actually have some themes defined, or I believe it won't show up either:

https://github.com/Studio-42/elFinder/blob/master/js/elFinder.options.js#L235-L254

{
            themes : {
                'dark-slim'   : 'https://johnfort.github.io/elFinder.themes/dark-slim/manifest.json',
                'mt-darkblue' : 'https://robinn1.github.io/elFinder-Material-Theme/manifests/darkblue.json',
                'mt-gray'     : 'https://robinn1.github.io/elFinder-Material-Theme/manifests/gray.json',
                'mt-light'    : 'https://robinn1.github.io/elFinder-Material-Theme/manifests/light.json',
                'bootstrap'   : 'https://nao-pon.github.io/elfinder-theme-manifests/bootstrap.json',
                'moono'       : 'https://nao-pon.github.io/elfinder-theme-manifests/moono.json',
                'win10'       : 'https://nao-pon.github.io/elfinder-theme-manifests/win10.json'
            },
}