Commit a7dee69d authored by filip mertens's avatar filip mertens Committed by ioedeveloper

remove items that are not sticky

parent 4f2fa4f5
......@@ -72,6 +72,7 @@ module.exports = class Filepanel extends ViewPlugin {
}
renderComponent () {
console.log("render", this.registeredMenuItems)
ReactDOM.render(
<Workspace
createWorkspace={this.createWorkspace.bind(this)}
......@@ -111,8 +112,9 @@ module.exports = class Filepanel extends ViewPlugin {
removePluginActions (plugin) {
this.registeredMenuItems = this.registeredMenuItems.filter((item) => {
return item.id !== plugin.name
return item.id !== plugin.name || item.sticky === true
})
this.renderComponent()
}
async getCurrentWorkspace () {
......
......@@ -17,6 +17,50 @@ import './css/file-explorer.css'
const queryParams = new QueryParams()
const initialActions = [{
id: 'newFile',
name: 'New File',
type: ['folder'],
path: [],
extension: [],
pattern: []
}, {
id: 'newFolder',
name: 'New Folder',
type: ['folder'],
path: [],
extension: [],
pattern: []
}, {
id: 'rename',
name: 'Rename',
type: ['file', 'folder'],
path: [],
extension: [],
pattern: []
}, {
id: 'delete',
name: 'Delete',
type: ['file', 'folder'],
path: [],
extension: [],
pattern: []
}, {
id: 'pushChangesToGist',
name: 'Push changes to gist',
type: [],
path: [],
extension: [],
pattern: ['^browser/gists/([0-9]|[a-z])*$']
}, {
id: 'run',
name: 'Run',
type: [],
path: [],
extension: ['.js'],
pattern: []
}]
export const FileExplorer = (props: FileExplorerProps) => {
const { name, registry, plugin, focusRoot, contextMenuItems, displayInput, externalUploads } = props
const [state, setState] = useState({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment